~rdoering/ubuntu/karmic/erlang/fix-535090

« back to all changes in this revision

Viewing changes to lib/tools/doc/src/make.xml

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-02-15 16:42:52 UTC
  • mfrom: (3.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090215164252-q5x4rcf8a5pbesb1
Tags: 1:12.b.5-dfsg-2
Upload to unstable after lenny is released.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="latin1" ?>
 
2
<!DOCTYPE erlref SYSTEM "erlref.dtd">
 
3
 
 
4
<erlref>
 
5
  <header>
 
6
    <copyright>
 
7
      <year>1996</year>
 
8
      <year>2007</year>
 
9
      <holder>Ericsson AB, All Rights Reserved</holder>
 
10
    </copyright>
 
11
    <legalnotice>
 
12
  The contents of this file are subject to the Erlang Public License,
 
13
  Version 1.1, (the "License"); you may not use this file except in
 
14
  compliance with the License. You should have received a copy of the
 
15
  Erlang Public License along with this software. If not, it can be
 
16
  retrieved online at http://www.erlang.org/.
 
17
 
 
18
  Software distributed under the License is distributed on an "AS IS"
 
19
  basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
 
20
  the License for the specific language governing rights and limitations
 
21
  under the License.
 
22
 
 
23
  The Initial Developer of the Original Code is Ericsson AB.
 
24
    </legalnotice>
 
25
 
 
26
    <title>make</title>
 
27
    <prepared></prepared>
 
28
    <docno></docno>
 
29
    <date></date>
 
30
    <rev></rev>
 
31
  </header>
 
32
  <module>make</module>
 
33
  <modulesummary>A Make Utility for Erlang</modulesummary>
 
34
  <description>
 
35
    <p>The module <c>make</c> provides a set of functions similar to
 
36
      the UNIX type <c>Make</c> functions.</p>
 
37
  </description>
 
38
  <funcs>
 
39
    <func>
 
40
      <name>all() -> up_to_date | error</name>
 
41
      <name>all(Options) -> up_to_date | error</name>
 
42
      <fsummary>Compile a set of modules.</fsummary>
 
43
      <type>
 
44
        <v>Options = [Option]</v>
 
45
        <v>&nbsp;Option = noexec | load | netload | &lt;compiler option&gt;</v>
 
46
      </type>
 
47
      <desc>
 
48
        <p>This function first looks in the current working directory
 
49
          for a file named <c>Emakefile</c> (see below) specifying the
 
50
          set of modules to compile and the compile options to use. If
 
51
          no such file is found, the set of modules to compile
 
52
          defaults to all modules in the current working
 
53
          directory.</p>
 
54
        <p>Traversing the set of modules, it then recompiles every module for
 
55
          which at least one of the following conditions apply:</p>
 
56
        <list type="bulleted">
 
57
          <item>there is no object file, or</item>
 
58
          <item>the source file has been modified since it was last compiled,
 
59
           or,</item>
 
60
          <item>an include file has been modified since the source file was
 
61
           last compiled.</item>
 
62
        </list>
 
63
        <p>As a side effect, the function prints the name of each module it
 
64
          tries to compile. If compilation fails for a module, the make
 
65
          procedure stops and <c>error</c> is returned.</p>
 
66
        <p><c>Options</c> is a list of make- and compiler options.
 
67
          The following make options exist:</p>
 
68
        <list type="bulleted">
 
69
          <item><c>noexec</c>          <br></br>
 
70
 
 
71
           No execution mode. Just prints the name of each module that needs
 
72
           to be compiled.</item>
 
73
          <item><c>load</c>          <br></br>
 
74
 
 
75
           Load mode. Loads all recompiled modules.</item>
 
76
          <item><c>netload</c>          <br></br>
 
77
 
 
78
           Net load mode. Loads all recompiled modules an all known nodes.</item>
 
79
        </list>
 
80
        <p>All items in <c>Options</c> that are not make options are assumed
 
81
          to be compiler options and are passed as-is to
 
82
          <c>compile:file/2</c>. <c>Options</c> defaults to <c>[]</c>.</p>
 
83
      </desc>
 
84
    </func>
 
85
    <func>
 
86
      <name>files(ModFiles) -> up_to_date | error</name>
 
87
      <name>files(ModFiles, Options) -> up_to_date | error</name>
 
88
      <fsummary>Compile a set of modules.</fsummary>
 
89
      <type>
 
90
        <v>ModFiles = [Module | File]</v>
 
91
        <v>&nbsp;Module = atom()</v>
 
92
        <v>&nbsp;File = string()</v>
 
93
        <v>Options = [Option]</v>
 
94
        <v>&nbsp;Option = noexec | load | netload | &lt;compiler option&gt;</v>
 
95
      </type>
 
96
      <desc>
 
97
        <p><c>files/1,2</c> does exactly the same thing as <c>all/0,1</c> but
 
98
          for the specified <c>ModFiles</c>, which is a list of module or
 
99
          file names. The file extension <c>.erl</c> may be omitted.</p>
 
100
        <p>The <c>Emakefile</c> (if it exists) in the current
 
101
          directory is searched for compiler options for each module. If
 
102
          a given module does not exist in <c>Emakefile</c> or if
 
103
          <c>Emakefile</c> does not exist, the module is still compiled.</p>
 
104
      </desc>
 
105
    </func>
 
106
  </funcs>
 
107
 
 
108
  <section>
 
109
    <title>Emakefile</title>
 
110
    <p><c>make:all/0,1</c> and <c>make:files/1,2</c> looks in the
 
111
      current working directory for a file named <c>Emakefile</c>. If
 
112
      it exists, <c>Emakefile</c> should contain elements like this:</p>
 
113
    <code type="none">
 
114
Modules.
 
115
{Modules,Options}.    </code>
 
116
    <p><c>Modules</c> is an atom or a list of atoms. It can be 
 
117
      </p>
 
118
    <list type="bulleted">
 
119
      <item>a module name, e.g. <c>file1</c></item>
 
120
      <item>a module name in another directory,
 
121
       e.g. <c>../foo/file3</c></item>
 
122
      <item>a set of modules specified with a wildcards,
 
123
       e.g. <c>'file*'</c></item>
 
124
      <item>a wildcard indicating all modules in current directory,
 
125
       i.e. <c>'*'</c></item>
 
126
      <item>a list of any of the above,
 
127
       e.g. <c>['file*','../foo/file3','File4']</c></item>
 
128
    </list>
 
129
    <p><c>Options</c> is a list of compiler options.
 
130
      </p>
 
131
    <p><c>Emakefile</c> is read from top to bottom. If a module
 
132
      matches more than one entry, the first match is valid. For
 
133
      example, the following <c>Emakefile</c> means that <c>file1</c>
 
134
      shall be compiled with the options
 
135
      <c>[debug_info,{i,"../foo"}]</c>, while all other files in the
 
136
      current directory shall be compiled with only the
 
137
      <c>debug_info</c> flag.</p>
 
138
    <code type="none">
 
139
{'file1',[debug_info,{i,"../foo"}]}.
 
140
{'*',[debug_info]}.    </code>
 
141
    <p></p>
 
142
  </section>
 
143
</erlref>
 
144