[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.7.1 Makefile targets defined by Mosmake

These are the targets defined by Mosmake, in addition to actual files that can be built. All of these are declared .PHONY (see section `Phony targets' in The GNU make manual).

`all'
Mosmake contains rules to let `all' depend on all the binaries defined by `Dependencies' (except those marked %OPTIONAL, see Optional). Thus, `make all' will build all the programs.

Mosmake does not add any commands for `all', so you can add your own commands if you can think of a reason to do so. Of course, you can also add your own prerequisites for `all'.

If `mosmake.dep' is included in `Makefile' before any explicit rule, `all' will be the default target (i.e., `make' alone will be equivalent to `make all').

`ajour'
The target `ajour' is set up to explicitly depend on `mosmake.dep'. Thus `make ajour' will make sure that `mosmake.dep' is up-to-date with respect to `Dependencies'. Normally GNU make will do this spontaneously because `mosmake.dep' is included; the `ajour' target is provided as a fall-back in case the automatic mechanism somehow fails. Also, `make ajour' is a convenient way to stop make from starting compilations when all you want to do is make sure that the makefile complex is up to date.

Mosmake does not add any commands for `ajour' itself. You're free to add prerequisites and/or commands of your own. In my own projects I let `ajour' depend on all files that are somehow generated during the (autoconf-supported) configurations phase.

`clean'
Mosmake adds an internal dependency to the `clean' target that will make `make clean' delete all intermediate `.ui' and `.uo' files, all programs built by Mosmake, all `.sml' and `.sig' files created by mosmllex and mosmlyac, and all files whose name ends with `~' (those are usually Emacs backup files).

Mosmake does not add any commands for `clean' itself. You're free to define your own commands (or prerequisites) for `clean'; those will be run in addition to those provided by Mosmake.

`mostlyclean'
As `clean', except that executable programs built by Mosmake will not be deleted.

`realclean'
As `clean', except that `mosmake.dep' will also be deleted.

`depend'
`make depend' will force `mosmake.dep' to be rebuilt, even if it is newer than `Dependencies'. Use this when you add or remove `.sig' or `-sig.sml' files; see 2.2.5 How Mosmake finds out which model you use.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated by Henning Makholm on November, 19 2002 using texi2html