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