source: trunk/abcl/build.xml @ 12434

Last change on this file since 12434 was 12434, checked in by Mark Evenson, 12 years ago

Revert r12430 because it fails to signal errors in a meaningful manner.

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