build.xml 10 KB
Newer Older
Jerome Locatelli's avatar
Jerome Locatelli committed
1
2
3
4
<?xml version="1.0"?>

<project name="NomadCommandSystem">

5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
	<property name="src" value="src" />
	<property name="classes" value="bin" />
	<property name="lib64" value="lib64"/>
	<property name="lib" value="lib"/>
	<property environment="env" />
	<property name="idlCommonDir" value="${env.NOMAD_HOME}/src/common/corba/idl/common" />
	<property name="idlDataProviderDir" value="${env.NOMAD_HOME}/src/common/corba/idl/dataprovider" />
	<property name="idlCoreDir" value="${env.NOMAD_HOME}/src/common/corba/idl/core" />
	<property name="idlClientDir" value="${env.NOMAD_HOME}/src/common/corba/idl/client" />
	<property name="idlNomadClientLibDir" value="${env.NOMADCLIENT_HOME}/lib/common" />
	<property name="idlNomadClientLib64Dir" value="${env.NOMADCLIENT_HOME}/lib64/common" />
	<property name="clientSrcDir" value="${env.NOMADCLIENT_HOME}/src" />
	<property name="serverSrcDir" value="${env.NOMAD_HOME}/src" />
	<property name="serverLibDir" value="${env.NOMAD_HOME}/lib" />
	<property name="clientCalculatorLibDir" value="${env.NOMADCLIENT_HOME}/lib/common/calculator" />
	<property name="clientCalculatorLib64Dir" value="${env.NOMADCLIENT_HOME}/lib64/common/calculator" />
	<property name="idlFlags" value="-d ${src} -sloppy_forward" />
22
23
24
	
	<property name="protoFlags" value="-I${env.NOMAD_HOME}/src/common/protobuf/proto --java_out=${src}"/>
	<property name="protoDir" value="${env.NOMAD_HOME}/src/common/protobuf/proto"/>
25
26
27
28
29
30
31
32
33
34
35
36

	<target name="init">
		<!-- Create the time stamp -->
		<tstamp />
		<!-- Create directories for project distribution 	-->
		<echo message="Creation classes directory" />
		<mkdir dir="${classes}" />
	</target>

	<target name="idl" depends="init">

		<delete dir="${src}/fr/ill/ics/nomadserver" />
Jerome Locatelli's avatar
Jerome Locatelli committed
37
38
39

		<!-- core -->

40
41
		<echo message="Generating CORBA files" />
		<echo message="" />
Jerome Locatelli's avatar
Jerome Locatelli committed
42

43
		<echo message="Generating ConnectionToken.java" />
Jerome Locatelli's avatar
Jerome Locatelli committed
44
		<exec executable="idl">
45
			<arg line="${idlFlags} ${idlClientDir}/ConnectionToken.idl" />
Jerome Locatelli's avatar
Jerome Locatelli committed
46
47
		</exec>

48
		<echo message="Generating SessionManager.java" />
Jerome Locatelli's avatar
Jerome Locatelli committed
49
		<exec executable="idl">
50
			<arg line="${idlFlags} ${idlCoreDir}/SessionManager.idl" />
Jerome Locatelli's avatar
Jerome Locatelli committed
51
52
		</exec>

53
		<echo message="Generating SessionGateway.java" />
Jerome Locatelli's avatar
Jerome Locatelli committed
54
		<exec executable="idl">
55
			<arg line="${idlFlags} ${idlCoreDir}/SessionGateway.idl" />
Jerome Locatelli's avatar
Jerome Locatelli committed
56
57
		</exec>

58
		<echo message="Generating ServantManager.java" />
Jerome Locatelli's avatar
Jerome Locatelli committed
59
		<exec executable="idl">
60
			<arg line="${idlFlags} ${idlCoreDir}/ServantManager.idl" />
Jerome Locatelli's avatar
Jerome Locatelli committed
61
62
		</exec>

63
		<echo message="Generating DatabaseAccessor.java" />
Jerome Locatelli's avatar
Jerome Locatelli committed
64
		<exec executable="idl">
65
			<arg line="${idlFlags} ${idlCoreDir}/DatabaseAccessor.idl" />
Jerome Locatelli's avatar
Jerome Locatelli committed
66
67
		</exec>

68
		<echo message="Generating CommandZoneAccessor.java" />
Jerome Locatelli's avatar
Jerome Locatelli committed
69
		<exec executable="idl">
70
			<arg line="${idlFlags} ${idlCoreDir}/commandzone/CommandZoneAccessor.idl" />
Jerome Locatelli's avatar
Jerome Locatelli committed
71
72
		</exec>

73
		<echo message="Generating CommandBoxAccessor.java" />
Jerome Locatelli's avatar
Jerome Locatelli committed
74
		<exec executable="idl">
75
			<arg line="${idlFlags} ${idlCoreDir}/commandzone/CommandBoxAccessor.idl" />
Jerome Locatelli's avatar
Jerome Locatelli committed
76
77
		</exec>

78
		<echo message="Generating AtomicCommandBoxAccessor.java" />
Jerome Locatelli's avatar
Jerome Locatelli committed
79
		<exec executable="idl">
80
			<arg line="${idlFlags} ${idlCoreDir}/commandzone/AtomicCommandBoxAccessor.idl" />
Jerome Locatelli's avatar
Jerome Locatelli committed
81
82
		</exec>

83
		<echo message="Generating ScanCommandBoxAccessor.java" />
Jerome Locatelli's avatar
Jerome Locatelli committed
84
		<exec executable="idl">
85
			<arg line="${idlFlags} ${idlCoreDir}/commandzone/ScanCommandBoxAccessor.idl" />
Jerome Locatelli's avatar
Jerome Locatelli committed
86
87
		</exec>

88
		<echo message="Generating ForLoopCommandBoxAccessor.java" />
Jerome Locatelli's avatar
Jerome Locatelli committed
89
		<exec executable="idl">
90
			<arg line="${idlFlags} ${idlCoreDir}/commandzone/ForLoopCommandBoxAccessor.idl" />
Jerome Locatelli's avatar
Jerome Locatelli committed
91
		</exec>
92
93

		<echo message="Generating GenericCommandBoxAccessor.java" />
Jerome Locatelli's avatar
Jerome Locatelli committed
94
		<exec executable="idl">
95
			<arg line="${idlFlags} ${idlCoreDir}/commandzone/GenericCommandBoxAccessor.idl" />
Jerome Locatelli's avatar
Jerome Locatelli committed
96
97
		</exec>

98
		<echo message="Generating ControlCommandBoxAccessor.java" />
99
		<exec executable="idl">
100
			<arg line="${idlFlags} ${idlCoreDir}/commandzone/ControlCommandBoxAccessor.idl" />
101
		</exec>
102
103

		<echo message="Generating CommandBoxDescriptor.java" />
Jerome Locatelli's avatar
Jerome Locatelli committed
104
		<exec executable="idl">
105
			<arg line="${idlFlags} ${idlCoreDir}/commandzone/CommandBoxDescriptor.idl" />
Jerome Locatelli's avatar
Jerome Locatelli committed
106
107
		</exec>

108
		<echo message="Generating CommandZoneEventPublisher.java" />
Jerome Locatelli's avatar
Jerome Locatelli committed
109
		<exec executable="idl">
110
			<arg line="${idlFlags} ${idlCoreDir}/commandzone/CommandZoneEventPublisher.idl" />
Jerome Locatelli's avatar
Jerome Locatelli committed
111
112
		</exec>

113
		<echo message="Generating CommandZoneEventSubscriber.java" />
Jerome Locatelli's avatar
Jerome Locatelli committed
114
		<exec executable="idl">
115
			<arg line="${idlFlags} ${idlCoreDir}/commandzone/CommandZoneEventSubscriber.idl" />
Jerome Locatelli's avatar
Jerome Locatelli committed
116
117
		</exec>

118
		<echo message="Generating ConditionManager.java" />
yannick legoc's avatar
yannick legoc committed
119
		<exec executable="idl">
120
			<arg line="${idlFlags} ${idlCoreDir}/ConditionManager.idl" />
yannick legoc's avatar
yannick legoc committed
121
		</exec>
122

Jerome Locatelli's avatar
Jerome Locatelli committed
123
124
		<!-- common -->

125
126

		<echo message="Generating ListIterator.java" />
Jerome Locatelli's avatar
Jerome Locatelli committed
127
		<exec executable="idl">
128
			<arg line="${idlFlags} ${idlCommonDir}/ListIterator.idl" />
Jerome Locatelli's avatar
Jerome Locatelli committed
129
130
		</exec>

131
		<echo message="Generating ListItem.java" />
Jerome Locatelli's avatar
Jerome Locatelli committed
132
		<exec executable="idl">
133
			<arg line="${idlFlags} ${idlCommonDir}/ListItem.idl" />
Jerome Locatelli's avatar
Jerome Locatelli committed
134
135
		</exec>

136
		<echo message="Generating BaseArrayTransferService.java" />
Jerome Locatelli's avatar
Jerome Locatelli committed
137
		<exec executable="idl">
138
			<arg line="${idlFlags} ${idlCommonDir}/BaseArrayTransferService.idl" />
Jerome Locatelli's avatar
Jerome Locatelli committed
139
140
		</exec>

141
		<echo message="Generating Int8ArrayTransferService.java" />
Jerome Locatelli's avatar
Jerome Locatelli committed
142
		<exec executable="idl">
143
			<arg line="${idlFlags} ${idlCommonDir}/Int8ArrayTransferService.idl" />
Jerome Locatelli's avatar
Jerome Locatelli committed
144
145
		</exec>

146
		<echo message="Generating Int16ArrayTransferService.java" />
Jerome Locatelli's avatar
Jerome Locatelli committed
147
		<exec executable="idl">
148
			<arg line="${idlFlags} ${idlCommonDir}/Int16ArrayTransferService.idl" />
Jerome Locatelli's avatar
Jerome Locatelli committed
149
150
		</exec>

151
		<echo message="Generating Int32ArrayTransferService.java" />
Jerome Locatelli's avatar
Jerome Locatelli committed
152
		<exec executable="idl">
153
			<arg line="${idlFlags} ${idlCommonDir}/Int32ArrayTransferService.idl" />
Jerome Locatelli's avatar
Jerome Locatelli committed
154
		</exec>
155
156

		<echo message="Generating Int64ArrayTransferService.java" />
Jerome Locatelli's avatar
Jerome Locatelli committed
157
		<exec executable="idl">
158
			<arg line="${idlFlags} ${idlCommonDir}/Int64ArrayTransferService.idl" />
Jerome Locatelli's avatar
Jerome Locatelli committed
159
160
		</exec>

161
		<echo message="Generating Float32ArrayTransferService.java" />
Jerome Locatelli's avatar
Jerome Locatelli committed
162
		<exec executable="idl">
163
			<arg line="${idlFlags} ${idlCommonDir}/Float32ArrayTransferService.idl" />
Jerome Locatelli's avatar
Jerome Locatelli committed
164
165
		</exec>

166
		<echo message="Generating Float64ArrayTransferService.java" />
Jerome Locatelli's avatar
Jerome Locatelli committed
167
		<exec executable="idl">
168
			<arg line="${idlFlags} ${idlCommonDir}/Float64ArrayTransferService.idl" />
Jerome Locatelli's avatar
Jerome Locatelli committed
169
170
		</exec>

171
		<echo message="Generating ArrayCopier.java" />
Jerome Locatelli's avatar
Jerome Locatelli committed
172
		<exec executable="idl">
173
			<arg line="${idlFlags} ${idlCommonDir}/ArrayCopier.idl" />
Jerome Locatelli's avatar
Jerome Locatelli committed
174
175
		</exec>

176
		<echo message="Generating Sequences.java" />
Jerome Locatelli's avatar
Jerome Locatelli committed
177
		<exec executable="idl">
178
			<arg line="${idlFlags} ${idlCommonDir}/Sequences.idl" />
Jerome Locatelli's avatar
Jerome Locatelli committed
179
180
		</exec>

181
		<echo message="Generating ReadyIndicator.java" />
Jerome Locatelli's avatar
Jerome Locatelli committed
182
		<exec executable="idl">
183
			<arg line="${idlFlags} ${idlCommonDir}/ReadyIndicator.idl" />
Jerome Locatelli's avatar
Jerome Locatelli committed
184
		</exec>
185
186

		<echo message="Generating DataChangeSubscriber.java" />
Jerome Locatelli's avatar
Jerome Locatelli committed
187
		<exec executable="idl">
188
			<arg line="${idlFlags} ${idlCommonDir}/DataChangeSubscriber.idl" />
Jerome Locatelli's avatar
Jerome Locatelli committed
189
		</exec>
190
191

		<echo message="Generating RemoteConsoleProxy.java" />
Jerome Locatelli's avatar
Jerome Locatelli committed
192
		<exec executable="idl">
193
			<arg line="${idlFlags} ${idlCommonDir}/RemoteConsoleProxy.idl" />
Jerome Locatelli's avatar
Jerome Locatelli committed
194
		</exec>
195
196

		<echo message="Generating RemoteConsoleListener.java" />
Jerome Locatelli's avatar
Jerome Locatelli committed
197
		<exec executable="idl">
198
			<arg line="${idlFlags} ${idlCommonDir}/RemoteConsoleListener.idl" />
Jerome Locatelli's avatar
Jerome Locatelli committed
199
200
		</exec>

201
		<echo message="Generating LogSubscriber.java" />
Jerome Locatelli's avatar
Jerome Locatelli committed
202
		<exec executable="idl">
203
			<arg line="${idlFlags} ${idlCommonDir}/LogSubscriber.idl" />
Jerome Locatelli's avatar
Jerome Locatelli committed
204
205
		</exec>

206
		<echo message="Generating SurveySubscriber.java" />
yannick legoc's avatar
yannick legoc committed
207
		<exec executable="idl">
208
			<arg line="${idlFlags} ${idlCommonDir}/SurveySubscriber.idl" />
yannick legoc's avatar
yannick legoc committed
209
210
		</exec>

Jerome Locatelli's avatar
Jerome Locatelli committed
211
		<!-- data provider -->
212
213

		<echo message="Generating LogPublisher.java" />
Jerome Locatelli's avatar
Jerome Locatelli committed
214
		<exec executable="idl">
215
			<arg line="${idlFlags} ${idlDataProviderDir}/LogPublisher.idl" />
Jerome Locatelli's avatar
Jerome Locatelli committed
216
		</exec>
217
218

		<echo message="Generating SurveyPublisher.java" />
yannick legoc's avatar
yannick legoc committed
219
		<exec executable="idl">
220
			<arg line="${idlFlags} ${idlDataProviderDir}/SurveyPublisher.idl" />
yannick legoc's avatar
yannick legoc committed
221
		</exec>
222

Jerome Locatelli's avatar
Jerome Locatelli committed
223
224
		<!-- command line -->

225
		<echo message="Generating CommandLineProxy.java" />
Jerome Locatelli's avatar
Jerome Locatelli committed
226
		<exec executable="idl">
227
			<arg line="${idlFlags} ${idlCoreDir}/commandline/CommandLineProxy.idl" />
Jerome Locatelli's avatar
Jerome Locatelli committed
228
229
230
		</exec>

	</target>
231
232
233
234
235
236
	
	<target name="proto" depends="init">
		<exec executable="protoc">
			<arg line="${protoFlags} ${protoDir}/ServantConfiguration.proto" />
		</exec>
	</target>
237

238
	<target name="jar" depends="idl,proto">
239
240
		<echo message="Creating nomadCommandSystem.jar" />

Jerome Locatelli's avatar
Jerome Locatelli committed
241
242
		<jar destfile="nomadCommandSystem.jar" basedir="${classes}">
		</jar>
243
244
245
246
247

		<move todir="${idlNomadClientLibDir}">
			<filelist dir="." files="nomadCommandSystem.jar" />
		</move>

Jerome Locatelli's avatar
Jerome Locatelli committed
248
	</target>
249

250
	<target name="jar 64bits" depends="idl,proto">
251
252
		<echo message="Creating nomadCommandSystem.jar for 64bits system" />

Jerome Locatelli's avatar
Jerome Locatelli committed
253
254
		<jar destfile="nomadCommandSystem.jar" basedir="${classes}">
		</jar>
255
256
257
258
259

		<move todir="${idlNomadClientLib64Dir}">
			<filelist dir="." files="nomadCommandSystem.jar" />
		</move>

Jerome Locatelli's avatar
Jerome Locatelli committed
260
	</target>
261

Jerome Locatelli's avatar
Jerome Locatelli committed
262
	<target name="jni">
263
264
		<echo message="Copying Client Calculator files" />

Cristina Cocho's avatar
Cristina Cocho committed
265
		<copy todir="${src}/fr/ill/ics/bridge">
266
			<filelist dir="${serverSrcDir}/core/clientcalculator/fr/ill/ics/bridge" files="ClientCalculator.java" />
Cristina Cocho's avatar
Cristina Cocho committed
267
		</copy>
268

yannick legoc's avatar
yannick legoc committed
269
		<copy todir="${clientCalculatorLibDir}">
270
			<filelist dir="${serverLibDir}" files="libclientcalculator.so" />
yannick legoc's avatar
yannick legoc committed
271
		</copy>
272

yannick legoc's avatar
yannick legoc committed
273
	</target>
274

Jerome Locatelli's avatar
Jerome Locatelli committed
275
	<target name="jni 64bits">
276
277
		<echo message="Copying Client Calculator files for 64 bits system" />

Jerome Locatelli's avatar
Jerome Locatelli committed
278
		<copy todir="${src}/fr/ill/ics/bridge">
279
			<filelist dir="${serverSrcDir}/core/clientcalculator/fr/ill/ics/bridge" files="ClientCalculator.java" />
Jerome Locatelli's avatar
Jerome Locatelli committed
280
		</copy>
281

Jerome Locatelli's avatar
Jerome Locatelli committed
282
		<copy todir="${clientCalculatorLib64Dir}">
283
			<filelist dir="${serverLibDir}" files="libclientcalculator.so" />
Jerome Locatelli's avatar
Jerome Locatelli committed
284
		</copy>
285

Jerome Locatelli's avatar
Jerome Locatelli committed
286
	</target>
287

288
	<target name="compile" depends="idl,proto">
289
290
291
292
		<echo message="Compilation" />

	    <javac srcdir="${src}/fr/ill/ics" destdir="${classes}">
			<classpath>
293
				<pathelement path="${lib}/avalon-framework-4.1.5.jar:${lib}/jacorb.jar:${lib}/logkit-1.2.jar:${lib}/protobuf-java-2.5.0.jar"/>
294
295
296
297
298
			</classpath>
	    </javac>  	

	</target>

299
	<target name="compile 64bits" depends="idl,proto">
300
301
302
303
		<echo message="compilation for 64 bits system" />

	    <javac srcdir="${src}/fr/ill/ics" destdir="${classes}">
			<classpath>
304
				<pathelement path="${lib64}/avalon-framework-4.2.0.jar:${lib64}/jacorb.jar:${lib64}/logkit-2.0.jar:${lib64}/protobuf-2.5.0.jar"/>
305
306
307
308
309
			</classpath>
	    </javac>  	

	</target>

Jerome Locatelli's avatar
Jerome Locatelli committed
310
311
	<target name="all" depends="compile"/>
	<target name="all 64bits" depends="compile 64bits"/>
312

Jerome Locatelli's avatar
Jerome Locatelli committed
313
314
315
316
317
318
</project>