table of contents
other versions
- jessie 1:17.3-dfsg-4+deb8u2
 - jessie-backports 1:19.2.1+dfsg-2+deb9u1~bpo8+1
 - stretch 1:19.2.1+dfsg-2+deb9u2
 - testing 1:21.2.5+dfsg-1
 - unstable 1:21.2.6+dfsg-1
 - experimental 1:22.0~rc1+dfsg-1
 
other sections
| make(3erl) | Erlang Module Definition | make(3erl) | 
NAME¶
make - A Make Utility for ErlangDESCRIPTION¶
The module make provides a set of functions similar to the UNIX type Make functions.EXPORTS¶
all() -> up_to_date | error
Types:
Options = [Option]
 
Option = noexec | load | netload | <compiler option> 
Option = noexec | load | netload | <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 and the
  compile options to use. 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:
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
- *
 - 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.
 
- *
 - 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 an all known nodes. 
Types:
ModFiles = [Module | File]
 
Module = atom() 
File = string() 
Options = [Option]
 
Option = noexec | load | netload | <compiler option> 
Module = atom()
File = string()
Option = noexec | load | netload | <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.
The Emakefile (if it exists) in the current directory is searched for
  compiler options for each module. If a given module does not exist in
  Emakefile or if Emakefile does not exist, the module is still
  compiled.
EMAKEFILE¶
make:all/0,1 and make:files/1,2 looks in the current working directory for a file named Emakefile. If it exists, Emakefile should contain elements like this:
Modules.
{Modules,Options}.    
Modules is an atom or a list of atoms. It can be
- *
 - a module name, e.g. file1
 
- *
 - a module name in another directory, e.g. ../foo/file3
 
- *
 - a set of modules specified with a wildcards, e.g. 'file*'
 
- *
 - a wildcard indicating all modules in current directory, i.e. '*'
 
- *
 - a list of any of the above, e.g. ['file*','../foo/file3','File4']
 
{'file1',[debug_info,{i,"../foo"}]}.
{'*',[debug_info]}.    
| tools 2.7 | Ericsson AB |