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 |
|
|
This can be done by writing
|
46 |
|
|
<pre>
|
47 |
|
|
scram_autoexport=true
|
48 |
|
|
</pre>
|
49 |
|
|
either in the project level BuildFile or just <em>before</em> The export
|
50 |
|
|
interface itself.
|
51 |
williamc |
1.1 |
<! Style Sheet Footer ---------------Do not change anything after this line-->
|
52 |
|
|
<hr>
|
53 |
|
|
<table border=1 width=100%>
|
54 |
|
|
<td align=left>
|
55 |
|
|
<a href=mailto:Christopher.Williams@cern.ch
|
56 |
|
|
>Chris Williams</a>
|
57 |
|
|
</td>
|
58 |
|
|
<td align=center>
|
59 |
|
|
<script language="JavaScript">
|
60 |
|
|
<!---//hide script from old browsers
|
61 |
|
|
document.write( "<br>Last updated "+ document.lastModified
|
62 |
|
|
);
|
63 |
|
|
//end hiding contents --->
|
64 |
|
|
</script>
|
65 |
|
|
</td>
|
66 |
|
|
<td align=right>Show <a href=/cgi-cmc/pagestat>Stats</a>
|
67 |
|
|
</td>
|
68 |
|
|
</table>
|
69 |
|
|
</body> </html>
|
70 |
|
|
<! End Style Sheet Footer>
|