summaryrefslogtreecommitdiff
path: root/jam/index.html
blob: 7bdcc0a5af4b9237a210a15366bff76934e2a86b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
          "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>

<header>
  <meta http-equiv="Content-Type"
        content="text/html; charset=US-ASCII">
  <link rel="stylesheet"
        href="../css/freetype.css">
  <title>An introduction to Jam</title>
</header>

<body text="#000000"
      bgcolor="#FFFFFF"
      link="#0000EF"
      vlink="#51188E"
      alink="#FF0000">

<table width="100%"
       border="0"
       cellspacing="0"
       cellpadding="5">
  <tr>
    <td bgcolor="#06425F">
      <a href="../index.html">
        <img src="../image/fond3.jpg"
             align="right"
             border="0"
             hspace="0"
             vspace="0"
             alt="FreeType Homepage">
      </a>
    </td>
  </tr>

  <tr>
    <td bgcolor="#06425F">
      <h1 class="intro">
        THE JAM BUILDING TOOL
      </h1>
    </td>
  </tr>

  <tr>
    <td bgcolor="#669999">
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#what"
                                             class="index">What</a>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#why"
                                             class="index">Why</a>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#howto"
                                             class="index">How-To</a>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="changes.html"
                                             class="index">Differences</a>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#where"
                                             class="index">Download</a>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#FFFFFF">|</font>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../index.html"
                                                   class="index">Homepage</a>

    </td>
  </tr>
</table>

<table align="center"
       width="80%">
  <tr>
    <td>
      <h1 class=section></h1>

      <h2>Table of contents</h2>

      <ul>
        <a href="#what">What is Jam?</a><br>
        <a href="#where">Where can I get it?</a><br>
        <a href="#why">Why is Jam better than Make?</a><br>
        <a href="#howto">Simple Jam How-To</a><br>
        <a href="#where-ftjam">Where to get FT Jam?</a>
      </ul>

      <h1 class="section">
        <a name="what">
          What is Jam?
        </a>
      </h1>

      <p>Jam is a small open-source build tool that can be used as a
      replacement for Make.  Even though Jam is a lot simpler to use than
      Make, it is far more powerful and easy to master.  It already works on
      a large variety of platforms (Unix, Windows, OS/2, VMS, MacOS, BeOS,
      etc.), it is trivial to port, and its design is sufficiently clear to
      allow any average programmer to extend it with advanced features at
      will.</p>

      <p>The main differences between Jam and Make are as follows.</p>

      <ul>
        <li>
          <p>Jam uses &lsquo;Jamfiles&rsquo; instead of
          &lsquo;Makefiles&rsquo;.</p>
        </li>
        <li>
          <p>Jamfiles do not normally contain toolset-specific rules or
          actions.  They are thus portable among distinct compilers.</p>
        </li>
        <li>
          <p>Jamfiles are a lot simpler than Makefiles to write and
          understand, while providing the same functionality, and much, much
          more.</p>
        </li>
      </ul>

      <p><a href="#top"
            class="index">
          <img src="../image/top.gif"
               width="35"
               height="19"
               align="right"
               border="0"
               hspace="0"
               vspace="0"
               alt="Top"></a></p>

      <hr>

      <h1 class="section">
        <a name="where">
          Where can I get it?
        </a>
      </h1>

      <p>There are currently two versions of Jam available.</p>

      <ul>
        <li>
          <p>The <em>classic Jam</em>, which is available, with
          documentation, from the <a
          href="http://www.perforce.com/documentation/jam">official Jam
          homepage</a> at <a href="http://www.perforce.com">Perforce</a>,
          the original Jam author.</p>
        </li>
        <li>
          <p>An improved version, named <em>&lsquo;FT&nbsp;Jam&rsquo;</em>,
          containing several enhancements (like the ability to run on
          Windows 9x systems, or additional compiler/toolset support).  Look
          <a href="#where-ftjam">here</a> for download information.</p>
        </li>
      </ul>

      <p>We highly recommend that you use FT&nbsp;Jam as it is <em>100%
      backwards compatible</em> with classic Jam and can be used as a
      plug-in replacement for it.  The list of changes between these two
      programs is available <a href="changes.html">here</a>.</p>

      <p>Alternatively, FT&nbsp;Jam exists because Perforce hadn't the time
      to update Jam in a <em>very</em> long time, and we still hope that
      these improvements will be integrated back to classic Jam as soon as
      possible.</p>

      <p><a href="#top"
            class="index">
          <img src="../image/top.gif"
               width="35"
               height="19"
               align="right"
               border="0"
               hspace="0"
               vspace="0"
               alt="Top"></a></p>

      <hr>

      <h1 class="section">
        <a name="why">
          Why is Jam better than Make?
        </a>
      </h2>

      <p>There really are a lot of reasons, we name just a few of
      them.</p>

      <ul>
        <li>
          <p>Compiling simple things with Jam is trivial.  However,
          compiling complex projects (usually with complex directory
          hierarchies) is still very simple.</p>
        </li>
        <li>
          <p>Jam automatically scans source files for <tt>#include</tt>
          statements and computes header dependencies automatically, and it
          does so <em>fast</em>.</p>
        </li>
        <li>
          <p>The Jam language is simple and expressive, and lets you define
          your own build rules, actions, and functions very easily, unlike
          the ALGOL-like syntax of Makefiles.</p>
        </li>
        <li>
          <p>Jam knows about platform-specific directory separators.</p>
        </li>
        <li>
          <p>Jam is fully customizable, and easy to extend.</p>
        </li>
        <li>
          <p>Jam has a tiny footprint, and is a lot faster than Make at
          building large projects (independent of target build times, of
          course).</p>
        </li>
        <li>
          <p>We have already mentioned that you don't need to modify
          Jamfiles in order to compile the same project with distinct
          compilers and toolsets.</p>
        </li>
        <li>
          <p>Jam parses all Jamfiles in a project before beginning to build
          targets.  It knows the full dependency graph and can do parallel
          builds <em>safely</em> with the &lsquo;-j&rsquo; flag.</p>
        </li>
        <li>
          <p>Jam is compatible with Autoconf.  All configuration-specific
          definitions are gathered in a single file named
          &lsquo;Jamrules&rsquo; that is shared by all Jamfiles of the same
          project.  The &lsquo;Jamrules&rsquo; file is generally generated
          by processing a &lsquo;Jamrules.in&rsquo; template with the
          &lsquo;configure&rsquo; script on Unix systems.</p>
        </li>
      </ul>

      <p><a href="#top"
            class="index">
          <img src="../image/top.gif"
               width="35"
               height="19"
               align="right"
               border="0"
               hspace="0"
               vspace="0"
               alt="Top"></a></p>

      <hr>

      <h1 class="section">
        <a name="howto">
          Simple Jam how-to
        </a>
      </h1>

      <p>Assuming that the &lsquo;jam&rsquo; executable is in your path (Visual Studio 
      developers may additionally need to set the environment for command-line building,
      e.g. vcvars32.bat)</p>

      <h3>Building a project</h3>

      <p>Go to the project's top-level directory, then type</p>

      <pre class="code">
  jam</pre>

      <p>If you do not already have the JAM_TOOLSET environment variable
      set, JAM will display the available options.  Set JAM_TOOLSET to the
      value appropriate for your environment.</p>

      <p>Otherwise, this builds your project's file.  In case of error, it
      prints the build command (compilation, link, etc.) that produced
      it.</p>

      <h3>Installing a project</h3>

      <p>Once your project is compiled, type</p>

      <pre class="code">
  jam install</pre>

      <p>This installs the project (on Unix-like systems).</p>

      <h3>Cleaning after a build or install</h3>

      <p>Simply type</p>

      <pre class="code">
  jam clean</pre>

      <p>To clean all temporary targets, i.e., object files, libraries,
      executables, etc.</p>


      <p><a href="#top"
            class="index">
          <img src="../image/top.gif"
               width="35"
               height="19"
               align="right"
               border="0"
               hspace="0"
               vspace="0"
               alt="Top"></a></p>

      <hr>

      <h1 class="section">
        <a name="where-ftjam">
          Where to get FT Jam?
        </a>
      </h1>

      <p>While the official Jam 2.5 (on which the current version of
      FT&nbsp;Jam is based) is available from the <a
      href="http://www.perforce.com/resources/documentation/jam">Jam homepage</a>, we
      provide our modified version in several ways.</p>

      <ul>
        <li>
          <p><b>Through SourceForge</b><br>
          Check the package named <b><tt>ftjam</tt></b> on our <a
          href="https://sourceforge.net/project/showfiles.php?group_id=3157">SourceForge
          download page</a>.  Currently binary packages are available for
          older versions only.</p>
        </li>
        <li>
          <p><b>Through our FTP mirrors</b><br>
          Check the directory <tt>tools/jam</tt> in <a
          href="../download.html#mirrors">one of our mirrors</a>.</p>
        </li>
      </ul>

      <p>The <a href="https://swarm.workshop.perforce.com/files/guest/david_turner/jam">Perforce
      public depot</a> holds older versions of the FT&nbsp;Jam sources.</tt>.

      <p>Note that we no longer provide a CVS module for our Jam sources, in
      order to avoid painful synchonisation issues between the CVS
      repository and the Perforce Public depot.</p>

      <p><a href="#top"
            class="index">
          <img src="../image/top.gif"
               width="35"
               height="19"
               align="right"
               border="0"
               hspace="0"
               vspace="0"
               alt="Top"></a></p>

    </td>
  </tr>
</table>

<font size=-3>Last update: 26-Feb-2015</font>

<table width="100%"
       border="0"
       cellspacing="0"
       cellpadding="5">
  <tr>
    <td bgcolor="#669999">
      &nbsp;&nbsp;&nbsp;&nbsp;<a href="#what"
                                 class="index">What</a>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#why"
                                             class="index">Why</a>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#howto"
                                             class="index">How-To</a>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="changes.html"
                                             class="index">Differences</a>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#where"
                                             class="index">Download</a>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#FFFFFF">|</font>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="../index.html"
                                                   class="index">Homepage</a>
    </td>
  </tr>

  <tr>
    <td bgcolor="#06425F">
      <a href="../index.html">
        <img src="../image/fond3.jpg"
             align="right"
             border="0"
             hspace="0"
             vspace="0"
             alt="FreeType Homepage">
      </a>
    </td>
  </tr>
</table>

</body>
</html>