This function determines the set of modules to compile and the
compile options to use, by first looking for the emake make
option, if not present reads the configuration from a file named
Emakefile (see below). If no such file is found, the
set of modules to compile defaults to all modules in the
current working directory.
Traversing the set of modules, it then recompiles every module for
which at least one of the following conditions apply:
- there is no object file, or
- the source file has been modified since it was last compiled,
or,
- an include file has been modified since the source file was
last compiled.
As a side effect, the function prints the name of each module it
tries to compile. If compilation fails for a module, the make
procedure stops and error is returned.
Options is a list of make- and compiler options.
The following make options exist:
- noexec
No execution mode. Just prints the name of each module that needs
to be compiled.
- load
Load mode. Loads all recompiled modules.
- netload
Net load mode. Loads all recompiled modules on all known nodes.
- {emake, Emake}
Rather than reading the Emakefile specify configuration explicitly.
All items in Options that are not make options are assumed
to be compiler options and are passed as-is to
compile:file/2. Options defaults to [].