source: trunk/abcl/build.xml @ 12438

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

Implementation of Lisp build without intermediate files.

It is still the case that if anything loaded by 'boot.lisp' causes an
error, the 'abcl.compile.lisp' task does not properly signal an error
to the Ant build process. But this is no different from the previous
behavior, so we adopt this as the conceptually simpler approach to
writing Ant tasks (and the one that doesn't litter the filesystem with
intermediate build files when the compilation process is being debugged).

  • Property svn:eol-style set to LF
File size: 25.1 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    <pathconvert dirsep="/" property="abcl.lisp.output" refid="abcl.lisp.output.path"/>
224   
225    <target name="abcl.compile.lisp" 
226      depends="abcl.copy.lisp,abcl.compile.java,abcl.fasls.uptodate"
227      unless="abcl.fasls.uptodate.p">
228      <echo>
229Compiling Lisp system
230from ${abcl.home.dir}
231to   ${abcl.lisp.output}</echo>
232      <java classpath="${build.classes.dir}" 
233      fork="true"
234      failonerror="true"
235            inputstring="(handler-case (compile-system :zip nil :quit t :output-path &quot;${abcl.lisp.output}/&quot;) (t (x) (progn (format t &quot;~A: ~A~%&quot; (type-of x) x) (exit :status -1))))"
236      classname="org.armedbear.lisp.Main">
237        <jvmarg value="-Dabcl.home=${abcl.home.dir}${file.separator}"/>
238  <arg value="--noinit"/>
239        <arg value="--eval"/>
240        <arg value="(setf *load-verbose* t)"/>
241      </java>
242    </target>
243
244    <property name="abcl.build.path"
245        value="${build.classes.dir}/org/armedbear/lisp/build"/>
246    <target name="abcl.stamp" depends="abcl.compile,abcl.stamp.version,abcl.stamp.hostname">
247      <mkdir dir="${abcl.build.path}/.."/>
248      <echo message="${build}" file="${abcl.build.path}"/>   
249    </target>
250
251    <property name="abcl.home.dir"
252              value="${src.dir}/org/armedbear/lisp/"/>
253    <property name="abcl.version.path"
254        value="${build.classes.dir}/org/armedbear/lisp/version"/>
255    <target name="abcl.stamp.version" depends="abcl.compile.java"  >
256      <java fork="true"
257      classpath="${build.classes.dir}"
258      outputproperty="abcl.version"
259      classname="org.armedbear.lisp.Version"
260            logerror="yes"/> <!-- Don't catch stderr output -->
261
262      <echo>ABCL version: ${abcl.version}</echo>
263      <mkdir dir="${abcl.version.path}/.."/>
264      <echo message="${abcl.version}" file="${abcl.version.path}"/> 
265    </target>
266
267    <target name="abcl.stamp.hostname" if="unix">
268      <exec executable="hostname" outputproperty="abcl.hostname"/>
269      <echo>abcl.hostname: ${abcl.hostname}</echo>
270    </target>
271
272    <target name="abcl.jar.uptodate" depends="abcl.compile">
273      <uptodate property="abcl.jar.uptodate.p" targetfile="${abcl.jar.path}">
274        <srcfiles dir="${build.classes.dir}">
275          <patternset refid="abcl.objects"/>
276        </srcfiles>
277      </uptodate>
278    </target>
279
280    <target name="abcl.jar" depends="abcl.stamp,abcl.jar.uptodate"
281      unless="abcl.jar.uptodate.p">
282      <mkdir dir="${dist.dir}"/>
283      <loadfile property="abcl.version"
284      srcFile="${abcl.version.path}"/>
285      <jar destfile="${abcl.jar.path}"
286     compress="true"
287     basedir="${build.classes.dir}">
288  <patternset refid="abcl.objects"/>
289  <manifest>
290    <attribute name="Main-Class" value="org.armedbear.lisp.Main"/>
291    <section name="org/armedbear/lisp">
292      <attribute name="Implementation-Title" 
293           value="ABCL"/>
294      <attribute name="Implementation-Version" 
295           value="${abcl.version}"/>
296      <attribute name="Implementation-Build" 
297           value="${build}"/>
298      <attribute name="Implementation-Source" 
299           value="${version.src}"/>
300    </section>
301  </manifest>
302  <metainf dir="${src.dir}/META-INF"> 
303    <exclude name="services/javax.script.ScriptEngineFactory"
304       unless="abcl.jsr-223.p"/>
305        </metainf>
306      </jar>
307    </target>
308   
309    <target name="abcl.wrapper" 
310      depends="abcl.jar,abcl.wrapper.unix,abcl.wrapper.windows">
311      <description>
312  Creates in-place exectuable shell wrapper in '${abcl.wrapper.file}'
313      </description>
314      <!-- Set from commandline or in 'build.properties' -->
315      <property name="additional.jars" value=""/>
316      <path id="abcl.runtime.classpath">
317  <pathelement location="${abcl.jar.path}"/>
318  <pathelement path="${additional.jars}"/>
319      </path>
320      <!-- set via '-Djava.options=JAVA_OPTIONS' or in 'build.properties -->
321      <property name="java.options" value=""/>
322
323      <copy file="${abcl.wrapper.in.file}" toFile="${abcl.wrapper.file}" overwrite="yes">
324  <filterset>
325    <filter token="JAVA" 
326      value="${java.path}"/>
327    <filter token="ABCL_JAVA_OPTIONS" 
328      value="${java.options}"/>
329    <filter token="ABCL_CLASSPATH"
330      value="${toString:abcl.runtime.classpath}"/>
331  </filterset>
332      </copy>
333      <chmod file="${abcl.wrapper.file}" perm="a+x"/>
334
335      <echo>Created executable ABCL wrapper in '${abcl.wrapper.file}'</echo>
336      <echo>N.B. This wrapper requires '${abcl.jar.path}' not be moved.</echo>
337    </target>
338
339    <target name="abcl.wrapper.unix" if="unix">
340      <property name="abcl.wrapper.file" value="abcl"/>
341      <property name="abcl.wrapper.in.file" value="abcl.in"/>
342    </target>
343
344    <target name="abcl.wrapper.windows" if="windows">
345      <property name="abcl.wrapper.file" value="abcl.bat"/>
346      <property name="abcl.wrapper.in.file" value="abcl.bat.in"/>
347    </target>
348
349    <target name="abcl.debug.jpda" depends="abcl.jar">
350      <description>Invoke ABCL with JPDA listener on port 6789</description>
351      <java fork="true"
352      classpathref="abcl.classpath.dist"
353      classname="org.armedbear.lisp.Main">
354  <jvmarg 
355      value="-agentlib:jdwp=transport=dt_socket,address=6789,server=y"/>
356      </java>
357      <echo>JPDA listening on localhost:6789</echo>
358    </target>
359
360    <target name="abcl.run" depends="abcl.jar">
361      <java fork="true"
362      classpathref="abcl.classpath.dist"
363      classname="org.armedbear.lisp.Main">
364      </java>
365    </target>
366
367    <target name="abcl.clean">
368      <delete dir="${build.dir}"/>
369      <delete file="${abcl.jar.path}"/>
370      <delete file="abcl"/>
371      <delete file="abcl.bat"/>
372    </target>
373
374    <target name="abcl.dist" depends="abcl.jar">
375      <copy file="${abcl.jar.path}"
376      toFile="${dist.dir}/abcl-${abcl.version}.jar"/>
377    </target>
378
379    <target name="abcl.distclean" depends="abcl.clean">
380      <delete dir="${dist.dir}"/>
381      <delete file="abcl"/>
382      <delete file="abcl.bat"/>
383    </target>
384
385    <target name="TAGS">
386      <apply executable="etags" parallel="true" verbose="true">
387  <arg value="--regex=|[ \t]+//[ \t]+###[ \t]+\([^ \t]+\)|\1|"/>
388  <fileset dir="${src.dir}">
389    <patternset refid="abcl.source.java"/>
390    <patternset refid="abcl.source.lisp"/>
391  </fileset>
392      </apply>
393    </target>
394
395    <patternset id="abcl.dist.misc"
396    description="Additional includes in the source distributions relative to basedir">
397      <include name="build.xml"/>
398      <include name="build.properties.in"/>
399      <include name="COPYING"/>
400      <include name="README"/>
401      <include name="CHANGES"/>
402      <include name="abcl.in"/>
403      <include name="abcl.bat.in"/>
404     
405      <!-- The remainder of these files are used by the Lisp hosted
406           build in 'build-abcl.lisp' but not used by Ant, so include
407           them in the source distribution. -->
408      <include name="make-jar.in"/>
409      <include name="make-jar.bat.in"/>
410
411      <include name="build-abcl.lisp"/>
412      <include name="customizations.lisp.in"/>
413
414    </patternset>
415
416    <patternset 
417        id="abcl.source.misc"
418        description="Additional includes in the source distribution relative to source root">
419      <include name="org/armedbear/lisp/LICENSE"/>
420      <include name="manifest-abcl"/>
421      <include name="META-INF/services/javax.script.ScriptEngineFactory"/>
422    </patternset>
423
424    <target name="abcl.source.prepare" depends="abcl.stamp.version">
425      <property name="abcl.build.src.dir"
426    value="${build.dir}/abcl-src-${abcl.version}"/>
427      <mkdir dir="${abcl.build.src.dir}/src"/>
428      <copy todir="${abcl.build.src.dir}/src"
429            preservelastmodified="true">
430        <fileset dir="${src.dir}"
431                 id="abcl.source.src">
432            <patternset refid="abcl.source.java"/>
433            <patternset refid="abcl.source.lisp"/>
434            <patternset refid="abcl.source.misc"/>
435        </fileset>
436      </copy>
437      <copy todir="${abcl.build.src.dir}"
438            preservelastmodified="true">
439        <fileset dir="${basedir}">
440            <patternset refid="abcl.dist.misc"/>
441        </fileset>
442      </copy>
443    </target>
444
445    <!--  Files in source distribution that always get LF EOL (aka
446         'unix') -->   
447    <patternset id="abcl.dist.lf">
448      <include name="abcl.in"/>
449    </patternset>
450
451    <!--  Files in source distribution that always get CRLF EOL (aka
452         'dos') -->   
453    <patternset id="abcl.dist.crlf">
454      <include name="abcl.bat.in"/>
455    </patternset>
456
457    <target name="abcl.source.tar" depends="abcl.source.prepare">
458      <fixcrlf srcdir="${abcl.build.src.dir}"
459               preservelastmodified="true"
460               eol="lf">
461      </fixcrlf>
462
463      <fixcrlf srcdir="${abcl.build.src.dir}"
464               preservelastmodified="true"
465               eol="crlf">
466          <patternset refid="abcl.dist.crlf"/>
467      </fixcrlf>
468
469      <fixcrlf srcdir="${abcl.build.src.dir}"
470               preservelastmodified="true"
471               eol="lf">
472          <patternset refid="abcl.dist.lf"/>
473      </fixcrlf>
474
475      <mkdir dir="${dist.dir}"/>
476      <tar destfile="${dist.dir}/abcl-src-${abcl.version}.tar.gz"
477     compression="gzip">
478  <tarfileset dir="${build.dir}">
479    <include name="abcl-src-${abcl.version}/**"/>
480  </tarfileset>
481      </tar>
482    </target>
483
484    <target name="abcl.source.zip" depends="abcl.source.prepare">
485      <fixcrlf srcdir="${abcl.build.src.dir}"
486               preservelastmodified="true"
487               eol="crlf">
488      </fixcrlf>
489
490      <fixcrlf srcdir="${abcl.build.src.dir}"
491               preservelastmodified="true"
492               eol="crlf">
493          <patternset refid="abcl.dist.crlf"/>
494      </fixcrlf>
495
496      <fixcrlf srcdir="${abcl.build.src.dir}"
497               preservelastmodified="true"
498               eol="lf">
499          <patternset refid="abcl.dist.lf"/>
500      </fixcrlf>
501
502      <mkdir dir="${dist.dir}"/>
503      <zip destfile="${dist.dir}/abcl-src-${abcl.version}.zip"
504     compress="true">
505  <zipfileset dir="${abcl.build.src.dir}" prefix="abcl-src-${abcl.version}"/>
506      </zip>
507    </target>
508   
509    <target name="abcl.binary.prepare" depends="abcl.jar,abcl.stamp.version">
510      <property name="abcl.build.binary.dir"
511                value="${build.dir}/abcl-bin-${abcl.version}"/>
512      <mkdir dir="${abcl.build.binary.dir}"/>
513      <copy todir="${abcl.build.binary.dir}"
514            preservelastmodified="true">
515        <fileset dir="${basedir}/dist">
516          <patternset>
517            <include name="abcl.jar"/>
518          </patternset>
519        </fileset>
520        <fileset dir="${basedir}">
521          <patternset>
522            <include name="README"/>
523            <include name="CHANGES"/>
524          </patternset>
525        </fileset>
526      </copy>
527    </target>
528
529    <target name="abcl.binary.tar" depends="abcl.binary.prepare">
530      <tar destfile="${dist.dir}/abcl-bin-${abcl.version}.tar.gz"
531           compression="gzip">
532        <tarfileset dir="${build.dir}">
533          <include name="abcl-bin-${abcl.version}/**"/>
534          </tarfileset>
535      </tar>
536    </target>
537
538    <target name="abcl.binary.zip" depends="abcl.binary.prepare">
539      <zip destfile="${dist.dir}/abcl-bin-${abcl.version}.zip"
540           compress="true">
541        <zipfileset dir="${abcl.build.binary.dir}" prefix="abcl-bin-${abcl.version}"/>
542      </zip>
543    </target>
544
545    <target name="help.test">
546      <echo>
547The following Ant targets run various test suites:
548 
549  abcl.test
550    --  Run all available tests.
551  abcl.test.java
552    --  Run the ABCL junit Java tests under ${basedir}/test/src
553  abcl.test.lisp
554    --  Run the 'test.ansi.compiled', 'test.abcl', 'test.cl-bench' targets
555  test.ansi.compiled
556    --  Run the compiled version of the ANSI test suite
557  test.abcl
558    --  Run the Lisp RT tests collected in ${basedir}/test/lisp/abcl
559  test.cl-bench
560    --  Run the cl-bench test suite.
561
562The ANSI tests require that the [ansi-tests][1] be manually installed in
563${basedir}/../ansi-tests.
564
565[1]: svn://common-lisp.net/project/ansi-test/svn/trunk/ansi-tests
566
567The CL-BENCH test require that [cl-bench][2] be maunally installed in
568${basedir}/../cl-bench
569
570[2]: http://www.chez.com/emarsden/downloads/cl-bench.tar.gz
571      </echo>
572    </target>
573
574    <property name="abcl.test.classes.dir"
575        value="${build.dir}/classes-test"/>
576
577    <property name="abcl.test.src.dir"
578        value="${basedir}/test/src"/>
579
580    <patternset id="abcl.test.source.java">
581      <!-- For now, we list tests explicitly, because we have to
582           enumerate them later to the JUnit test runner. -->
583      <include name="org/armedbear/lisp/*.java"/>
584    </patternset>
585
586    <property name="junit.path"
587        value="${abcl.ext.dir}/junit-4.8.1.jar"/>
588
589
590    <path id="abcl.test.compile.classpath">
591      <pathelement location="${junit.path}"/>
592      <pathelement location="${build.classes.dir}"/>
593    </path>
594
595    <target name="abcl.test.pre-compile" depends="abcl.ext"/>
596
597    <target name="abcl.ext.p">
598      <!--XXX generalize over enumeration of all contributions to
599           abcl.ext if we get more of them.  -->
600      <available file="${junit.path}" property="abcl.ext.p"/>
601    </target>
602    <target name="abcl.ext" depends="abcl.ext.p" unless="abcl.ext.p">
603
604      <mkdir dir="${abcl.ext.dir}"/>
605      <get 
606          src="http://cloud.github.com/downloads/KentBeck/junit/junit-4.8.1.jar"
607          usetimestamp="true"
608          dest="${junit.path}"/>
609    </target>
610 
611    <target name="abcl.test.compile" 
612      depends="abcl.test.pre-compile">
613      <mkdir dir="${abcl.test.classes.dir}"/>
614      <javac destdir="${abcl.test.classes.dir}"
615       classpathref="abcl.test.compile.classpath"
616       debug="true"
617       target="1.5">
618  <src path="${abcl.test.src.dir}"/>
619  <patternset refid="abcl.test.source.java"/>
620      </javac>
621    </target>
622
623    <path id="abcl.test.run.classpath">
624      <path refid="abcl.test.compile.classpath"/>
625      <pathelement location="${abcl.test.classes.dir}"/>
626    </path>
627
628    <target name="abcl.test" 
629      depends="abcl.test.java,abcl.test.lisp"/>
630 
631    <target name="abcl.test.java" depends="abcl.test.compile">
632      <java fork="true"
633      classpathref="abcl.test.run.classpath"
634      classname="org.junit.runner.JUnitCore">
635  <arg value="org.armedbear.lisp.FastStringBufferTest"/>
636        <arg value="org.armedbear.lisp.PathnameTest"/>
637        <arg value="org.armedbear.lisp.StreamTest"/>
638      </java>
639    </target>
640
641    <target name="abcl.test.lisp" 
642      depends="test.ansi.compiled,test.abcl,test.cl-bench"/>
643
644    <target name="test.ansi.interpreted" depends="abcl.jar">
645      <echo>Recording test output in ${abcl.test.log.file}.</echo>
646      <record name="${abcl.test.log.file}" emacsmode="true" action="start" append="yes"/>
647      <java fork="true" dir="${basedir}"
648      classpathref="abcl.classpath.dist"
649      classname="org.armedbear.lisp.Main">
650  <arg value="--noinit"/> 
651  <arg value="--eval"/><arg value="(require (quote asdf))"/>
652  <arg value="--eval"/><arg value="(asdf:operate (quote asdf:load-op) :abcl)"/>
653  <arg value="--eval"/><arg value="(asdf:operate (quote asdf:test-op) :ansi-interpreted)"/>
654        <arg value="--eval"/><arg value="(ext:exit)"/>
655      </java>
656      <record name="${abcl.test.log.file}" emacsmode="true" action="stop"/>
657      <echo>Finished recording test output in ${abcl.test.log.file}.</echo>
658    </target>
659
660    <target name="test.ansi.compiled" depends="abcl.jar">
661      <echo>Recording test output in ${abcl.test.log.file}.</echo>
662      <record name="${abcl.test.log.file}" emacsmode="true" action="start" append="yes"/>
663      <java fork="true" dir="${basedir}"
664      classpathref="abcl.classpath.dist"
665      classname="org.armedbear.lisp.Main">
666  <arg value="--noinit"/> 
667  <arg value="--eval"/><arg value="(require (quote asdf))"/>
668  <arg value="--eval"/><arg value="(asdf:operate (quote asdf:load-op) :abcl)"/>
669  <arg value="--eval"/><arg value="(asdf:operate (quote asdf:test-op) :ansi-compiled)"/>
670        <arg value="--eval"/><arg value="(ext:exit)"/>
671      </java>
672      <record name="${abcl.test.log.file}" emacsmode="true" action="stop"/>
673      <echo>Finished recording test output in ${abcl.test.log.file}.</echo>
674    </target>
675
676    <target name="test.abcl" depends="abcl.jar">
677      <echo>Recording test output in ${abcl.test.log.file}.</echo>
678      <record name="${abcl.test.log.file}" emacsmode="true" action="start" append="yes"/>
679      <java fork="true" dir="${basedir}"
680      classpathref="abcl.classpath.dist"
681      classname="org.armedbear.lisp.Main">
682  <arg value="--noinit"/> 
683  <arg value="--eval"/><arg value="(require (quote asdf))"/>
684  <arg value="--eval"/><arg value="(asdf:operate (quote asdf:load-op) :abcl)"/>
685  <arg value="--eval"/><arg value="(asdf:operate (quote asdf:test-op) :abcl-test-lisp)"/>
686        <arg value="--eval"/><arg value="(ext:exit)"/>
687      </java>
688      <record name="${abcl.test.log.file}" emacsmode="true" action="stop"/>
689      <echo>Finished recording test output in ${abcl.test.log.file}.</echo>
690    </target>
691
692    <target name="test.cl-bench" depends="abcl.jar">
693      <echo>Recording test output in ${abcl.test.log.file}.</echo>
694      <record name="${abcl.test.log.file}" emacsmode="true" action="start" append="yes"/>
695      <java fork="true" dir="${basedir}"
696      classpathref="abcl.classpath.dist"
697      classname="org.armedbear.lisp.Main">
698  <arg value="--noinit"/> 
699  <arg value="--eval"/><arg value="(require (quote asdf))"/>
700  <arg value="--eval"/><arg value="(asdf:operate (quote asdf:load-op) :abcl)"/>
701  <arg value="--eval"/><arg value="(asdf:operate (quote asdf:test-op) :cl-bench)"/>
702        <arg value="--eval"/><arg value="(ext:exit)"/>
703      </java>
704      <record name="${abcl.test.log.file}" emacsmode="true" action="stop"/>
705      <echo>Finished recording test output in ${abcl.test.log.file}.</echo>
706    </target>
707   
708    <target name="abcl.release" 
709            depends="abcl.binary.tar,abcl.source.tar,abcl.binary.zip,abcl.source.zip">
710      <copy file="${abcl.jar.path}"
711            tofile="${dist.dir}/abcl-${abcl.version}.jar"/>
712    </target>
713
714    <import file="netbeans-build.xml" optional="true"/> 
715<!--    <import file="j-build.xml" optional="true"/>  -->
716    <import file="not.org-build.xml" optional="true"/> 
717</project>
718
719
720
721
Note: See TracBrowser for help on using the repository browser.