1 |
williamc |
1.1 |
<! Style Sheet Header>
|
2 |
|
|
<html>
|
3 |
|
|
<head>
|
4 |
|
|
<title>SCRAM - Exporting Software Units</title>
|
5 |
|
|
<body>
|
6 |
|
|
<! End Style Sheet Header -----------Insert Text Here --------------------->
|
7 |
|
|
<h1>Exporting Software Units</h1>
|
8 |
|
|
<hr>
|
9 |
|
|
This section describes how to configure a software unit for use by other
|
10 |
|
|
software units. This interface then provides functionality to the
|
11 |
|
|
<Use name=unit_name> tag specified elsewhere in the project.
|
12 |
|
|
<h2>Defining the Interface</h2>
|
13 |
|
|
The interface is defined in the BuildFile in the software unit. Anything
|
14 |
|
|
between <b><export></b> and <b></export></b> tags will be
|
15 |
|
|
taken as defining the interface.<p>
|
16 |
|
|
<p>
|
17 |
|
|
e.g A BuildFile in a SubSystem called CARF.
|
18 |
|
|
<font color=green>
|
19 |
|
|
<pre>
|
20 |
|
|
<export>
|
21 |
|
|
<lib name=G3Main>
|
22 |
|
|
<lib name=G3Event>
|
23 |
|
|
<lib name=Reco>
|
24 |
|
|
<lib name=G3SimEvent>
|
25 |
|
|
<lib name=G3Interface>
|
26 |
|
|
</export>
|
27 |
|
|
</pre>
|
28 |
|
|
</font>
|
29 |
|
|
<p>
|
30 |
|
|
Any file that then wishes to use the subsytem CARF simply has to add the
|
31 |
|
|
following line to their BuildFile.
|
32 |
|
|
<font color=green>
|
33 |
|
|
<pre>
|
34 |
|
|
<Use name=CARF>
|
35 |
|
|
</pre>
|
36 |
|
|
</font>
|
37 |
|
|
<p>
|
38 |
|
|
to get all the apporpriate CARF libraries.<p>
|
39 |
williamc |
1.1.2.1 |
<h2>Package Application</h2>
|
40 |
|
|
By default the specifications between the <export> tags do not propogate
|
41 |
|
|
down into the package. Thus a package will have to use a <Use> tag to
|
42 |
|
|
get its own libraries. <p>
|
43 |
|
|
An alternative model (and the default before version 0_10_0) is to automatically
|
44 |
|
|
propogate the appropriate interface to each of its corresponding packages.
|
45 |
williamc |
1.1.2.2 |
This can be done in the following ways
|
46 |
|
|
<ol><li>Specify in the <export> tag. <p>
|
47 |
|
|
e.g.
|
48 |
|
|
<font color=green>
|
49 |
|
|
<pre>
|
50 |
|
|
<export autoexport=true>
|
51 |
|
|
</pre>
|
52 |
williamc |
1.1.2.3 |
</font>
|
53 |
williamc |
1.1.2.2 |
<li>If this is to be the default behaviour then set
|
54 |
williamc |
1.1.2.1 |
<pre>
|
55 |
|
|
scram_autoexport=true
|
56 |
|
|
</pre>
|
57 |
williamc |
1.1.2.3 |
in the project level BuildFile. This default can be overridden
|
58 |
williamc |
1.1.2.2 |
with <font color=green>
|
59 |
|
|
<pre>
|
60 |
|
|
<export autoexport=false>
|
61 |
|
|
</pre>
|
62 |
williamc |
1.1.2.3 |
</ol>
|
63 |
williamc |
1.1 |
<! Style Sheet Footer ---------------Do not change anything after this line-->
|
64 |
|
|
<hr>
|
65 |
|
|
<table border=1 width=100%>
|
66 |
|
|
<td align=left>
|
67 |
|
|
<a href=mailto:Christopher.Williams@cern.ch
|
68 |
|
|
>Chris Williams</a>
|
69 |
|
|
</td>
|
70 |
|
|
<td align=center>
|
71 |
|
|
<script language="JavaScript">
|
72 |
|
|
<!---//hide script from old browsers
|
73 |
|
|
document.write( "<br>Last updated "+ document.lastModified
|
74 |
|
|
);
|
75 |
|
|
//end hiding contents --->
|
76 |
|
|
</script>
|
77 |
|
|
</td>
|
78 |
|
|
<td align=right>Show <a href=/cgi-cmc/pagestat>Stats</a>
|
79 |
|
|
</td>
|
80 |
|
|
</table>
|
81 |
|
|
</body> </html>
|
82 |
|
|
<! End Style Sheet Footer>
|