ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/doc/html/BuildFileExamples.html
Revision: 1.6
Committed: Wed May 15 14:23:32 2002 UTC (23 years ago) by sashby
Content type: text/html
Branch: MAIN
CVS Tags: V0_19_6, V0_19_6p1, V0_19_5, SFATEST, V0_19_4, V0_19_4_pre3
Branch point for: V0_19_4_B
Changes since 1.5: +16 -8 lines
Log Message:
Updated documentation.

File Contents

# User Rev Content
1 williamc 1.5 <body bgcolor=beige>
2     <center>
3 williamc 1.1 <h1>BuildFile Examples</h1>
4 williamc 1.5 <font color=red>S</font>oftware <font color=red>C</font>onfiguration,
5     <font color=red>R</font>elease <font color=red>A</font>nd
6     <font color=red>M</font>anagement
7     </center>
8     <hr>
9 williamc 1.1 <p>
10     The Default Build is configured at the project level. The default can be
11     overridden or parameters passed to the default build rules through the
12     BuildFile.
13    
14 williamc 1.5
15 williamc 1.1 <p>
16     Examples of different build files are shown below
17     <ol>
18 sashby 1.6 <li><b>The Binary Executable</b><p>
19 williamc 1.1 The binary building rules require explicit specification of the binary targets
20     e.g.
21     <p>
22 williamc 1.4 <font color=green>
23 williamc 1.1 <pre>
24 williamc 1.5 &lt;Group name=G3>
25 williamc 1.1 &lt;External ref=X11>
26 williamc 1.5
27     &lt;Environment>
28     &lt;Use name=CARF>
29 williamc 1.4 &lt;Lib name=examplelib></lib>
30 williamc 1.1 &lt;bin file=example1.cpp>
31 williamc 1.2 You can write between bin tags some documentation to describe what the binary
32 williamc 1.5 does. As the bin tag is inside the Environment tags this environment will apply
33     in addition. (i.e example1.cpp will use CARF and the library examplelib as well
34     as X11 and G3)
35 williamc 1.1 &lt;/bin>
36 williamc 1.5 &lt;/Environment>
37    
38 williamc 1.1 &lt;bin file=example2.cpp name=mytestexe>
39 williamc 1.2 Here we call the final binary a different name from the default.
40 williamc 1.1 &lt;/bin>
41     </pre>
42 williamc 1.4 </font>
43 williamc 1.1 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
44 williamc 1.5 external libraries defined by the group G3 and the external package X11.
45     example1 will in addition be built with CARF and examplelib<p>
46 sashby 1.6 <br>
47 williamc 1.2 <ul>
48     <li> Anything Outside of the bin tags will be included in the
49     GNUmakefile. This allows you the full functionality of gmake
50     to make up for any inadequacies. Hopefully as full scram
51     binary functionality is achieved this will be phased out
52 williamc 1.3 </ul>
53 williamc 1.1 <p>
54 sashby 1.6 <li><b>The library BuildFile</b><p>
55 williamc 1.5 You may wish to exclude some files from a
56 williamc 1.1 build or include external package headers or assign the module to a group.
57     <br>e.g.<p>
58 williamc 1.4 <font color=green>
59 williamc 1.1 <pre>
60     &lt;Group name=G3>
61     skip_files := FakeClusterizer.cc SigmaClusterizer.cc
62     </pre>
63 williamc 1.4 </font>
64 williamc 1.5 It is also possible to override the default type of library that is built
65     <br>e.g.<p>
66     <font color=green>
67     <pre>
68     &lt;LibType type=shared>
69     Shared libraries are dynamic!
70     &lt/LibType>
71     &lt;LibType type=debug_shared>
72     But the code still goes wrong
73     &lt/LibType>
74     </pre>
75     </font>
76     To build two shared objects - one with and one without debug information
77     <br>
78     The comments you put between the beginning and end tags will be echoed to the
79     screen at build time
80     <p>
81 sashby 1.6 <li><b>Empty Group</b>
82     <p>
83     Sometimes the default builds aren't wanted at all. Switch them off with
84 williamc 1.1 <p>
85 williamc 1.4 <font color=green>
86 williamc 1.1 <pre>
87     &lt;AssociateGroup>
88     none
89     &lt;/AssociateGroup>
90     </pre>
91 williamc 1.4 </font>
92 williamc 1.5 <p>
93     <h2>Avoiding Processing Parts of BuildFiles</h2>
94     Anything between &lt;ignore> and &lt/ignore> tags will be excluded
95     from processing during the build. This is a convenient mechanism to cut
96     out sections of the BuildFile and is not intended for comments. Comments
97 sashby 1.6 should be provided where apppropriate e.g. in between &lt;bin> and &lt/bin>
98 williamc 1.5 tags.
99 sashby 1.6 <p>
100     <table border=2 width=100%>
101     <td align=left>
102     <a href=mailto:Shaun.Ashby@cern.ch
103     >Shaun Ashby</a>
104     </td>
105     <td align=right>Show <a href=/cgi-cmc/pagestat>Stats</a>
106     </td>
107     </table>
108 williamc 1.5 </body>