ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/doc/html/BuildFileExamples.html
Revision: 1.4.2.4
Committed: Wed Sep 15 07:53:19 1999 UTC (25 years, 8 months ago) by williamc
Content type: text/html
Branch: V0_9branch
CVS Tags: V0_9_42, V0_9_41, V0_9_40, V0_9_39, V0_9_38, V0_9_37, V0_9_36, V0_9_35, V0_9_34, V0_9_33, V0_9_32, V0_9_31
Changes since 1.4.2.3: +7 -0 lines
Log Message:
Libtype comment description

File Contents

# User Rev Content
1 williamc 1.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 williamc 1.4.2.1
8 williamc 1.1 <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 williamc 1.4 <font color=green>
16 williamc 1.1 <pre>
17 williamc 1.4.2.1 &lt;Group name=G3>
18 williamc 1.1 &lt;External ref=X11>
19 williamc 1.4.2.1 &lt;Use name=CARF>
20 williamc 1.4 &lt;Lib name=examplelib></lib>
21 williamc 1.1 &lt;bin file=example1.cpp>
22 williamc 1.2 You can write between bin tags some documentation to describe what the binary
23     does
24 williamc 1.1 &lt;/bin>
25     &lt;bin file=example2.cpp name=mytestexe>
26 williamc 1.2 Here we call the final binary a different name from the default.
27 williamc 1.1 &lt;/bin>
28     &lt;/Use>
29     &lt;/External>
30     &lt;/External>
31     </pre>
32 williamc 1.4 </font>
33 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
34     external libraries cmsim and X11 as well as a local package from the same
35 williamc 1.2 project called CARF <p>
36     <em><b>Note: Theres still much work to be done here</b></em><br>
37     <ul>
38 williamc 1.4 <li> &lt;/External> and &lt;/Use> tags do not remove the
39 williamc 1.2 external package as you might expect.
40     <li> Anything Outside of the bin tags will be included in the
41     GNUmakefile. This allows you the full functionality of gmake
42     to make up for any inadequacies. Hopefully as full scram
43     binary functionality is achieved this will be phased out
44 williamc 1.3 </ul>
45 williamc 1.1 <p>
46     <li>The library BuildFile
47 williamc 1.4.2.2 You may wish to exclude some files from a
48 williamc 1.1 build or include external package headers or assign the module to a group.
49     <br>e.g.<p>
50 williamc 1.4 <font color=green>
51 williamc 1.1 <pre>
52     &lt;Group name=G3>
53     skip_files := FakeClusterizer.cc SigmaClusterizer.cc
54     </pre>
55 williamc 1.4 </font>
56 williamc 1.4.2.2
57     <br>
58     It is also possible to override the default type of library that is built
59     <br>e.g.<p>
60     <font color=green>
61     <pre>
62     &lt;LibType type=shared>
63 williamc 1.4.2.4 Shared libraries are dynamic!
64     &lt/LibType>
65 williamc 1.4.2.3 &lt;LibType type=debug_shared>
66 williamc 1.4.2.4 But the code still goes wrong
67     &lt/LibType>
68 williamc 1.4.2.2 </pre>
69     </font>
70     To build two shared objects - one with and one without debug information
71 williamc 1.4.2.4 <br>
72     The comments you put between the beginning and end tags will be echoed to the
73     screen at build time
74 williamc 1.4.2.2 <p>
75 williamc 1.1 <li>Empty Group
76     Sometimes the default builds arn't wanted at all. Switch them off with
77     <p>
78 williamc 1.4 <font color=green>
79 williamc 1.1 <pre>
80     &lt;AssociateGroup>
81     none
82     &lt;/AssociateGroup>
83     </pre>
84 williamc 1.4 </font>
85 williamc 1.4.2.1 <p>
86     <h2>Avoiding Processing Parts of BuildFiles</h2>
87     Anything between &lt;ignore> and &lt/ignore> tags will be excluded
88     from processing during the build. This is a convenient mechanism to cut
89     out sections of the BuildFile and is not intended for comments. Comments
90     should be provided where apppropriate e.g. in between &lt;binb> and &lt/bin>
91     tags.