forked from CESNET/gridsite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
294 lines (238 loc) · 9.09 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Copyright (c) 2004 on behalf of the EU EGEE Project:
The European Organization for Nuclear Research (CERN),
Istituto Nazionale di Fisica Nucleare (INFN), Italy
Datamat Spa, Italy
Centre National de la Recherche Scientifique (CNRS), France
CS Systeme d'Information (CSSI), France
Royal Institute of Technology, Center for Parallel Computers (KTH-PDC), Sweden
Universiteit van Amsterdam (UvA), Netherlands
University of Helsinki (UH.HIP), Finland
University of Bergen (UiB), Norway
Council for the Central Laboratory of the Research Councils (CCLRC), United Kingdom
Build file for the Gridsite Core Subsystem
Authors: Alberto Di Meglio <[email protected]>
Version info: $Id$
Release: $Name$
Revision history:
$Log$
Revision 1.12 2005/05/23 13:54:53 dimeglio
Added load of build.number file
Revision 1.11 2005/02/16 14:14:39 dimeglio
Added patch to use globus compilation flags also in the RPMS
Revision 1.10 2004/12/17 09:11:43 dimeglio
Added local tag targets (because of special naming rules here)
Revision 1.9 2004/12/17 09:02:49 dimeglio
Removed redefinition of global.prefix
Revision 1.8 2004/12/17 00:32:50 dimeglio
Fixed global.prefix
Revision 1.7 2004/12/03 14:49:59 dimeglio
Added OPENSSL_FLAGS and _LIBS options
Revision 1.6 2004/11/13 10:55:44 glbuild
Added artifacts RPMS directory
Revision 1.5 2004/10/29 22:55:07 dimeglio
Use envset target
Revision 1.4 2004/10/28 23:00:14 dimeglio
Removed post-subsystem entry
Revision 1.3 2004/10/27 11:19:17 dimeglio
Fixed i386 instead of 1386
Revision 1.2 2004/10/27 11:18:38 dimeglio
Use os.platform instead of hard-coded rhel30
Revision 1.1 2004/10/26 17:54:24 dimeglio
First version of this file
-->
<project name="gridsite-core" default="dist">
<description>
Ant build file to build the Gridsite Core Component
</description>
<!-- =========================================
Import properties (order is important)
========================================= -->
<!-- Import baseline & user properties -->
<import file="../org.glite/project/baseline.properties.xml" />
<!-- Import subsystem build properties,
subsystem properties &
subsystem common properties -->
<import file="./project/properties.xml" />
<!-- Import global build properties and global properties -->
<import file="${global.properties.file}" />
<!-- =========================================
Load dependencies properties files (order is important)
========================================= -->
<property file="${user.dependencies.file}"/>
<property file="${subsystem.dependencies.file}"/>
<property file="${global.dependencies.file}"/>
<!-- =========================================
Load configure options
========================================= -->
<import file="${global.configure.options.file}"/>
<import file="${component.configure.options.file}"/>
<!-- =========================================
Import global task definitions
========================================= -->
<import file="${global.taskdefs.file}" />
<!-- =========================================
Import global compiler definitions
========================================= -->
<import file="${global.compilerdefs.file}" />
<!-- =========================================
Import targets
========================================= -->
<import file="${global.targets-common.file}" />
<!-- =========================================
Load version file
========================================= -->
<property file="${module.version.file}"/>
<property file="${module.build.file}"/>
<!-- ===============================================
Public common targets
=============================================== -->
<target name="localinit" depends="envcheck">
<mkdir dir="${stage.dir}" />
<mkdir dir="${dist.dir}" />
</target>
<target name="init" depends="localinit">
<echo>${global.prefix}</echo>
</target>
<target name="checkstyle" depends="init">
</target>
<target name="compile" depends="checkstyle">
<if>
<isset property="libonly"/>
<then>
<property name="buildtarget" value="build-lib"/>
</then>
<else>
<property name="buildtarget" value="build"/>
</else>
</if>
<if>
<isset property="build.make.arguments"/>
<then>
<!-- Call make default compile target -->
<make target="${buildtarget}" dir="${module.src.dir}" failonerror="${failonerror}" args="${build.make.arguments}"/>
</then>
<else>
<!-- Call make default compile target -->
<make target="${buildtarget}" dir="${module.src.dir}" failonerror="${failonerror}"/>
</else>
</if>
</target>
<target name="compiletest" depends="compile">
</target>
<target name="unittest" depends="compiletest">
</target>
<target name="unitcoverage" depends="unittest">
</target>
<target name="doc" depends="unitcoverage">
</target>
<target name="stage" depends="doc">
<if>
<isset property="libonly"/>
<then>
<property name="installtarget" value="install-lib"/>
</then>
<else>
<property name="installtarget" value="install"/>
</else>
</if>
<if>
<isset property="build.make.arguments"/>
<then>
<!-- Call make default compile target -->
<make target="${installtarget}" dir="${module.src.dir}" failonerror="${failonerror}" args="${build.make.arguments}"/>
</then>
<else>
<!-- Call make default compile target -->
<make target="${installtarget}" dir="${module.src.dir}" failonerror="${failonerror}"/>
</else>
</if>
</target>
<target name="dist" depends="stage">
<make target="rpm" dir="${module.src.dir}" failonerror="${failonerror}" args="${build.make.arguments}"/>
<exec dir="${module.dir}/RPMTMP/BUILDROOT/usr" executable="tar">
<arg line="-czf ${module.dir}/gridsite-${module.version}_bin.tar.gz ." />
</exec>
<copy file="gridsite-${module.version}_bin.tar.gz" todir="${dist.dir}"/>
<copy file="gridsite-${module.version}.src.tar.gz" tofile="${dist.dir}/gridsite-${module.version}_src.tar.gz"/>
<copy todir="${dist.dir}/${os.platform}/i386/RPMS">
<fileset dir="${module.dir}/RPMTMP/RPMS/i386">
<include name="*.rpm"/>
</fileset>
</copy>
<delete dir="${module.dir}/RPMS"/>
<mkdir dir="${module.dir}/RPMS"/>
<copy todir="${module.dir}/RPMS">
<fileset dir="${module.dir}/RPMTMP/RPMS/i386">
<include name="*.rpm"/>
</fileset>
</copy>
<delete>
<fileset dir="${module.dir}">
<include name="*.tar.gz"/>
</fileset>
</delete>
<delete dir="RPMTMP"/>
</target>
<target name="install" depends="localinit">
<make target="install" dir="${module.src.dir}" failonerror="${failonerror}"/>
</target>
<target name="all" depends="dist">
</target>
<target name="clean" depends="envcheck">
<property name="offline.repository" value="true" />
<make target="clean" dir="${module.src.dir}" failonerror="false"/>
<delete dir="${module.dir}/src/doxygen"/>
<delete>
<fileset dir="${module.dir}/src">
<include name="*.o"/>
<include name="*.so"/>
<include name="*.so.*"/>
<include name="*.a"/>
<include name="rm -rf urlencode"/>
</fileset>
</delete>
<delete dir="${module.dir}/RPMS"/>
</target>
<target name="cleanAll" depends="clean"/>
<!-- ===============================================
Private targets
=============================================== -->
<!-- ========================================================
tag: Tag module
======================================================== -->
<target name="tag" description="Apply tag.">
<property name="tag.type" value="B"/>
<!-- Set module CVS Label -->
<exec executable="tr" inputstring="${module.version}" outputproperty="cvs.module.version">
<arg line=". _"/>
</exec>
<property name="cvs.label" value="gridsite-core_${tag.type}_${cvs.module.version}_${module.build}" />
<echo>New tag is ${cvs.label}</echo>
<!-- Apply tag -->
<property name="failonerror" value="true"/>
<property name="tag.switch" value="-FR"/>
<exec dir="${workspace.abs.dir}" executable="cvs" failonerror="${failonerror}">
<arg line="tag ${tag.switch} ${cvs.label} ${module.name}" />
</exec>
</target>
<target name="component_release_tag">
<!-- Set module CVS Label -->
<exec executable="tr" inputstring="${module.version}" outputproperty="cvs.module.version">
<arg line=". _"/>
</exec>
<property name="cvs.label" value="gridsite-core_R_${cvs.module.version}" />
<echo>New tag is ${cvs.label}</echo>
<!-- Apply tag -->
<exec dir="${workspace.abs.dir}" executable="cvs" failonerror="true">
<arg line="tag -R ${cvs.label} ${module.name}" />
</exec>
</target>
<!-- ===============================================
Modules proxy targets
=============================================== -->
<!-- component targets definitions tag = do not remove = -->
<!-- Main proxy -->
<target name="buildmodules" depends="envset"/>
</project>