-
Notifications
You must be signed in to change notification settings - Fork 14
/
want.xml
299 lines (244 loc) · 10.2 KB
/
want.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
<!--
WANT - A build management tool.
Copyright (c) 2001-2003 Juancarlo Anez, Caracas, Venezuela.
All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
{ $Id: want.xml 780 2004-05-29 17:23:11Z juanco $ }
This is the Want script for building Want.
See http://www.suigeneris.org/want/ for details.
-->
<project name="want"
basedir="."
default="compile" >
<property name="want.master" value="%{want_master}" />
<property name="old.version" value="?{release.ini:releases:current}" />
<regexp property="old.build" text="${old.version}" pattern="^.*\.([0-9]+)$" subst ="\1" />
<property name="build" value="={1 + ${old.build}}" if="want.master" />
<property name="build" value="${old.build}" unless="want.master" />
<regexp property="version" text="${old.version}" pattern="\.[0-9]*$" subst=".${build}" />
<regexp property="comma.version" pattern="\." subst="," text="${version}" />
<tstamp>
<format property="when" pattern="yyyy,mm,dd,HH,nn,ss" />
<format property="date.tag" pattern="yyyy-mm-dd" />
</tstamp>
<property name="etc" value="${basedir}/etc" />
<property name="src" value="${basedir}/src" />
<property name="doc" value="${basedir}/doc" />
<property name="dist" value="${basedir}/dist" />
<property name="res" value="${basedir}/res" />
<property name="lib" value="${basedir}/lib" />
<property name="test" value="${basedir}/test" />
<property name="examples" value="${basedir}/examples" />
<property name="bin" value="${basedir}/bin" />
<property name="dcu" value="${basedir}/dcu" />
<property name="jcl" value="${lib}/jcl" />
<property name="xml" value="${lib}/xml" />
<property name="paszlib" value="${lib}/paszlib" />
<property name="regexp" value="${lib}/perlre" />
<property name="zipname" value="want-${version}.zip" />
<property name="zipfile" value="${dist}/${zipname}" />
<patternset id="sources" >
<include name="${lib}/" />
<include name="${lib}/jcl/jcl/source" />
<include name="${lib}/jcl/jcl/source/common" />
<include name="${lib}/jcl/jcl/source/windows" />
<include name="${lib}/perlre-1.1" />
<include name="${lib}/dunit" />
<include name="${lib}/dunit/src" />
<include name="${lib}/dcpcrypt2" />
<include name="${lib}/dcpcrypt2/Hashes" />
<include name="${lib}/RegExpr/Source" />
<include name="${lib}/Common" />
<include name="${lib}/StrNatCmp" />
<include name="${lib}/AbstractXML" />
<include name="${src}" />
<include name="${src}/tasks" />
<include name="${src}/input" />
<include name="${src}/elements" />
<include name="${src}/lib" />
<include name="${src}/jal/src" />
<include name="${src}/jal/lib" />
<include name="${src}/jal/lib/paszlib" />
<include name="${src}/win32" />
</patternset>
<patternset id="resources" >
<patternset refid="sources"/>
<include name="${bin}" />
</patternset>
<target name="prepare" >
<mkdir dir="${dcu}" />
<mkdir dir="${bin}" />
<echo message="version=${version}" />
<echo message="build=${build}" />
</target>
<target name="clean" >
<delete dir="${bin}" >
<include name="**" />
<exclude name="ide" />
<exclude name="ide/**" />
</delete>
<delete dir="${dcu}" >
<include name="**" />
<exclude name="ide" />
<exclude name="ide/**" />
</delete>
</target>
<target name="versioninfo" >
<echo message="version=${version}" />
<echo input="${src}/wantver.template.rc" file="${src}/wantver.rc" />
</target>
<target name="resources" depends="prepare,versioninfo" >
<brcc file="${src}/license.rc" output="${src}/license.res" />
<brcc file="${src}/wantver.rc" output="${src}/wantver.res" />
<brcc file="${src}/usage.rc" output="${src}/usage.res" />
</target>
<target name="compile-want" depends="prepare,versioninfo,resources,build">
<dcc basedir="${src}" source="want.dpr">
<exeoutput path="${bin}" />
<dcuoutput path="${dcu}" />
<!-- optimize value="true" / -->
<alldebuginfo value="false" />
<console value="true" />
<hugestrings value="true" />
<define name="USE_JEDI_JCL" />
<define name="DUNIT_DLL" />
<define name="SUPPORTS_WIDESTRING" />
<unitpath refid="sources" />
<includepath refid="sources" />
<resourcepath refid="resources" />
</dcc>
</target>
<target name="compile" depends="compile-want,compile-dof2want">
</target>
<target name="compile-dof2want" depends="prepare,versioninfo,resources,build">
<dcc basedir="dof2want" source="dof2want.dpr">
<exeoutput path="${bin}" />
<dcuoutput path="${dcu}" />
<!-- optimize value="true" / -->
<debug value="true" />
<console value="true" />
<hugestrings value="true" />
<define name="SUPPORTS_WIDESTRING" />
</dcc>
</target>
<target name="test" depends="internal_tests,acceptance_tests" />
<target name="internal_tests" depends="prepare,versioninfo,resources">
<property name="test.app" value="WantTestLib" />
<dcc basedir="${test}" source="${test.app}.dpr" >
<exeoutput path="${bin}" />
<dcuoutput path="${dcu}" />
<build value="true" />
<debug value="true" />
<console value="true" />
<warning name="SYMBOL_PLATFORM" value="off" />
<define name="USE_TEXT_RUNNER" unless="debug" />
<define name="DUNIT_DLL" />
<define name="SUPPORTS_WIDESTRING" />
<unitpath refid="sources" >
<include name="${test}/**" />
<exclude name="${test}/data" />
<exclude name="${test}/data/**" />
</unitpath>
<includepath refid="sources" />
<resourcepath refid="resources" />
</dcc>
<dunit testlib="${bin}/${test.app}" />
</target>
<target name="acceptance_tests" depends="prepare,versioninfo,resources">
<property name="test.app" value="wantAcceptTestLib" />
<dcc basedir="${test}" source="${test.app}.dpr" >
<exeoutput path="${bin}" />
<dcuoutput path="${dcu}" />
<build value="true" />
<debug value="true" />
<console value="true" />
<define name="USE_TEXT_RUNNER" unless="debug" />
<define name="DUNIT_DLL" />
<define name="SUPPORTS_WIDESTRING" />
<unitpath refid="sources" >
<include name="${test}/**" />
<exclude name="${test}/data" />
<exclude name="${test}/data/**" />
</unitpath>
<includepath refid="sources" />
<resourcepath refid="resources" />
</dcc>
<dunit testlib="${bin}/${test.app}" />
</target>
<target name="dist" depends="clean,compile,test,changelog,tag,package,publish" />
<target name="publish" >
<echo input="${doc}/index.template.html" file="${doc}/index.html" />
</target>
<target name="zip" depends="package" />
<target name="package" >
<mkdir dir="${dist}" />
<delete file="${zipfile}" />
<zip zipfile="${zipfile}" >
<exclude name="${dist}/**" />
<include name="${bin}/*.exe" />
<fileset dir="${basedir}" >
<exclude name="private/**" />
<exclude name="${lib}/**" />
<include name="ChangeLog.html" />
<include name="**/*.pas" />
<include name="**/*.dpr" />
<include name="**/*.inc" />
<include name="**/*.rc" />
<include name="**/*.res" />
<include name="**/*.html" />
<include name="**/*.htm" />
<include name="**/*.css" />
<include name="**/*.xml" />
<include name="**/*.gif" />
<include name="**/*.png" />
<include name="**/*.jpg" />
<include name="**/*.jpeg" />
<include name="**/*.txt" />
<include name="**/*.ini" />
<include name="**/*.bat" />
<include name="**/*.obj" />
</fileset>
<include name="${test}/data/**" />
<include name="${lib}/*.zip" /> <!-- include third party library .zips -->
</zip>
</target>
<target name="build" >
<ini file="release.ini" if="want.master" >
<write section="releases" key="current" value="${version}" />
<write section="releases" key="last_date" value="${date.tag}" />
</ini>
</target>
<target name="changelog">
<cvschangelog
destfile="changelog.xml"
start="?{release.ini:releases:last_date}"/>
<style in="changelog.xml" out="ChangeLog.html" style="changelog.xsl">
<param name="title" expression="Want ChangeLog"/>
<param name="module" expression="want"/>
<param name="cvsweb" expression="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/"/>
</style>
<delete file="changelog.xml"/>
</target>
<target name="tag">
<cvs command="commit release.ini"/>
<regexp property="cvs.tag" text="build_${version}" pattern="\." subst="_" />
<cvs command="rtag -R -F ${cvs.tag} ." />
</target>
<target name="tarball">
<exec executable="wget">
<arg value="--quiet" />
<arg value="--output-document=@{want-cvs-${date.tag}.tar.bz2}" />
<arg value="http://cvs.sourceforge.net/cvstarballs/want-cvsroot.tar.bz2" />
</exec>
</target>
</project>