ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/doc/html/configBuildFile.html
Revision: 1.1.2.1
Committed: Thu Jun 15 16:41:13 2000 UTC (24 years, 11 months ago) by williamc
Content type: text/html
Branch: V0_9branch
Changes since 1.1: +96 -0 lines
Log Message:
new BuildFile documentation

File Contents

# User Rev Content
1 williamc 1.1.2.1 <! Style Sheet Header>
2     <html>
3     <head>
4     <title>configBuildFile.html</title>
5     <body bgcolor=beige>
6     <! End Style Sheet Header -----------Insert Text Here --------------------->
7     <center>
8     <h1>Project Level BuildFiles</h1>
9     <font color=red>S</font>oftware <font color=red>C</font>onfiguration,
10     <font color=red>R</font>elease <font color=red>A</font>nd
11     <font color=red>M</font>anagement
12     </center>
13     <hr>
14     <h2>Purpose of the BuildFiles</h2>
15    
16     At the configuration level the BuildFile is generally used to set up project
17     wide defaults and associate src code structure with building rules.
18     <p>
19     <h2>The main configuration BuildFile</h2>
20     The file <em>config/BuildFile</em> is resourced by all others in the entire
21     tree. It controls everything else. The most important thing to set here is the
22     &lt;ClassPath> tags which associate <a href=#Structural>Structure BuildFiles</a>
23     with directory structure. You may also want to set project wide defaults.
24     <p>
25     <h3>Using the &lt;ClassPath> tag</h3>
26     This tag tells SCRAM which BuildFile to associate with a particular location in
27     the src tree.<p>
28     Format:<br>
29     &lt;ClassPath path=<em>[pattern_match]+BuildFileName/../....</em>>
30     <p>
31     <b>Example</b>
32     <font color=green>
33     <pre>
34     &lt;ClassPath path=+TopLevel/+SubSystem/+Package/src+library>
35     &lt;ClassPath path=+TopLevel/+SubSystem/+Package/test+UnitTest>
36     </pre>
37     </font>
38     This will associate the top level src directory with the BuildFile
39     <em>config/TopLevel_BuildFile</em> (or config/TopLevel_makefile.mk). Any
40     directory in the next level below with <em>config/SubSystem_BuildFile</em>
41     , the level below that with <em>config/Package_BuildFile</em>.
42     The last element in the path has a pattern matching string before the +, thus
43     only directories called <em>src</em> at the 3rd level below the top level
44     will be mapped to <em>config/library_BuildFile</em>. Any others will be
45     mapped to DEFAULT_BuildFile (which must exist).
46     <br>
47     The second tag in the BuildFile has the same structure except it maps
48     directories called <em>test</em> at this level to
49     <em>config/UnitTest_BuildFile</em>.
50     <p>
51     In a case where multiple &lt;ClassPath> tags are defined it is always the last
52     one that matches the stated path that is taken.
53     <h2>Structure BuildFiles</h2>
54     These are the BuildFles that the &lt;ClassPath> tags described above refer to.
55     They must exist in the project configuration directory. Their purpose is
56     to define default build behaviour and default settings that is to be associated
57     with a location. The &lt;Build> tag can be used here to specify build products
58     Note that anything outside of tags is standard gmake.
59     <p>
60     <b>Example <em>library_BuildFile</em></b>
61     <font color=green>
62     <pre>
63     # The called target is the name of the BuildFile
64     library : lib
65    
66     # take packagename as being one directory up
67     packagetemp=$(shell echo $(dir $(ClassDir)) | sed -e 's/\(.*\)\//\1/' )
68     packagename=$(notdir $(packagetemp))
69    
70     # Pick Up some source files - excluse by setting skip_files in local BuildFile
71     files:=$(notdir $(wildcard $(LOCALTOP)/$(ClassDir)/*.cc))
72     files+=$(notdir $(wildcard $(LOCALTOP)/$(ClassDir)/*.c))
73     files+=$(notdir $(wildcard $(LOCALTOP)/$(ClassDir)/*.cpp))
74     files:=$(filter-out $(skip_files), $(files))
75    
76     # Build a library with the same name as the package from files
77     &lt;Build class=lib name="$(packagename)" src=$(files) default=shared_debug>
78     </pre>
79     </font>
80    
81    
82     <! Style Sheet Footer ---------------Do not change anything after this line-->
83     <hr>
84     <table border=1 width=100%>
85     <td align=left>
86     <a href=mailto:Christopher.Williams@cern.ch
87     >Chris Williams</a>
88     </td>
89     <td align=center>
90     Last Updated Thu Jun 15 17:22:00 2000
91     </td>
92     <td align=right><a href=/cgi-cmc/pagestat>Show Stats</a>
93     </td>
94     </table>
95     </body> </html>
96     <! End Style Sheet Footer>