ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/doc/html/BuildFileExamples.html
Revision: 1.4.2.5
Committed: Wed Oct 13 13:42:52 1999 UTC (25 years, 7 months ago) by williamc
Content type: text/html
Branch: V0_9branch
CVS Tags: V0_10_0beta
Changes since 1.4.2.4: +10 -9 lines
Log Message:
Add Environment tag description

File Contents

# Content
1 <h1>BuildFile Examples</h1>
2 <p>
3 The Default Build is configured at the project level. The default can be
4 overridden or parameters passed to the default build rules through the
5 BuildFile.
6
7
8 <p>
9 Examples of different build files are shown below
10 <ol>
11 <li>The Binary Executable<p>
12 The binary building rules require explicit specification of the binary targets
13 e.g.
14 <p>
15 <font color=green>
16 <pre>
17 &lt;Group name=G3>
18 &lt;External ref=X11>
19
20 &lt;Environment>
21 &lt;Use name=CARF>
22 &lt;Lib name=examplelib></lib>
23 &lt;bin file=example1.cpp>
24 You can write between bin tags some documentation to describe what the binary
25 does. As the bin tag is inside the Environment tags this environment will apply
26 in addition. (i.e example1.cpp will use CARF and the library examplelib as well
27 as X11 and G3)
28 &lt;/bin>
29 &lt;/Environment>
30
31 &lt;bin file=example2.cpp name=mytestexe>
32 Here we call the final binary a different name from the default.
33 &lt;/bin>
34 </pre>
35 </font>
36 This file will build two executables called (example1 and mytestexe) from files example1.cpp and example2.cpp respectively. Both are built in the context of
37 external libraries defined by the group G3 and the external package X11.
38 example1 will in addition be built with CARF and examplelib<p>
39 <em><b>Note: Theres still work to be done here</b></em><br>
40 <ul>
41 <li> Anything Outside of the bin tags will be included in the
42 GNUmakefile. This allows you the full functionality of gmake
43 to make up for any inadequacies. Hopefully as full scram
44 binary functionality is achieved this will be phased out
45 </ul>
46 <p>
47 <li>The library BuildFile
48 You may wish to exclude some files from a
49 build or include external package headers or assign the module to a group.
50 <br>e.g.<p>
51 <font color=green>
52 <pre>
53 &lt;Group name=G3>
54 skip_files := FakeClusterizer.cc SigmaClusterizer.cc
55 </pre>
56 </font>
57
58 <br>
59 It is also possible to override the default type of library that is built
60 <br>e.g.<p>
61 <font color=green>
62 <pre>
63 &lt;LibType type=shared>
64 Shared libraries are dynamic!
65 &lt/LibType>
66 &lt;LibType type=debug_shared>
67 But the code still goes wrong
68 &lt/LibType>
69 </pre>
70 </font>
71 To build two shared objects - one with and one without debug information
72 <br>
73 The comments you put between the beginning and end tags will be echoed to the
74 screen at build time
75 <p>
76 <li>Empty Group
77 Sometimes the default builds arn't wanted at all. Switch them off with
78 <p>
79 <font color=green>
80 <pre>
81 &lt;AssociateGroup>
82 none
83 &lt;/AssociateGroup>
84 </pre>
85 </font>
86 <p>
87 <h2>Avoiding Processing Parts of BuildFiles</h2>
88 Anything between &lt;ignore> and &lt/ignore> tags will be excluded
89 from processing during the build. This is a convenient mechanism to cut
90 out sections of the BuildFile and is not intended for comments. Comments
91 should be provided where apppropriate e.g. in between &lt;binb> and &lt/bin>
92 tags.