1make(3)                    Erlang Module Definition                    make(3)
2
3
4

NAME

6       make - A Make Utility for Erlang
7

DESCRIPTION

9       The  module  make  provides a set of functions similar to the UNIX type
10       Make functions.
11

EXPORTS

13       all() -> up_to_date | error
14       all(Options) -> up_to_date | error
15
16              Types:
17
18                 Options = [Option]
19                  Option = noexec | load | netload | {emake,  Emake}  |  <com‐
20                 piler option>
21
22              This  function  determines the set of modules to compile and the
23              compile options to use, by first  looking  for  the  emake  make
24              option, if not present reads the configuration from a file named
25              Emakefile (see below). If no such file is found, the set of mod‐
26              ules  to  compile defaults to all modules in the current working
27              directory.
28
29              Traversing the set of modules, it then recompiles  every  module
30              for which at least one of the following conditions apply:
31
32                * there is no object file, or
33
34                * the  source  file  has  been modified since it was last com‐
35                  piled, or,
36
37                * an include file has been modified since the source file  was
38                  last compiled.
39
40              As a side effect, the function prints the name of each module it
41              tries to compile. If compilation fails for a  module,  the  make
42              procedure stops and error is returned.
43
44              Options  is  a list of make- and compiler options. The following
45              make options exist:
46
47                * noexec
48                   No execution mode. Just prints the name of each module that
49                  needs to be compiled.
50
51                * load
52                   Load mode. Loads all recompiled modules.
53
54                * netload
55                   Net  load  mode.  Loads all recompiled modules on all known
56                  nodes.
57
58                * {emake, Emake}
59                   Rather than reading  the  Emakefile  specify  configuration
60                  explicitly.
61
62              All items in Options that are not make options are assumed to be
63              compiler options and are passed as-is to compile:file/2. Options
64              defaults to [].
65
66       files(ModFiles) -> up_to_date | error
67       files(ModFiles, Options) -> up_to_date | error
68
69              Types:
70
71                 ModFiles = [Module | File]
72                  Module = atom()
73                  File = string()
74                 Options = [Option]
75                  Option = noexec | load | netload | <compiler option>
76
77              files/1,2  does  exactly  the  same thing as all/0,1 but for the
78              specified ModFiles, which is a list of module or file names. The
79              file extension .erl may be omitted.
80
81              The  Emakefile  (if  it  exists)  in  the  current  directory is
82              searched for compiler options for each module. If a given module
83              does  not exist in Emakefile or if Emakefile does not exist, the
84              module is still compiled.
85

EMAKEFILE

87       make:all/0,1 and make:files/1,2  first  looks  for  {emake,  Emake}  in
88       options,  then in the current working directory for a file named Emake‐
89       file. If present Emake should contain elements like this:
90
91       Modules.
92       {Modules,Options}.
93
94       Modules is an atom or a list of atoms. It can be
95
96         * a module name, e.g. file1
97
98         * a module name in another directory, e.g. ../foo/file3
99
100         * a set of modules specified with a wildcards, e.g. 'file*'
101
102         * a wildcard indicating all modules in current directory, i.e. '*'
103
104         * a list of any of the above, e.g. ['file*','../foo/file3','File4']
105
106       Options is a list of compiler options.
107
108       Emakefile is read from top to bottom. If a module matches more than one
109       entry,  the  first match is valid. For example, the following Emakefile
110       means   that   file1   shall   be    compiled    with    the    options
111       [debug_info,{i,"../foo"}],  while all other files in the current direc‐
112       tory shall be compiled with only the debug_info flag.
113
114       {'file1',[debug_info,{i,"../foo"}]}.
115       {'*',[debug_info]}.
116
117Ericsson AB                      tools 3.1.0.1                         make(3)
Impressum