ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/doc/html/configBuildFile.html
Revision: 1.1.2.3.4.1
Committed: Mon Oct 23 10:55:06 2000 UTC (24 years, 6 months ago) by williamc
Content type: text/html
Branch: V0_15branch
CVS Tags: V0_16_4, V0_16_3, V0_16_2, V0_16_1, V0_16_0
Branch point for: V0_16branch
Changes since 1.1.2.3: +13 -2 lines
Log Message:
update doc for ProcessStroe tag

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 williamc 1.1.2.3.4.1 with directory structure and set up the directory structures for the
24     BuildSystem. You may also want to set project wide defaults.
25 williamc 1.1.2.1 <p>
26 williamc 1.1.2.3.4.1 <h3>Defining Project Structure</h3>
27     You need to tell SCRAM where it can store such things as libraries, binaries
28     and other build products. You do this with the
29     <a href=BuildFile/tag_ProductStore.html>&lt;ProductStore></a> tag
30     <p>
31     <b>Example</b><p>
32     <font color=green>
33     &lt;ProductStore name=lib type=arch><br>
34     &lt;ProductStore name=bin type=arch><br>
35     </font>
36     <h3>Using the <a href=BuildFile/tag_ClassPath.html>&lt;ClassPath></a> tag</h3>
37 williamc 1.1.2.1 This tag tells SCRAM which BuildFile to associate with a particular location in
38     the src tree.<p>
39     Format:<br>
40     &lt;ClassPath path=<em>[pattern_match]+BuildFileName/../....</em>>
41     <p>
42     <b>Example</b>
43     <font color=green>
44     <pre>
45     &lt;ClassPath path=+TopLevel/+SubSystem/+Package/src+library>
46     &lt;ClassPath path=+TopLevel/+SubSystem/+Package/test+UnitTest>
47     </pre>
48     </font>
49     This will associate the top level src directory with the BuildFile
50     <em>config/TopLevel_BuildFile</em> (or config/TopLevel_makefile.mk). Any
51     directory in the next level below with <em>config/SubSystem_BuildFile</em>
52     , the level below that with <em>config/Package_BuildFile</em>.
53     The last element in the path has a pattern matching string before the +, thus
54     only directories called <em>src</em> at the 3rd level below the top level
55 williamc 1.1.2.3 will be mapped to <em>config/library_BuildFile</em>.
56 williamc 1.1.2.1 The second tag in the BuildFile has the same structure except it maps
57     directories called <em>test</em> at this level to
58     <em>config/UnitTest_BuildFile</em>.
59 williamc 1.1.2.3 Any that do not match a ClassPath will be
60     mapped to DEFAULT_BuildFile (which must exist).
61     <br>
62 williamc 1.1.2.1 <p>
63     In a case where multiple &lt;ClassPath> tags are defined it is always the last
64     one that matches the stated path that is taken.
65     <h2>Structure BuildFiles</h2>
66     These are the BuildFles that the &lt;ClassPath> tags described above refer to.
67     They must exist in the project configuration directory. Their purpose is
68     to define default build behaviour and default settings that is to be associated
69     with a location. The &lt;Build> tag can be used here to specify build products
70     Note that anything outside of tags is standard gmake.
71     <p>
72     <b>Example <em>library_BuildFile</em></b>
73     <font color=green>
74     <pre>
75     # The called target is the name of the BuildFile
76     library : lib
77    
78     # take packagename as being one directory up
79     packagetemp=$(shell echo $(dir $(ClassDir)) | sed -e 's/\(.*\)\//\1/' )
80     packagename=$(notdir $(packagetemp))
81    
82 williamc 1.1.2.2 # Pick Up some source files - exclude by setting skip_files in local BuildFile
83     # $(LOCALTOP) and $(ClassDir) are defined by SCRAM - use like this point to
84     # the current src directory location
85 williamc 1.1.2.1 files:=$(notdir $(wildcard $(LOCALTOP)/$(ClassDir)/*.cc))
86     files+=$(notdir $(wildcard $(LOCALTOP)/$(ClassDir)/*.c))
87     files+=$(notdir $(wildcard $(LOCALTOP)/$(ClassDir)/*.cpp))
88     files:=$(filter-out $(skip_files), $(files))
89    
90     # Build a library with the same name as the package from files
91     &lt;Build class=lib name="$(packagename)" src=$(files) default=shared_debug>
92     </pre>
93     </font>
94    
95    
96     <! Style Sheet Footer ---------------Do not change anything after this line-->
97     <hr>
98     <table border=1 width=100%>
99     <td align=left>
100     <a href=mailto:Christopher.Williams@cern.ch
101     >Chris Williams</a>
102     </td>
103     <td align=center>
104 williamc 1.1.2.3 Last Updated Thu Jun 15 18:57:17 2000
105 williamc 1.1.2.1 </td>
106     <td align=right><a href=/cgi-cmc/pagestat>Show Stats</a>
107     </td>
108     </table>
109     </body> </html>
110     <! End Style Sheet Footer>