1 | <?xml version="1.0" encoding="UTF-8"?> |
---|
2 | <project xmlns="antlib:org.apache.tools.ant" |
---|
3 | name="abcl-master" default="abcl.wrapper" basedir="."> |
---|
4 | <description>Compiling, testing, and packaging Armed Bear Common Lisp</description> |
---|
5 | |
---|
6 | <target name="abcl" depends="abcl.wrapper"/> |
---|
7 | |
---|
8 | <property file="build.properties"/> |
---|
9 | |
---|
10 | <property name="build.dir" |
---|
11 | value="${basedir}/build"/> |
---|
12 | <property name="build.classes.dir" |
---|
13 | value="${build.dir}/classes"/> |
---|
14 | <property name="src.dir" |
---|
15 | value="${basedir}/src"/> |
---|
16 | <property name="dist.dir" |
---|
17 | value="${basedir}/dist"/> |
---|
18 | <property name="abcl.jar.path" |
---|
19 | value="${dist.dir}/abcl.jar"/> |
---|
20 | <property name="abcl.ext.dir" |
---|
21 | value="${basedir}/ext"/> |
---|
22 | |
---|
23 | <target name="help"> |
---|
24 | <echo>Main Ant targets: |
---|
25 | abcl.compile |
---|
26 | -- compile ABCL to ${build.classes.dir}. |
---|
27 | abcl.jar |
---|
28 | -- create packaged ${abcl.jar.path}. |
---|
29 | abcl.wrapper |
---|
30 | -- create executable wrapper for ABCL. |
---|
31 | abcl.source.zip abcl.source.tar |
---|
32 | -- create source distributions in ${dist.dir}. |
---|
33 | abcl.test.java |
---|
34 | -- Run junit tests under ${abcl.test.src.dir}. |
---|
35 | abcl.clean |
---|
36 | -- remove ABCL intermediate files</echo> |
---|
37 | <echo>Corresponding targets for J have been removed.</echo> |
---|
38 | </target> |
---|
39 | |
---|
40 | <!-- Checks if JSR-223 support is available - thanks to Mark Evenson --> |
---|
41 | <available property="abcl.jsr-223.p" |
---|
42 | classname="javax.script.ScriptEngine"/> |
---|
43 | |
---|
44 | <patternset id="abcl.source.java"> |
---|
45 | <include name="org/armedbear/lisp/*.java"/> |
---|
46 | <include name="org/armedbear/lisp/util/*.java"/> |
---|
47 | <include name="org/armedbear/lisp/java/**/*.java"/> |
---|
48 | <include name="org/armedbear/lisp/scripting/*.java" if="abcl.jsr-223.p"/> |
---|
49 | <include name="org/armedbear/lisp/scripting/util/*.java" if="abcl.jsr-223.p"/> |
---|
50 | <include name="org/armedbear/Main.java"/> |
---|
51 | </patternset> |
---|
52 | |
---|
53 | <patternset id="abcl.source.lisp"> |
---|
54 | <include name="org/armedbear/lisp/*.lisp"/> |
---|
55 | <include name="org/armedbear/lisp/java/**/*.lisp"/> |
---|
56 | <include name="org/armedbear/lisp/tests/*.lisp"/> |
---|
57 | <exclude name="org/armedbear/lisp/j.lisp"/> |
---|
58 | <include name="org/armedbear/lisp/scripting/lisp/*.lisp" if="abcl.jsr-223.p"/> |
---|
59 | </patternset> |
---|
60 | |
---|
61 | <patternset id="abcl.scripting.source.java"> |
---|
62 | <include name="org/armedbear/lisp/scripting/*.java"/> |
---|
63 | <include name="org/armedbear/lisp/scripting/util/*.java"/> |
---|
64 | </patternset> |
---|
65 | |
---|
66 | <patternset id="abcl.scripting.source.lisp"> |
---|
67 | <include name="org/armedbear/lisp/scripting/lisp/*.lisp"/> |
---|
68 | </patternset> |
---|
69 | |
---|
70 | <!-- Lisp files required at runtime --> |
---|
71 | <patternset id="abcl.source.lisp.dist"> |
---|
72 | <include name="org/armedbear/lisp/boot.lisp"/> |
---|
73 | <include name="org/armedbear/lisp/scripting/lisp/*.lisp" if="abcl.jsr-223.p"/> |
---|
74 | </patternset> |
---|
75 | |
---|
76 | <patternset id="abcl.objects"> |
---|
77 | <include name="org/armedbear/lisp/**/*.class"/> |
---|
78 | <include name="org/armedbear/lisp/**/*.cls"/> |
---|
79 | <include name="org/armedbear/lisp/**/*.abcl"/> |
---|
80 | <include name="org/armedbear/lisp/scripting/*.class" if="abcl.jsr-223.p"/> |
---|
81 | <include name="org/armedbear/lisp/scripting/util/*.class" if="abcl.jsr-223.p"/> |
---|
82 | <patternset refid="abcl.source.lisp.dist"/> |
---|
83 | </patternset> |
---|
84 | |
---|
85 | <path id="abcl.classpath.dist"> |
---|
86 | <pathelement location="${abcl.jar.path}"/> |
---|
87 | </path> |
---|
88 | |
---|
89 | <path id="abcl.classpath.build"> |
---|
90 | <pathelement location="${build.classes.dir}"/> |
---|
91 | </path> |
---|
92 | |
---|
93 | <target name="abcl.compile" depends="abcl.clean.maybe,abcl.compile.lisp"> |
---|
94 | <echo>Compiled ABCL with Java version: ${java.version}</echo> |
---|
95 | </target> |
---|
96 | |
---|
97 | <target name="abcl.clean.maybe" unless="abcl.build.incremental"> |
---|
98 | <echo>Cleaning all intermediate compilation artifacts.</echo> |
---|
99 | <echo>Setting 'abcl.build.incremental' enables incremental compilation.</echo> |
---|
100 | <antcall target="abcl.clean"/> |
---|
101 | </target> |
---|
102 | |
---|
103 | |
---|
104 | <target name="abcl.init"> |
---|
105 | <tstamp> |
---|
106 | <format property="build" pattern="EEE MMM dd yyyy HH:mm:ss zzz"/> |
---|
107 | </tstamp> |
---|
108 | |
---|
109 | <tstamp> |
---|
110 | <format property="build.stamp" pattern="yyyymmdd-HHmm"/> |
---|
111 | </tstamp> |
---|
112 | |
---|
113 | <property name="abcl.test.log.file" |
---|
114 | value="abcl-test-${build.stamp}.log"/> |
---|
115 | |
---|
116 | <!--- antversion fails in ant 1.7.1 <antversion property="ant.version" |
---|
117 | atleast="1.7"/> --> |
---|
118 | <property name="java.path" |
---|
119 | value="${java.home}/bin/java"/> |
---|
120 | |
---|
121 | <!-- Deprecated. Two main types of build environents: 'unix' or 'windows'. --> |
---|
122 | <condition property="unix"> |
---|
123 | <or> |
---|
124 | <os family="unix"/> |
---|
125 | <os family="mac"/> |
---|
126 | </or> |
---|
127 | </condition> |
---|
128 | <condition property="windows"> |
---|
129 | <os family="windows"/> |
---|
130 | </condition> |
---|
131 | |
---|
132 | <!-- Deprecated. --> |
---|
133 | <available file="${src.dir}org/armedbear/lisp/Interpreter.java" |
---|
134 | property="abcl.lisp.p"/> |
---|
135 | |
---|
136 | <echo>java.version: ${java.version}</echo> |
---|
137 | <condition property="abcl.java.version.p"> |
---|
138 | <or> |
---|
139 | <matches string="${java.version}" pattern="1\.5"/> |
---|
140 | <matches string="${java.version}" pattern="1\.6\.0_1[0-9]"/> |
---|
141 | </or> |
---|
142 | </condition> |
---|
143 | |
---|
144 | <!-- Set from commandline via -D or in 'build.properties' --> |
---|
145 | <property name="build.version" value="abcl.svn"/> |
---|
146 | <echo>Implementation-Source: ${version.src}</echo> |
---|
147 | |
---|
148 | </target> |
---|
149 | |
---|
150 | <target name="abcl.java.warning" |
---|
151 | depends="abcl.init" |
---|
152 | unless="abcl.java.version.p"> |
---|
153 | <echo>WARNING: Use of Java version ${java.version} not recommended.</echo> |
---|
154 | </target> |
---|
155 | |
---|
156 | <target name="abcl.jsr-223.notice" |
---|
157 | depends="abcl.init" |
---|
158 | unless="abcl.jsr-223.p"> |
---|
159 | <echo> |
---|
160 | Notice: JSR-223 support won't be built since it is not |
---|
161 | supported, neither natively by your JVM nor by |
---|
162 | libraries in the CLASSPATH. |
---|
163 | </echo> |
---|
164 | </target> |
---|
165 | |
---|
166 | <target name="abcl.compile.java" |
---|
167 | depends="abcl.init,abcl.java.warning,abcl.jsr-223.notice"> |
---|
168 | <mkdir dir="${build.dir}"/> |
---|
169 | <mkdir dir="${build.classes.dir}"/> |
---|
170 | <javac destdir="${build.classes.dir}" |
---|
171 | debug="true" |
---|
172 | target="1.5" |
---|
173 | failonerror="true"> |
---|
174 | <src path="${src.dir}"/> |
---|
175 | <patternset refid="abcl.source.java"/> |
---|
176 | </javac> |
---|
177 | <echo message="${build}" |
---|
178 | file="${build.classes.dir}/org/armedbear/lisp/build"/> |
---|
179 | </target> |
---|
180 | |
---|
181 | <target name="abcl.copy.lisp"> |
---|
182 | <copy todir="${build.classes.dir}" preservelastmodified="yes"> |
---|
183 | <fileset dir="${src.dir}"> |
---|
184 | <patternset refid="abcl.source.lisp.dist"/> |
---|
185 | </fileset> |
---|
186 | </copy> |
---|
187 | </target> |
---|
188 | |
---|
189 | <!-- Adjust the patternset for ABCL source to use the much faster |
---|
190 | Ant 'uptodate' task to check if we need to compile the system |
---|
191 | fasls. Highly inter-dependent with the behavior specified in |
---|
192 | 'compile-system.lisp', i.e. files not listed in |
---|
193 | there should NOT occur here. --> |
---|
194 | <patternset id="abcl.source.lisp.fasls"> |
---|
195 | <patternset refid="abcl.source.lisp"/> |
---|
196 | <exclude name="org/armedbear/lisp/scripting/**/*.lisp"/> |
---|
197 | <exclude name="org/armedbear/lisp/boot.lisp"/> |
---|
198 | <exclude name="org/armedbear/lisp/emacs.lisp"/> |
---|
199 | <exclude name="org/armedbear/lisp/runtime-class.lisp"/> |
---|
200 | <exclude name="org/armedbear/lisp/run-benchmarks.lisp"/> |
---|
201 | </patternset> |
---|
202 | |
---|
203 | <target name="abcl.fasls.uptodate"> |
---|
204 | <uptodate property="abcl.fasls.uptodate.p" value="true"> |
---|
205 | <srcfiles dir="${src.dir}"> |
---|
206 | <patternset refid="abcl.source.lisp.fasls"/> |
---|
207 | </srcfiles> |
---|
208 | <mapper type="glob" from="*.lisp" to="${build.classes.dir}/*.abcl"/> |
---|
209 | </uptodate> |
---|
210 | </target> |
---|
211 | |
---|
212 | <target name="abcl.compile.lisp" |
---|
213 | depends="abcl.copy.lisp,abcl.compile.java,abcl.fasls.uptodate" |
---|
214 | unless="abcl.fasls.uptodate.p"> |
---|
215 | <java classpath="${build.classes.dir}" |
---|
216 | fork="true" |
---|
217 | failonerror="true" |
---|
218 | classname="org.armedbear.lisp.Main"> |
---|
219 | <jvmarg value="-Dabcl.home=${abcl.home.dir}"/> |
---|
220 | <arg value="--noinit"/> |
---|
221 | <arg value="--eval"/> |
---|
222 | <arg value="(compile-system :zip nil :quit t :output-path (symbol-name (quote ${build.classes.dir}/org/armedbear/lisp/)))"/> |
---|
223 | </java> |
---|
224 | </target> |
---|
225 | |
---|
226 | <property name="abcl.build.path" |
---|
227 | value="${build.classes.dir}/org/armedbear/lisp/build"/> |
---|
228 | <target name="abcl.stamp" depends="abcl.compile,abcl.stamp.version,abcl.stamp.hostname"> |
---|
229 | <mkdir dir="${abcl.build.path}/.."/> |
---|
230 | <echo message="${build}" file="${abcl.build.path}"/> |
---|
231 | </target> |
---|
232 | |
---|
233 | <property name="abcl.home.dir" |
---|
234 | value="${src.dir}/org/armedbear/lisp/"/> |
---|
235 | <property name="abcl.version.path" |
---|
236 | value="${build.classes.dir}/org/armedbear/lisp/version"/> |
---|
237 | <target name="abcl.stamp.version" depends="abcl.compile"> |
---|
238 | <!-- Determine which ABCL version we have just built by parsing |
---|
239 | the output of LISP-IMPLEMENTATION-VERSION. --> |
---|
240 | <!-- TODO As an optimization, we could possibly compare the timestamp |
---|
241 | of 'abcl.version.path' vs. org.armedbear.lisp.Version --> |
---|
242 | <java fork="true" |
---|
243 | classpath="${build.classes.dir}" |
---|
244 | outputproperty="abcl.version" |
---|
245 | classname="org.armedbear.lisp.Main" |
---|
246 | logerror="yes"> <!-- Don't catch stderr output --> |
---|
247 | <jvmarg value="-Dabcl.home=${abcl.home.dir}"/> |
---|
248 | <arg value="--noinit"/> |
---|
249 | <arg value="--noinform"/> |
---|
250 | <arg value="--eval"/> |
---|
251 | <arg value="(progn (format t (lisp-implementation-version)) (finish-output) (quit))"/> |
---|
252 | </java> |
---|
253 | |
---|
254 | <echo>Built ABCL version: ${abcl.version}</echo> |
---|
255 | <mkdir dir="${abcl.version.path}/.."/> |
---|
256 | <echo message="${abcl.version}" file="${abcl.version.path}"/> |
---|
257 | </target> |
---|
258 | |
---|
259 | <target name="abcl.stamp.hostname" if="unix"> |
---|
260 | <exec executable="hostname" outputproperty="abcl.hostname"/> |
---|
261 | <echo>abcl.hostname: ${abcl.hostname}</echo> |
---|
262 | </target> |
---|
263 | |
---|
264 | <target name="abcl.jar.uptodate" depends="abcl.compile"> |
---|
265 | <uptodate property="abcl.jar.upttodate.p" targetfile="${abcl.jar.path}"> |
---|
266 | <srcfiles dir="${build.classes.dir}"> |
---|
267 | <patternset refid="abcl.objects"/> |
---|
268 | </srcfiles> |
---|
269 | </uptodate> |
---|
270 | </target> |
---|
271 | |
---|
272 | <target name="abcl.jar" depends="abcl.stamp,abcl.jar.uptodate" |
---|
273 | unless="abcl.jar.uptodate.p"> |
---|
274 | <mkdir dir="${dist.dir}"/> |
---|
275 | <loadfile property="abcl.version" |
---|
276 | srcFile="${abcl.version.path}"/> |
---|
277 | <jar destfile="${abcl.jar.path}" |
---|
278 | compress="true" |
---|
279 | basedir="${build.classes.dir}"> |
---|
280 | <patternset refid="abcl.objects"/> |
---|
281 | <manifest> |
---|
282 | <attribute name="Main-Class" value="org.armedbear.lisp.Main"/> |
---|
283 | <section name="org/armedbear/lisp"> |
---|
284 | <attribute name="Implementation-Title" |
---|
285 | value="ABCL"/> |
---|
286 | <attribute name="Implementation-Version" |
---|
287 | value="${abcl.version}"/> |
---|
288 | <attribute name="Implementation-Build" |
---|
289 | value="${build}"/> |
---|
290 | <attribute name="Implementation-Source" |
---|
291 | value="${version.src}"/> |
---|
292 | </section> |
---|
293 | </manifest> |
---|
294 | <metainf dir="${src.dir}/META-INF"> |
---|
295 | <exclude name="services/javax.script.ScriptEngineFactory" |
---|
296 | unless="abcl.jsr-223.p"/> |
---|
297 | </metainf> |
---|
298 | </jar> |
---|
299 | </target> |
---|
300 | |
---|
301 | <target name="abcl.wrapper" |
---|
302 | depends="abcl.jar,abcl.wrapper.unix,abcl.wrapper.windows"> |
---|
303 | <description> |
---|
304 | Creates in-place exectuable shell wrapper in '${abcl.wrapper.file}' |
---|
305 | </description> |
---|
306 | <!-- Set from commandline or in 'build.properties' --> |
---|
307 | <property name="additional.jars" value=""/> |
---|
308 | <path id="abcl.runtime.classpath"> |
---|
309 | <pathelement location="${abcl.jar.path}"/> |
---|
310 | <pathelement path="${additional.jars}"/> |
---|
311 | </path> |
---|
312 | <!-- set via '-Djava.options=JAVA_OPTIONS' or in 'build.properties --> |
---|
313 | <property name="java.options" value=""/> |
---|
314 | |
---|
315 | <copy file="${abcl.wrapper.in.file}" toFile="${abcl.wrapper.file}" overwrite="yes"> |
---|
316 | <filterset> |
---|
317 | <filter token="JAVA" |
---|
318 | value="${java.path}"/> |
---|
319 | <filter token="ABCL_JAVA_OPTIONS" |
---|
320 | value="${java.options}"/> |
---|
321 | <filter token="ABCL_CLASSPATH" |
---|
322 | value="${toString:abcl.runtime.classpath}"/> |
---|
323 | </filterset> |
---|
324 | </copy> |
---|
325 | <chmod file="${abcl.wrapper.file}" perm="a+x"/> |
---|
326 | |
---|
327 | <echo>Created executable ABCL wrapper in '${abcl.wrapper.file}'</echo> |
---|
328 | <echo>N.B. This wrapper requires '${abcl.jar.path}' not be moved.</echo> |
---|
329 | </target> |
---|
330 | |
---|
331 | <target name="abcl.wrapper.unix" if="unix"> |
---|
332 | <property name="abcl.wrapper.file" value="abcl"/> |
---|
333 | <property name="abcl.wrapper.in.file" value="abcl.in"/> |
---|
334 | </target> |
---|
335 | |
---|
336 | <target name="abcl.wrapper.windows" if="windows"> |
---|
337 | <property name="abcl.wrapper.file" value="abcl.bat"/> |
---|
338 | <property name="abcl.wrapper.in.file" value="abcl.bat.in"/> |
---|
339 | </target> |
---|
340 | |
---|
341 | <target name="abcl.debug.jpda" depends="abcl.jar"> |
---|
342 | <description>Invoke ABCL with JPDA listener on port 6789</description> |
---|
343 | <java fork="true" |
---|
344 | classpathref="abcl.classpath.dist" |
---|
345 | classname="org.armedbear.lisp.Main"> |
---|
346 | <jvmarg |
---|
347 | value="-agentlib:jdwp=transport=dt_socket,address=6789,server=y"/> |
---|
348 | </java> |
---|
349 | <echo>JPDA listening on localhost:6789</echo> |
---|
350 | </target> |
---|
351 | |
---|
352 | <target name="abcl.run" depends="abcl.jar"> |
---|
353 | <java fork="true" |
---|
354 | classpathref="abcl.classpath.dist" |
---|
355 | classname="org.armedbear.lisp.Main"> |
---|
356 | </java> |
---|
357 | </target> |
---|
358 | |
---|
359 | <target name="abcl.clean"> |
---|
360 | <delete dir="${build.dir}"/> |
---|
361 | <delete file="${abcl.jar.path}"/> |
---|
362 | <delete file="abcl"/> |
---|
363 | <delete file="abcl.bat"/> |
---|
364 | </target> |
---|
365 | |
---|
366 | <target name="abcl.dist" depends="abcl.jar"> |
---|
367 | <copy file="${abcl.jar.path}" |
---|
368 | toFile="${dist.dir}/abcl-${abcl.version}.jar"/> |
---|
369 | </target> |
---|
370 | |
---|
371 | <target name="abcl.distclean" depends="abcl.clean"> |
---|
372 | <delete dir="${dist.dir}"/> |
---|
373 | <delete file="abcl"/> |
---|
374 | <delete file="abcl.bat"/> |
---|
375 | </target> |
---|
376 | |
---|
377 | <target name="TAGS"> |
---|
378 | <apply executable="etags" parallel="true" verbose="true"> |
---|
379 | <arg value="--regex=|[ \t]+//[ \t]+###[ \t]+\([^ \t]+\)|\1|"/> |
---|
380 | <fileset dir="${src.dir}"> |
---|
381 | <patternset refid="abcl.source.java"/> |
---|
382 | <patternset refid="abcl.source.lisp"/> |
---|
383 | </fileset> |
---|
384 | </apply> |
---|
385 | </target> |
---|
386 | |
---|
387 | <patternset id="abcl.dist.misc" |
---|
388 | description="Additional includes in the source distributions relative to basedir"> |
---|
389 | <include name="build.xml"/> |
---|
390 | <include name="build.properties.in"/> |
---|
391 | <include name="COPYING"/> |
---|
392 | <include name="README"/> |
---|
393 | <include name="CHANGES"/> |
---|
394 | <include name="abcl.in"/> |
---|
395 | <include name="abcl.bat.in"/> |
---|
396 | |
---|
397 | <!-- The remainder of these files are used by the Lisp hosted |
---|
398 | build in 'build-abcl.lisp' but not used by Ant, so include |
---|
399 | them in the source distribution. --> |
---|
400 | <include name="make-jar.in"/> |
---|
401 | <include name="make-jar.bat.in"/> |
---|
402 | |
---|
403 | <include name="build-abcl.lisp"/> |
---|
404 | <include name="customizations.lisp.in"/> |
---|
405 | |
---|
406 | <include name="test-abcl.asd"/> |
---|
407 | <include name="build-abcl.asd"/> |
---|
408 | </patternset> |
---|
409 | |
---|
410 | <patternset id="abcl.source.misc" |
---|
411 | description="Additional includes in the source distribution relative to source root"> |
---|
412 | <include name="org/armedbear/lisp/LICENSE"/> |
---|
413 | <include name="manifest-abcl"/> |
---|
414 | <include name="META-INF/services/javax.script.ScriptEngineFactory"/> |
---|
415 | </patternset> |
---|
416 | |
---|
417 | <target name="abcl.source.prepare" depends="abcl.stamp.version"> |
---|
418 | <property name="abcl.build.src.dir" |
---|
419 | value="${build.dir}/abcl-src-${abcl.version}"/> |
---|
420 | <mkdir dir="${abcl.build.src.dir}/src"/> |
---|
421 | <copy todir="${abcl.build.src.dir}/src" |
---|
422 | preservelastmodified="true"> |
---|
423 | <fileset dir="${src.dir}" |
---|
424 | id="abcl.source.src"> |
---|
425 | <patternset refid="abcl.source.java"/> |
---|
426 | <patternset refid="abcl.source.lisp"/> |
---|
427 | <patternset refid="abcl.source.misc"/> |
---|
428 | </fileset> |
---|
429 | </copy> |
---|
430 | <copy todir="${abcl.build.src.dir}" |
---|
431 | preservelastmodified="true"> |
---|
432 | <fileset dir="${basedir}"> |
---|
433 | <patternset refid="abcl.dist.misc"/> |
---|
434 | </fileset> |
---|
435 | </copy> |
---|
436 | </target> |
---|
437 | |
---|
438 | <!-- Files in source distribution that always get LF EOL (aka |
---|
439 | 'unix') --> |
---|
440 | <patternset id="abcl.dist.lf"> |
---|
441 | <include name="abcl.in"/> |
---|
442 | </patternset> |
---|
443 | |
---|
444 | <!-- Files in source distribution that always get CRLF EOL (aka |
---|
445 | 'dos') --> |
---|
446 | <patternset id="abcl.dist.crlf"> |
---|
447 | <include name="abcl.bat.in"/> |
---|
448 | </patternset> |
---|
449 | |
---|
450 | <target name="abcl.source.tar" depends="abcl.source.prepare"> |
---|
451 | <fixcrlf srcdir="${abcl.build.src.dir}" |
---|
452 | preservelastmodified="true" |
---|
453 | eol="lf"> |
---|
454 | </fixcrlf> |
---|
455 | |
---|
456 | <fixcrlf srcdir="${abcl.build.src.dir}" |
---|
457 | preservelastmodified="true" |
---|
458 | eol="crlf"> |
---|
459 | <patternset refid="abcl.dist.crlf"/> |
---|
460 | </fixcrlf> |
---|
461 | |
---|
462 | <fixcrlf srcdir="${abcl.build.src.dir}" |
---|
463 | preservelastmodified="true" |
---|
464 | eol="lf"> |
---|
465 | <patternset refid="abcl.dist.lf"/> |
---|
466 | </fixcrlf> |
---|
467 | |
---|
468 | <mkdir dir="${dist.dir}"/> |
---|
469 | <tar destfile="${dist.dir}/abcl-src-${abcl.version}.tar.gz" |
---|
470 | compression="gzip"> |
---|
471 | <tarfileset dir="${build.dir}"> |
---|
472 | <include name="abcl-src-${abcl.version}/**"/> |
---|
473 | </tarfileset> |
---|
474 | </tar> |
---|
475 | </target> |
---|
476 | |
---|
477 | <target name="abcl.source.zip" depends="abcl.source.prepare"> |
---|
478 | <fixcrlf srcdir="${abcl.build.src.dir}" |
---|
479 | preservelastmodified="true" |
---|
480 | eol="crlf"> |
---|
481 | </fixcrlf> |
---|
482 | |
---|
483 | <fixcrlf srcdir="${abcl.build.src.dir}" |
---|
484 | preservelastmodified="true" |
---|
485 | eol="crlf"> |
---|
486 | <patternset refid="abcl.dist.crlf"/> |
---|
487 | </fixcrlf> |
---|
488 | |
---|
489 | <fixcrlf srcdir="${abcl.build.src.dir}" |
---|
490 | preservelastmodified="true" |
---|
491 | eol="lf"> |
---|
492 | <patternset refid="abcl.dist.lf"/> |
---|
493 | </fixcrlf> |
---|
494 | |
---|
495 | <mkdir dir="${dist.dir}"/> |
---|
496 | <zip destfile="${dist.dir}/abcl-src-${abcl.version}.zip" |
---|
497 | compress="true"> |
---|
498 | <zipfileset dir="${abcl.build.src.dir}" prefix="abcl-src-${abcl.version}"/> |
---|
499 | </zip> |
---|
500 | </target> |
---|
501 | |
---|
502 | <target name="abcl.binary.prepare" depends="abcl.jar,abcl.stamp.version"> |
---|
503 | <property name="abcl.build.binary.dir" |
---|
504 | value="${build.dir}/abcl-bin-${abcl.version}"/> |
---|
505 | <mkdir dir="${abcl.build.binary.dir}"/> |
---|
506 | <copy todir="${abcl.build.binary.dir}" |
---|
507 | preservelastmodified="true"> |
---|
508 | <fileset dir="${basedir}/dist"> |
---|
509 | <patternset> |
---|
510 | <include name="abcl.jar"/> |
---|
511 | </patternset> |
---|
512 | </fileset> |
---|
513 | <fileset dir="${basedir}"> |
---|
514 | <patternset> |
---|
515 | <include name="README"/> |
---|
516 | <include name="CHANGES"/> |
---|
517 | </patternset> |
---|
518 | </fileset> |
---|
519 | </copy> |
---|
520 | </target> |
---|
521 | |
---|
522 | <target name="abcl.binary.tar" depends="abcl.binary.prepare"> |
---|
523 | <tar destfile="${dist.dir}/abcl-bin-${abcl.version}.tar.gz" |
---|
524 | compression="gzip"> |
---|
525 | <tarfileset dir="${build.dir}"> |
---|
526 | <include name="abcl-bin-${abcl.version}/**"/> |
---|
527 | </tarfileset> |
---|
528 | </tar> |
---|
529 | </target> |
---|
530 | |
---|
531 | <target name="abcl.binary.zip" depends="abcl.binary.prepare"> |
---|
532 | <zip destfile="${dist.dir}/abcl-bin-${abcl.version}.zip" |
---|
533 | compress="true"> |
---|
534 | <zipfileset dir="${abcl.build.binary.dir}" prefix="abcl-bin-${abcl.version}"/> |
---|
535 | </zip> |
---|
536 | </target> |
---|
537 | |
---|
538 | <property name="abcl.test.classes.dir" |
---|
539 | value="${build.dir}/classes-test"/> |
---|
540 | |
---|
541 | <property name="abcl.test.src.dir" |
---|
542 | value="${basedir}/test/src"/> |
---|
543 | |
---|
544 | <patternset id="abcl.test.source.java"> |
---|
545 | <!-- For now, we list tests explicitly, because we have to |
---|
546 | enumerate them later to the JUnit test runner. --> |
---|
547 | <include name="org/armedbear/lisp/FastStringBufferTest.java"/> |
---|
548 | </patternset> |
---|
549 | |
---|
550 | <property name="junit-4.5.path" |
---|
551 | value="${abcl.ext.dir}/junit-4.5.jar"/> |
---|
552 | |
---|
553 | <path id="abcl.test.compile.classpath"> |
---|
554 | <pathelement location="${junit-4.5.path}"/> |
---|
555 | <pathelement location="${build.classes.dir}"/> |
---|
556 | </path> |
---|
557 | |
---|
558 | <target name="abcl.test.pre-compile" depends="abcl.ext"/> |
---|
559 | |
---|
560 | <target name="abcl.ext.p"> |
---|
561 | <!--XXX generalize over enumeration of all contributions to abcl.ext --> |
---|
562 | <available file="${junit-4.5.path}" property="abcl.ext.p"/> |
---|
563 | </target> |
---|
564 | <target name="abcl.ext" depends="abcl.ext.p" unless="abcl.ext.p"> |
---|
565 | |
---|
566 | <mkdir dir="${abcl.ext.dir}"/> |
---|
567 | <get src="http://downloads.sourceforge.net/junit/junit-4.5.jar?modtime=1218209625" |
---|
568 | usetimestamp="true" |
---|
569 | dest="${junit-4.5.path}"/> |
---|
570 | </target> |
---|
571 | |
---|
572 | <target name="abcl.test.compile" |
---|
573 | depends="abcl.test.pre-compile,abcl.compile"> |
---|
574 | <mkdir dir="${abcl.test.classes.dir}"/> |
---|
575 | <javac destdir="${abcl.test.classes.dir}" |
---|
576 | classpathref="abcl.test.compile.classpath" |
---|
577 | debug="true" |
---|
578 | target="1.5"> |
---|
579 | <src path="${abcl.test.src.dir}"/> |
---|
580 | <patternset refid="abcl.test.source.java"/> |
---|
581 | </javac> |
---|
582 | </target> |
---|
583 | |
---|
584 | <path id="abcl.test.run.classpath"> |
---|
585 | <path refid="abcl.test.compile.classpath"/> |
---|
586 | <pathelement location="${abcl.test.classes.dir}"/> |
---|
587 | </path> |
---|
588 | |
---|
589 | <target name="abcl.test" |
---|
590 | depends="abcl.test.java,abcl.test.lisp"/> |
---|
591 | |
---|
592 | <target name="abcl.test.java" depends="abcl.test.compile"> |
---|
593 | <java fork="true" |
---|
594 | classpathref="abcl.test.run.classpath" |
---|
595 | classname="org.junit.runner.JUnitCore"> |
---|
596 | <arg value="org.armedbear.lisp.FastStringBufferTest"/> |
---|
597 | </java> |
---|
598 | </target> |
---|
599 | |
---|
600 | <target name="abcl.test.lisp" |
---|
601 | depends="test.ansi.compiled,test.abcl"/> |
---|
602 | |
---|
603 | <target name="test.ansi.interpreted" depends="abcl.jar"> |
---|
604 | <echo>Recording test output in ${abcl.test.log.file}.</echo> |
---|
605 | <record name="${abcl.test.log.file}" emacsmode="true" action="start" append="yes"/> |
---|
606 | <java fork="true" dir="${basedir}" |
---|
607 | classpathref="abcl.classpath.dist" |
---|
608 | classname="org.armedbear.lisp.Main"> |
---|
609 | <arg value="--noinit"/> |
---|
610 | <arg value="--load"/> |
---|
611 | <arg line="${basedir}/test/lisp/ansi/ansi-tests-interpreted.lisp"/> |
---|
612 | </java> |
---|
613 | <record name="${abcl.test.log.file}" emacsmode="true" action="stop"/> |
---|
614 | <echo>Finished recording test output in ${abcl.test.log.file}.</echo> |
---|
615 | </target> |
---|
616 | |
---|
617 | <target name="test.ansi.compiled" depends="abcl.jar"> |
---|
618 | <echo>Recording test output in ${abcl.test.log.file}.</echo> |
---|
619 | <record name="${abcl.test.log.file}" emacsmode="true" action="start" append="yes"/> |
---|
620 | <java fork="true" dir="${basedir}" |
---|
621 | classpathref="abcl.classpath.dist" |
---|
622 | classname="org.armedbear.lisp.Main"> |
---|
623 | <arg value="--noinit"/> |
---|
624 | <arg value="--load"/> |
---|
625 | <arg line="${basedir}/test/lisp/ansi/ansi-tests-compiled.lisp "/> |
---|
626 | </java> |
---|
627 | <record name="${abcl.test.log.file}" emacsmode="true" action="stop"/> |
---|
628 | <echo>Finished recording test output in ${abcl.test.log.file}.</echo> |
---|
629 | </target> |
---|
630 | |
---|
631 | <target name="test.abcl" depends="abcl.jar"> |
---|
632 | <echo>Recording test output in ${abcl.test.log.file}.</echo> |
---|
633 | <record name="${abcl.test.log.file}" emacsmode="true" action="start" append="yes"/> |
---|
634 | <java fork="true" dir="${basedir}" |
---|
635 | classpathref="abcl.classpath.dist" |
---|
636 | classname="org.armedbear.lisp.Main"> |
---|
637 | <arg value="--noinit"/> |
---|
638 | <arg value="--load"/> |
---|
639 | <arg line="${basedir}/test/lisp/abcl/abcl-test.lisp"/> |
---|
640 | </java> |
---|
641 | <record name="${abcl.test.log.file}" emacsmode="true" action="stop"/> |
---|
642 | <echo>Finished recording test output in ${abcl.test.log.file}.</echo> |
---|
643 | </target> |
---|
644 | |
---|
645 | <import file="netbeans-build.xml" optional="true"/> |
---|
646 | <!-- <import file="j-build.xml" optional="true"/> --> |
---|
647 | <import file="not.org-build.xml" optional="true"/> |
---|
648 | </project> |
---|
649 | |
---|