1 | <html> |
---|
2 | <head> |
---|
3 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
---|
4 | <title>Writing Jamfiles</title> |
---|
5 | <link rel="stylesheet" href="../../boostbook.css" type="text/css"> |
---|
6 | <meta name="generator" content="DocBook XSL Stylesheets V1.69.1"> |
---|
7 | <style type="text/css"> |
---|
8 | body { background-image: url('http://docbook.sourceforge.net/release/images/draft.png'); |
---|
9 | background-repeat: no-repeat; |
---|
10 | background-position: top left; |
---|
11 | /* The following properties make the watermark "fixed" on the page. */ |
---|
12 | /* I think that's just a bit too distracting for the reader... */ |
---|
13 | /* background-attachment: fixed; */ |
---|
14 | /* background-position: center center; */ |
---|
15 | }</style> |
---|
16 | <link rel="start" href="../../index.html" title="The Boost C++ Libraries"> |
---|
17 | <link rel="up" href="../reference.html" title="Chapter 26. Detailed reference"> |
---|
18 | <link rel="prev" href="../reference.html" title="Chapter 26. Detailed reference"> |
---|
19 | <link rel="next" href="buildprocess.html" title="Build process"> |
---|
20 | </head> |
---|
21 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
---|
22 | <table cellpadding="2" width="100%"> |
---|
23 | <td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../../../boost.png"></td> |
---|
24 | <td align="center"><a href="../../../../index.htm">Home</a></td> |
---|
25 | <td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td> |
---|
26 | <td align="center"><a href="../../../../people/people.htm">People</a></td> |
---|
27 | <td align="center"><a href="../../../../more/faq.htm">FAQ</a></td> |
---|
28 | <td align="center"><a href="../../../../more/index.htm">More</a></td> |
---|
29 | </table> |
---|
30 | <hr> |
---|
31 | <div class="spirit-nav"> |
---|
32 | <a accesskey="p" href="../reference.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="buildprocess.html"><img src="../../images/next.png" alt="Next"></a> |
---|
33 | </div> |
---|
34 | <div class="section" lang="en"> |
---|
35 | <div class="titlepage"><div><div><h2 class="title" style="clear: both"> |
---|
36 | <a name="bbv2.reference.jamfiles"></a>Writing Jamfiles</h2></div></div></div> |
---|
37 | <div class="toc"><dl><dt><span class="section"><a href="jamfiles.html#bbv2.reference.headers">Generated headers</a></span></dt></dl></div> |
---|
38 | <p>This section describes specific information about writing Jamfiles.</p> |
---|
39 | <div class="section" lang="en"> |
---|
40 | <div class="titlepage"><div><div><h3 class="title"> |
---|
41 | <a name="bbv2.reference.headers"></a>Generated headers</h3></div></div></div> |
---|
42 | <p>Usually, Boost.Build handles implicit dependendies completely |
---|
43 | automatically. For example, for C++ files, all <code class="literal">#include</code> |
---|
44 | statements are found and handled. The only aspect where user help |
---|
45 | might be needed is implicit dependency on generated files.</p> |
---|
46 | <p>By default, Boost.Build handles such dependencies within one |
---|
47 | main target. For example, assume that main target "app" has two |
---|
48 | sources, "app.cpp" and "parser.y". The latter source is converted |
---|
49 | into "parser.c" and "parser.h". Then, if "app.cpp" includes |
---|
50 | "parser.h", Boost.Build will detect this dependency. Moreover, |
---|
51 | since "parser.h" will be generated into a build directory, the |
---|
52 | path to that directory will automatically added to include |
---|
53 | path.</p> |
---|
54 | <p>Making this mechanism work across main target boundaries is |
---|
55 | possible, but imposes certain overhead. For that reason, if |
---|
56 | there's implicit dependency on files from other main targets, the |
---|
57 | <code class="literal"><implicit-dependency></code> [ link ] feature must |
---|
58 | be used, for example:</p> |
---|
59 | <pre class="programlisting"> |
---|
60 | lib parser : parser.y ; |
---|
61 | exe app : app.cpp : <implicit-dependency>parser ; |
---|
62 | </pre> |
---|
63 | <p> |
---|
64 | The above example tells the build system that when scanning |
---|
65 | all sources of "app" for implicit-dependencies, it should consider |
---|
66 | targets from "parser" as potential dependencies. |
---|
67 | </p> |
---|
68 | </div> |
---|
69 | </div> |
---|
70 | <table width="100%"><tr> |
---|
71 | <td align="left"></td> |
---|
72 | <td align="right"><small></small></td> |
---|
73 | </tr></table> |
---|
74 | <hr> |
---|
75 | <div class="spirit-nav"> |
---|
76 | <a accesskey="p" href="../reference.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="buildprocess.html"><img src="../../images/next.png" alt="Next"></a> |
---|
77 | </div> |
---|
78 | </body> |
---|
79 | </html> |
---|