The module make
provides a set of functions similar to
the UNIX type Make
functions.
all() -> up_to_date | error
all(Options) -> up_to_date | error
Options = [Option]
Option = noexec | load | netload | par |
<compiler option>
This function first looks in the current working directory for
a file named Emakefile
(see below) specifying the set of
modules to compile. 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:
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
load
netload
par
make
is used in parallell on all known
nodes.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 []
.
files(ModFiles) -> up_to_date | error
files(ModFiles, Options) -> up_to_date | error
ModFiles = [Module | File]
Module = atom()
File = string()
Options = [Option]
Option = noexec | load | netload | par |
<compiler option>
files/1,2
does exactly the same thing as all/0,1
but
for the specified ModFiles
, which is a list of module or
file names. The file extension .erl
may be omitted.
make:all/0,1
looks in the current working directory for
a file named Emakefile
for the set of modules to compile.
If it exists, Emakefile
should contain the module names (atoms)
separated by periods. If the module is located in another directory,
the path has to be specified. For example:
file1. file2. '../foo/file3'. 'File4'.