forked from FireBurn/web-agents-public
-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.xml
335 lines (284 loc) · 13.4 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
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
<!--
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
Copyright (c) 2009 Sun Microsystems Inc. All Rights Reserved
The contents of this file are subject to the terms
of the Common Development and Distribution License
(the License). You may not use this file except in
compliance with the License.
You can obtain a copy of the License at
https://opensso.dev.java.net/public/CDDLv1.0.html or
opensso/legal/CDDLv1.0.txt
See the License for the specific language governing
permission and limitations under the License.
When distributing Covered Code, include this CDDL
Header Notice in each file and include the License file
at opensso/legal/CDDLv1.0.txt.
If applicable, add the following below the CDDL Header,
with the fields enclosed by brackets [] replaced by
your own identifying information:
"Portions Copyrighted [year] [name of copyright owner]"
$Id: build.xml,v 1.24 2010/02/05 00:56:01 leiming Exp $
Portions Copyrighted 2010-2016 ForgeRock AS.
-->
<project name="open-source-web-agents" default="usage">
<description>Open Web Single Sign-On Web Agents</description>
<!-- overridable properties -->
<!-- build.debug is used for c code. valid values are: optimize, full -->
<property name="build.debug" value="optimize"/>
<property name="webagents.base.dir" value="."/>
<property name="webagents.built.dir" value="${webagents.base.dir}/build"/>
<property name="prd.nightly.dist.dir" value="${webagents.base.dir}/dist"/>
<property name="target.jdk.set" value="1.6"/>
<property name="build.sysclasspath" value="ignore"/>
<tstamp>
<format property="nightly.date" pattern="yyyyMMdd" />
</tstamp>
<condition property="build.os" value="Linux">
<os name="linux"/>
</condition>
<condition property="build.os" value="SunOS_sparc">
<and>
<os name="sunos"/>
<and>
<os arch="sparc"/>
</and>
</and>
</condition>
<condition property="build.os" value="SunOS_x86">
<and>
<os name="sunos"/>
<and>
<os arch="x86"/>
</and>
</and>
</condition>
<condition property="build.os.ext" value="Linux">
<os name="linux"/>
</condition>
<condition property="build.os.ext" value="SunOS_i86pc">
<and>
<os name="sunos"/>
<and>
<os arch="x86"/>
</and>
</and>
</condition>
<condition property="build.os" value="WINNT">
<os family="windows"/>
</condition>
<condition property="build.os" value="HP-UX">
<os name="hp-ux"/>
</condition>
<condition property="build.os" value="AIX">
<os name="aix"/>
</condition>
<condition property="build.os" value="MacOSX">
<and>
<os family="mac"/>
<os family="unix"/>
</and>
</condition>
<condition property="iis.build.ok" value="true">
<os family="windows"/>
</condition>
<condition property="winnt.lib.ext" value="_64" else="">
<os family="windows" arch="amd64"/>
</condition>
<condition property="winnt.ext" value="_x64" else="">
<os family="windows" arch="amd64"/>
</condition>
<condition property="build.type.suffix" value="_64" else="">
<equals arg1="${build.type}" arg2="64"/>
</condition>
<condition property="build.type.is64Bit" value="1" else="">
<equals arg1="${build.type}" arg2="64"/>
</condition>
<condition property="build.type.isDebug" value="1" else="">
<equals arg1="${DEBUG}" arg2="1"/>
</condition>
<condition property="target.jdk.set" value="${target.jdk}">
<isset property="target.jdk"/>
</condition>
<condition property="target.jdk.set" value="1.5">
<not>
<isset property="target.jdk"/>
</not>
</condition>
<target name="clean">
<antcall target="cleandispatch" />
<antcall target="cleandistribution" />
</target>
<target name="cleandispatch">
<echo message="Dispatch to clean"/>
<exec executable="gmake" failonerror="true">
<arg value="clean" />
</exec>
</target>
<target name="cleandistribution">
<echo message="Remove product distribution folder"/>
<delete dir="${prd.nightly.dist.dir}"/>
</target>
<target name="all_Linux">
<antcall target="apache22" />
<antcall target="postNightlyBuildStep" inheritRefs="true"/>
<antcall target="apache24" />
<antcall target="postNightlyBuildStep" inheritRefs="true"/>
<antcall target="varnish" />
<antcall target="postNightlyBuildStep" inheritRefs="true"/>
<antcall target="varnish3" />
<antcall target="postNightlyBuildStep" inheritRefs="true"/>
</target>
<target name="all_AIX">
<antcall target="apache22" />
<antcall target="postNightlyBuildStep" inheritRefs="true"/>
<antcall target="apache24" />
<antcall target="postNightlyBuildStep" inheritRefs="true"/>
<antcall target="httpserver7" />
<antcall target="postNightlyBuildStep" inheritRefs="true"/>
</target>
<target name="all_Solaris">
<antcall target="apache22" />
<antcall target="postNightlyBuildStep" inheritRefs="true"/>
<antcall target="apache24" />
<antcall target="postNightlyBuildStep" inheritRefs="true"/>
</target>
<target name="all_Windows">
<antcall target="apache22" />
<antcall target="postNightlyBuildStep" inheritRefs="true"/>
<antcall target="apache24" />
<antcall target="postNightlyBuildStep" inheritRefs="true"/>
<antcall target="iis7" />
<antcall target="postNightlyBuildStep" inheritRefs="true"/>
</target>
<target name="apache22">
<echo message="Dispatch to Apache 22"/>
<property name="containername" value="apache22zip"/>
<antcall target="gmake" inheritRefs="true"/>
</target>
<target name="apache24">
<echo message="Dispatch to Apache 24"/>
<property name="containername" value="apachezip"/>
<antcall target="gmake" inheritRefs="true"/>
</target>
<target name="httpserver7">
<echo message="Dispatch to IBM HTTP Server 7"/>
<property name="containername" value="ibmhttp7zip"/>
<antcall target="gmake" inheritRefs="true"/>
</target>
<target name="check.build.iis">
<condition property="build.iis">
<and>
<os family="windows"/>
<equals arg1="${build.type}" arg2="64"/>
</and>
</condition>
</target>
<target name="iis7" depends="check.build.iis" if="build.iis">
<echo message="Dispatch to IIS7"/>
<property name="containername" value="iiszip"/>
<antcall target="gmake" inheritRefs="true"/>
</target>
<target name="check.build.varnish">
<condition property="build.varnish">
<and>
<os name="linux"/>
<equals arg1="${build.type}" arg2="64"/>
</and>
</condition>
</target>
<target name="varnish" depends="check.build.varnish" if="build.varnish">
<echo message="Dispatch to Varnish4"/>
<property name="containername" value="varnishzip"/>
<antcall target="gmake" inheritRefs="true"/>
</target>
<target name="varnish3" depends="check.build.varnish" if="build.varnish">
<echo message="Dispatch to Varnish3"/>
<property name="containername" value="varnish3zip"/>
<antcall target="gmake" inheritRefs="true"/>
</target>
<target name="gmake">
<echo message="Dispatch to compile of agent c code"/>
<exec executable="gmake" failonerror="true">
<arg value="64=${build.type.is64Bit}" />
<arg value="DEBUG=${build.type.isDebug}" />
<arg value="${containername}" />
</exec>
</target>
<target name="upgradesvn">
<echo message="Run 'svn upgrade' so 'svn info' won't fail horribly because of 'working copy is too old' messages"/>
<exec executable="svn" failonerror="false">
<arg value="upgrade" />
</exec>
</target>
<target name="nightly_Linux">
<echo file="${prd.nightly.dist.dir}/webagents/${nightly.date}/Apache-v2.2-${build.os}-${build.type}-build_date.js" append="false">var apache_v22_${build.os}${build.type.suffix}_build_date = "${nightly.date}";
</echo>
<echo file="${prd.nightly.dist.dir}/webagents/${nightly.date}/Apache-v2.4-${build.os}-${build.type}-build_date.js" append="false">var apache_v24_${build.os}${build.type.suffix}_build_date = "${nightly.date}";
</echo>
<echo file="${prd.nightly.dist.dir}/webagents/${nightly.date}/Varnish-v3-${build.os}-${build.type}-build_date.js" append="false">var varnish_v3_${build.os}${build.type.suffix}_build_date = "${nightly.date}";
</echo>
<echo file="${prd.nightly.dist.dir}/webagents/${nightly.date}/Varnish-v4-${build.os}-${build.type}-build_date.js" append="false">var varnish_v4_${build.os}${build.type.suffix}_build_date = "${nightly.date}";
</echo>
<antcall target="all_Linux" inheritRefs="true"/>
</target>
<target name="nightly_Solaris">
<echo file="${prd.nightly.dist.dir}/webagents/${nightly.date}/Apache-v2.2-${build.os}-${build.type}-build_date.js" append="false">var apache_v22_${build.os}${build.type.suffix}_build_date = "${nightly.date}";
</echo>
<echo file="${prd.nightly.dist.dir}/webagents/${nightly.date}/Apache-v2.4-${build.os}-${build.type}-build_date.js" append="false">var apache_v24_${build.os}${build.type.suffix}_build_date = "${nightly.date}";
</echo>
<antcall target="all_Solaris" inheritRefs="true"/>
</target>
<target name="nightly_AIX6">
<echo file="${prd.nightly.dist.dir}/webagents/${nightly.date}/Apache-v2.2-${build.os}6-${build.type}-build_date.js" append="false">var apache_v22_${build.os}6${build.type.suffix}_build_date = "${nightly.date}";
</echo>
<echo file="${prd.nightly.dist.dir}/webagents/${nightly.date}/Apache-v2.4-${build.os}6-${build.type}-build_date.js" append="false">var apache_v24_${build.os}6${build.type.suffix}_build_date = "${nightly.date}";
</echo>
<antcall target="all_AIX" inheritRefs="true"/>
</target>
<target name="nightly_AIX7">
<echo file="${prd.nightly.dist.dir}/webagents/${nightly.date}/Apache-v2.2-${build.os}7-${build.type}-build_date.js" append="false">var apache_v22_${build.os}7${build.type.suffix}_build_date = "${nightly.date}";
</echo>
<echo file="${prd.nightly.dist.dir}/webagents/${nightly.date}/Apache-v2.4-${build.os}7-${build.type}-build_date.js" append="false">var apache_v24_${build.os}7${build.type.suffix}_build_date = "${nightly.date}";
</echo>
<antcall target="all_AIX" inheritRefs="true"/>
</target>
<target name="nightly_Windows">
<echo file="${prd.nightly.dist.dir}/webagents/${nightly.date}/Apache-v2.2-${build.os}-${build.type}-build_date.js" append="false">var apache_v22_${build.os}${build.type.suffix}_build_date = "${nightly.date}";
</echo>
<echo file="${prd.nightly.dist.dir}/webagents/${nightly.date}/Apache-v2.4-${build.os}-${build.type}-build_date.js" append="false">var apache_v24_${build.os}${build.type.suffix}_build_date = "${nightly.date}";
</echo>
<echo file="${prd.nightly.dist.dir}/webagents/${nightly.date}/IIS-v7-${build.os}-${build.type}-build_date.js" append="false">var iis_v7_${build.os}${build.type.suffix}_build_date = "${nightly.date}";
</echo>
<antcall target="all_Windows" inheritRefs="true"/>
</target>
<target name="postNightlyBuildStep">
<copy todir="${prd.nightly.dist.dir}/webagents/${nightly.date}">
<fileset dir="${webagents.built.dir}" >
<include name="*.zip"/>
</fileset>
</copy>
</target>
<target name="usage">
<echo message=" "/>
<echo message=" Following targets are available for Web Agents:"/>
<echo message=" "/>
<echo message=" all_Linux : builds all the Linux Web agents"/>
<echo message=" all_AIX : builds all the AIX Web agents"/>
<echo message=" all_Windows : builds all the Windows Web agents"/>
<echo message=" all_Solaris : builds all the relevant Solaris Web agents"/>
<echo message=" clean : deletes all the generated files"/>
<echo message=" upgradesvn : this is a fudge to avoid 'workspace is too old' messages when 'svn info' is run"/>
<echo message=" apache22 : builds the Apache Web Server 2.2.x agent"/>
<echo message=" apache24 : builds the Apache Web Server 2.4.x agent"/>
<echo message=" httpserver7 : builds the IBM HTTP Server 7 agent"/>
<echo message=" iis7 : builds the Microsoft Internet Information Services 7 agent"/>
<echo message=" varnish : builds the Varnish Cache Server 4.1.x agent"/>
<echo message=" varnish3 : builds the Varnish Cache Server 3.0.7 agent"/>
<echo message=" usage : displays this usage message"/>
<echo message=" "/>
<echo message=" To run a target, issue the following command:"/>
<echo message=" "/>
<echo message=" ant <target-name>"/>
<echo message=" "/>
</target>
</project>