source: trunk/abcl/build.xml

Last change on this file was 15807, checked in by Mark Evenson, 2 days ago

build: fix abcl.test target

Target openjdk8 for tests.

  • Property svn:eol-style set to LF
File size: 49.5 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,abcl-contrib.jar"/>
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 'abcl.properties' file. -->
31    <property file="abcl.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-aio.jar.path"
44              value="${dist.dir}/abcl-aio.jar"/>
45    <property name="abcl.ext.dir"
46              value="${basedir}/ext"/>
47
48    <property name="abcl.runtime.jar.path"
49              value="${abcl.jar.path}"/>
50
51    <!-- TODO verify me -->
52    <fail message="Please build using Ant 1.7.1 or higher.">
53        <condition>
54            <not>
55                <antversion atleast="1.7.1"/>
56            </not>
57        </condition>
58    </fail>
59
60    <!-- Deprecated.  Checks if JSR-223 support is available.  Should always be true.  Unused.  D -->
61    <available property="abcl.jsr-223.p"
62               classname="javax.script.ScriptEngine"/>
63
64    <patternset id="abcl.source.java">
65      <include name="org/armedbear/lisp/*.java"/>
66      <include name="org/armedbear/lisp/util/*.java"/>
67      <include name="org/armedbear/lisp/protocol/*.java"/>
68      <include name="org/armedbear/lisp/java/**/*.java"/>
69      <include name="org/armedbear/lisp/scripting/*.java" />
70      <include name="org/armedbear/lisp/scripting/util/*.java" />
71      <include name="org/armedbear/Main.java"/>
72      <include name="org/abcl/**/*.java"/>
73    </patternset>
74
75    <patternset id="abcl.source.lisp">
76      <include name="org/armedbear/lisp/*.lisp"/>
77      <include name="org/armedbear/lisp/java/**/*.lisp"/>
78      <include name="org/armedbear/lisp/tests/*.lisp"/>
79      <exclude name="org/armedbear/lisp/j.lisp"/>
80      <include name="org/armedbear/lisp/scripting/lisp/*.lisp"/>
81    </patternset>
82   
83    <!-- Lisp files required at runtime -->
84    <patternset id="abcl.source.lisp.dist">
85      <include name="org/armedbear/lisp/boot.lisp"/>
86      <include name="org/armedbear/lisp/scripting/lisp/*.lisp" />
87      <include if="abcl.compile.lisp.skip"
88               name="**/*.lisp" />
89    </patternset>
90
91    <patternset id="abcl.objects">
92      <!-- "system.lisp" is dynamically created by COMPILE-fSYSTEM -->
93      <include name="org/armedbear/lisp/system.lisp"/> 
94      <include name="org/armedbear/lisp/**/*.class"/>
95      <include name="org/armedbear/lisp/**/*.cls"/> 
96      <include name="org/armedbear/lisp/**/*.abcl"/>
97      <include name="org/abcl/util/*.class"/>
98      <include name="org/armedbear/lisp/version"/>
99      <include name="org/armedbear/lisp/scripting/*.class"/>
100      <include name="org/armedbear/lisp/scripting/util/*.class"/>
101      <patternset refid="abcl.source.lisp.dist"/>
102      <include name="abcl.rdf"/>
103      <include name="abcl.asd"/>
104      <include name="README"/>
105      <include name="build.xml"/>
106      <include name="abcl.properties.in"/>
107      <include name="abcl.in"/>
108      <include name="abcl.bat.in"/>
109    </patternset>
110   
111    <path id="abcl.classpath.dist">
112      <pathelement location="${abcl.jar.path}"/>
113    </path>
114   
115    <path id="abcl.classpath.build">
116      <pathelement location="${build.classes.dir}"/>
117    </path>
118
119    <target name="abcl.compile" depends="abcl.clean.maybe,abcl.compile.lisp">
120      <echo>Compiled ABCL with Java version: ${java.version}</echo>
121    </target>
122
123    <target name="abcl.clean.maybe" unless="abcl.build.incremental">
124      <echo>Cleaning all intermediate compilation artifacts.</echo>
125      <echo>Setting 'abcl.build.incremental' enables incremental compilation.</echo>
126      <antcall target="abcl.clean"/>
127    </target>
128
129    <target name="abcl.init">
130      <tstamp>
131        <format property="build" pattern="EEE MMM dd yyyy HH:mm:ss zzz"/>
132      </tstamp>
133
134      <tstamp>
135        <format property="build.stamp" pattern="yyyymmdd-HHmm"/>
136      </tstamp>
137
138      <property name="abcl.test.log.file"
139                value="abcl-test-${build.stamp}.log"/>
140
141      <property name="java.path"
142                value="${java.home}/bin/java"/>
143
144      <!-- Deprecated. Two main types of build environents: 'unix' or 'windows'. -->
145      <condition property="unix"> 
146        <or>
147          <os family="unix"/>
148          <os family="mac"/>
149        </or>
150      </condition>
151      <condition property="windows"> 
152        <os family="windows"/>
153      </condition>
154
155      <!-- Deprecated. -->
156      <available file="${src.dir}org/armedbear/lisp/Interpreter.java" 
157                 property="abcl.lisp.p"/>
158
159      <echo>java.version: ${java.version}</echo>
160      <condition property="abcl.java.version.p">
161        <!-- Unsupported as of abcl-1.5.0 due to lack of open jdk
162          <matches string="${java.version}"
163                   pattern="1\.5"/>
164          -->
165          <or>
166          <!-- Don't use 1.6.0_09 or earlier. -->
167          <matches string="${java.version}" 
168                   pattern="1\.6\.0_[1-9][0-9]"/>
169          <!-- 1.7.0_04 works much better. -->
170          <matches string="${java.version}" 
171                   pattern="1\.7\.0_(0[4-9])|([1-9][0-9])"/>
172          <matches string="${java.version}" 
173                   pattern="1\.8\.0"/>
174        </or> 
175      </condition>
176
177    </target>
178   
179    <target name="abcl.java.warning" 
180            depends="abcl.init"
181            unless="abcl.java.version.p">
182      <echo>WARNING: Use of Java version ${java.version} not recommended.</echo>
183    </target>
184
185    <!-- Deprecated.  JSR-223 is always present -->
186    <target name="abcl.jsr-223.notice"
187            depends="abcl.init"
188            unless="abcl.jsr-223.p">
189      <echo>
190        Notice: JSR-223 support won't be built since it is not
191                supported, neither natively by your JVM nor by
192                libraries in the CLASSPATH.
193      </echo>
194    </target>
195
196    <!-- The Java compilation options are perhaps underspecified in
197         terms of the target JVM in order to support a developer who
198         simply wants to compile and run locally with least hassles.
199   
200   When preparing ABCL binaries for wider distribution, the
201   values of the abcl.build.target.javac and
202   abcl.build.source.java become more important. 
203
204         The 'abcl.properties.autoconfigure.*' targets use the
205         ci/create-build-properties.bash script to set these options
206         for various openjdk platforms.
207    -->
208
209    <target name="abcl.compile.java" 
210            depends="abcl.init,abcl.java.warning">
211      <mkdir dir="${build.dir}"/>
212      <mkdir dir="${build.classes.dir}"/>
213      <javac destdir="${build.classes.dir}"
214             debug="true"
215             includeantruntime="false"
216             encoding="UTF-8"
217             failonerror="true">
218        <src path="${src.dir}"/>
219        <patternset refid="abcl.source.java"/>
220      </javac>
221    </target>
222
223    <!-- Additional artifacts to stage relative to Ant ${basedir} -->
224    <patternset id="abcl.stage">
225      <include name="README"/>
226      <include name="COPYING"/>
227      <include name="abcl.rdf"/>
228      <include name="abcl.asd"/> 
229      <include name="build.xml"/>
230      <include name="abcl.properties.in"/> <!--TODO: massage into abcl.properties at build-time -->
231      <include name="abcl.in"/>
232      <include name="abcl.bat.in"/>
233      <include name="etc/ant/*.xml"/>
234    </patternset>
235
236    <target name="abcl.stage"
237      depends="abcl.copy.lisp">
238      <copy todir="${build.classes.dir}" preservelastmodified="yes"
239            verbose="true">
240  <fileset dir="${basedir}/">
241    <patternset refid="abcl.stage"/>
242  </fileset>
243      </copy>
244    </target>
245   
246    <target name="abcl.copy.lisp">
247      <copy todir="${build.classes.dir}" preservelastmodified="yes">
248        <fileset dir="${src.dir}">
249          <patternset refid="abcl.source.lisp.dist"/>
250        </fileset>
251      </copy>
252    </target>
253
254    <!-- Adjust the patternset for ABCL source to use the much faster
255         Ant 'uptodate' task to check if we need to compile the system
256         fasls.  Highly inter-dependent with the behavior specified in
257         'compile-system.lisp', i.e. files not listed in
258         there should NOT occur here. -->
259    <patternset id="abcl.source.lisp.fasls">
260      <patternset refid="abcl.source.lisp"/>
261      <exclude name="org/armedbear/lisp/scripting/**/*.lisp"/>
262      <exclude name="org/armedbear/lisp/boot.lisp"/>
263      <exclude name="org/armedbear/lisp/emacs.lisp"/>
264      <exclude name="org/armedbear/lisp/run-benchmarks.lisp"/>
265    </patternset>
266
267    <target name="abcl.fasls.uptodate">
268      <uptodate property="abcl.fasls.uptodate.p" value="true">
269        <srcfiles dir="${src.dir}">
270          <patternset refid="abcl.source.lisp.fasls"/>
271        </srcfiles>
272        <mapper type="glob" from="*.lisp" to="${build.classes.dir}/*.abcl"/>
273      </uptodate>
274    </target>
275
276    <path id="abcl.home.dir.path">
277        <path location="${src.dir}/org/armedbear/lisp/"/>
278    </path>         
279    <pathconvert property="abcl.home.dir" refid="abcl.home.dir.path"/>
280
281    <path id="abcl.lisp.output.path"
282          location="${build.classes.dir}/org/armedbear/lisp/"/>
283    <pathconvert dirsep="/" property="abcl.lisp.output" refid="abcl.lisp.output.path"/>
284
285    <property name="system.lisp.file" 
286              value="${build.classes.dir}/org/armedbear/lisp/system.lisp"/>
287
288    <target name="abcl.compile.lisp" 
289            depends="abcl.stage,abcl.compile.java,abcl.system.update.maybe,abcl.fasls.uptodate"
290            unless="abcl.fasls.uptodate.p">
291      <abcl.compile.lisp/>
292    </target>
293
294    <macrodef name="abcl.compile.lisp">
295      <element name="additional.jvmarg" optional="true"/>
296      <sequential>
297        <echo>
298Compiling Lisp system
299from ${abcl.home.dir}
300 to  ${abcl.lisp.output}</echo>
301 
302     <!-- Not good if ${abcl.home.dir} == ${abcl.lisp.output} -->
303     <delete>
304       <fileset dir="${abcl.home.dir}" includes="**/*.abcl **/*.cls **/*._"/>
305     </delete>
306     <java classpath="${build.classes.dir}" 
307            fork="true"
308            failonerror="true"
309            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))))"
310            classname="org.armedbear.lisp.Main">
311        <jvmarg value="-Dabcl.home=${abcl.home.dir}${file.separator}"/>
312        <jvmarg value="-Dabcl.autoload.verbose=Y"/>
313        <additional.jvmarg/>
314        <arg value="--noinit"/>
315        <arg value="--nosystem"/>
316        <arg value="--eval"/>
317        <arg value="(setf *load-verbose* t)"/>
318      </java>
319      <concat destfile="${system.lisp.file}" append="true">
320        <fileset file="${abcl.startup.file}"/>
321      </concat>
322        </sequential>
323    </macrodef>
324
325    <property name="abcl.compile.lisp.debug.jvmarg"
326              value="-agentlib:jdwp=transport=dt_socket,server=y,address=6789,suspend=y"/>
327    <target name="abcl.compile.lisp.debug" 
328            depends="abcl.stage,abcl.compile.java,abcl.system.update.maybe,abcl.fasls.uptodate"
329            unless="abcl.fasls.uptodate.p">
330      <echo>Debugging with jvmarg ${abcl.compile.lisp.debug.jvmarg}</echo>
331      <abcl.compile.lisp> 
332          <additional.jvmarg>
333            <jvmarg value="${abcl.compile.lisp.debug.jvmarg}"/>
334          </additional.jvmarg>
335      </abcl.compile.lisp>
336    </target>
337
338    <property name="abcl.build.path"
339              value="${build.classes.dir}/org/armedbear/lisp/build"/>
340    <target name="abcl.stamp" 
341            depends="abcl.compile,abcl.stamp.version,abcl.stamp.hostname">
342      <mkdir dir="${abcl.build.path}/.."/>
343      <loadfile property="abcl.version"
344                srcFile="${abcl.version.path}"/>
345      <echo message="${build}" file="${abcl.build.path}"/>   
346    </target>
347
348
349    <!-- Environment variables may be accessed as ${env.NAME} -->
350    <property environment="env"/>
351
352    <!-- Can we derive an SVN version from the current build tree? -->
353    <condition property="abcl.version.svn.p">
354      <and>
355        <available
356            file="${basedir}/.svn"
357            type="dir"/>
358        <or>
359            <available
360                file="svnversion.exe"
361                filepath="${env.Path}"/>
362            <available
363                file="svnversion.exe"
364                filepath="${env.PATH}"/>
365             <available
366                file="svnversion"
367                filepath="${env.Path}"/>
368            <available
369                file="svnversion"
370                filepath="${env.PATH}"/>
371        </or>
372      </and>
373    </condition>
374
375    <target name="abcl.version.src" depends="abcl.version.src.3"/>
376
377    <target name="abcl.version.src.0" if="windows">
378      <exec
379          executable="svnversion.exe"
380          outputproperty="abcl.version.svn.raw"
381          failifexecutionfails="false"
382          searchpath="true" />
383    </target>
384
385    <target name="abcl.version.src.1" depends="abcl.version.src.0">
386      <exec 
387          executable="svnversion"
388          outputproperty="abcl.version.svn.raw"
389          failifexecutionfails="false"
390          searchpath="true" />
391    </target>
392
393    <target name="abcl.version.src.2" 
394            depends="abcl.version.src.1"
395            if="abcl.version.svn.p">
396
397      <!-- Transform all occurances of ":" ==> "-" in the version string -->
398      <tempfile property="version-tmp.path"/>
399      <echo message="${abcl.version.svn.raw}"
400            file="${version-tmp.path}"/>
401      <replace file="${version-tmp.path}"
402               token=":" value="-"/>
403      <loadfile property="abcl.version.svn" srcFile="${version-tmp.path}"/>
404      <delete file="${version-tmp.path}"/>
405
406      <echo>abcl.version.svn: ${abcl.version.svn}</echo>
407      <property name="abcl.version.src"
408                value="svn-${abcl.version.svn}"/>
409    </target>
410
411    <target name="abcl.version.src.3"
412            depends="abcl.version.src.2"
413            unless="abcl.version.svn.p">
414      <property name="abcl.version.src"
415                value=""/>
416    </target>
417
418    <property name="abcl.home.dir"
419              value="${src.dir}/org/armedbear/lisp/"/>
420    <property name="abcl.version.path"
421              value="${build.classes.dir}/org/armedbear/lisp/version"/>
422
423    <target name="abcl.clean.version">
424      <delete file="${abcl.version.path}"/>
425    </target>
426
427    <target name="abcl.stamp.version.uptodate">
428      <uptodate property="abcl.stamp.version.uptodate.p" 
429                targetfile="${abcl.version.path}"
430                srcfile="${build.classes.dir}/org/armedbear/lisp/Version.class"/>
431    </target>
432
433    <!--
434The usage of abcl.implementation.version is deprecated as not working.
435The intention of this value was that if a given source tree could be
436unidentified as being under source control by the presence of given
437revision control system artifacts, the abcl.implementation.version
438would contain a version derived from the revision control system.
439
440To hack around the non-prescriptive nature of Ant, chains of
441conditional targets had to be created that while might have once
442worked for Subversion, were going to get increasingly hairy for
443Mercurial and Git.
444    -->
445
446    <target name="abcl.stamp.version" 
447            depends="abcl.version.src,abcl.stamp.version.1,abcl.stamp.version.2"
448            unless="abcl.stamp.version.uptodate.p">
449      <mkdir dir="${abcl.version.path}/.."/>
450      <echo>ABCL implementation version: ${abcl.implementation.version}</echo>
451      <echo file="${abcl.version.path}">${abcl.implementation.version}</echo>
452    </target>
453   
454    <target name="abcl.stamp.version.generate" 
455            depends="abcl.compile.java"
456            unless="abcl.stamp.version.uptodate.p">
457      <java fork="true"
458            classpath="${build.classes.dir}"
459            outputproperty="abcl.version"
460            classname="org.armedbear.lisp.Version"
461            logerror="yes"/> <!-- Don't catch stderr output -->
462    </target>
463
464    <target name="abcl.stamp.version.0" 
465            depends="abcl.stamp.version.uptodate,abcl.stamp.version.generate">
466    </target>
467
468    <target name="abcl.stamp.version.1"
469            depends="abcl.stamp.version.0"
470            unless="abcl.version.svn.p">
471      <property name="abcl.implementation.version"
472                value="${abcl.version}"/>
473    </target>
474
475    <target name="abcl.stamp.version.2" 
476            depends="abcl.stamp.version.0"
477            if="abcl.version.svn.p">
478      <property name="abcl.implementation.version"
479                value="${abcl.version}-${abcl.version.src}"/>
480    </target>
481
482    <target name="abcl.stamp.hostname" if="unix">
483      <exec executable="hostname" outputproperty="abcl.hostname"/>
484      <echo>abcl.hostname: ${abcl.hostname}</echo>
485    </target>
486
487    <target name="abcl.system.uptodate">
488      <condition property="abcl.system.needs-update.p">
489        <and>
490          <available file="${system.lisp.file}"/>
491          <available file="${abcl.startup.file}"/>
492          <uptodate
493                srcfile="${system.lisp.file}"
494                targetfile="${abcl.startup.file}"/>
495        </and>
496      </condition>
497    </target>
498   
499    <target name="abcl.system.update.maybe" depends="abcl.system.uptodate" 
500            if="abcl.system.needs-update.p">
501      <touch file="${src.dir}/org/armedbear/lisp/compile-system.lisp"/>
502    </target>
503
504    <target name="abcl.jar.uptodate" depends="abcl.compile,abcl.stamp">
505      <uptodate property="abcl.jar.uptodate.p" targetfile="${abcl.jar.path}">
506        <srcfiles dir="${build.classes.dir}">
507          <patternset refid="abcl.objects"/>
508        </srcfiles>
509      </uptodate>
510    </target>
511
512    <target name="abcl.jar" depends="abcl.jar.uptodate,abcl-contrib.jar"
513            unless="abcl.jar.uptodate.p">
514      <mkdir dir="${dist.dir}"/>
515      <jar destfile="${abcl.jar.path}"
516           compress="true"
517           update="true"
518           basedir="${build.classes.dir}">
519        <patternset refid="abcl.objects"/>
520        <manifest>
521          <attribute name="Main-Class" value="org.armedbear.lisp.Main"/>
522          <section name="org/armedbear/lisp">
523            <attribute name="Implementation-Title" 
524                       value="ABCL"/>
525            <attribute name="Implementation-Version" 
526                       value="${abcl.version}"/>
527            <attribute name="Implementation-Build" 
528                       value="${build}"/>
529          </section>
530        </manifest>
531        <metainf dir="${src.dir}/META-INF"> 
532        </metainf>
533      </jar>
534    </target>
535
536    <target name="abcl-aio.jar"
537            depends="abcl.jar.uptodate">
538      <mkdir dir="${dist.dir}"/>
539      <jar destfile="${abcl-aio.jar.path}"
540           compress="true"
541           update="true"
542           basedir="${build.classes.dir}">
543  <fileset dir="${src.dir}">
544          <patternset refid="abcl.objects"/>
545    <patternset refid="abcl.source.java"/>
546    <patternset refid="abcl.source.lisp"/>
547  </fileset>
548  <fileset dir="${basedir}">
549    <patternset refid="abcl.contrib.source"/>
550  </fileset>
551        <!-- According to <http://docs.oracle.com/javase/8/docs/technotes/guides/jar/jar.html>
552             any attributes not specified are ignored, so we are free to make up new attributes if necessary.  For now we just overload Implementation-Title and Implementation-Version.
553            -->
554        <manifest>
555          <attribute name="Main-Class" value="org.armedbear.lisp.Main"/>
556          <section name="org/armedbear/lisp">
557            <attribute name="Implementation-Title" 
558                       value="ABCL"/>
559            <attribute name="Implementation-Version" 
560                       value="${abcl.version}"/>
561            <attribute name="Implementation-Build" 
562                       value="${build}"/>
563          </section>
564          <section name="contrib">
565            <attribute name="Implementation-Title" 
566                       value="org.abcl-contrib"/>
567            <!-- FIXME: declare separate abcl-contrib version? -->
568            <attribute name="Implementation-Version" 
569                       value="${abcl.version}"/>
570          </section>
571          <section name="tools">
572            <attribute name="Implementation-Title" 
573                       value="org.abcl-tools"/>
574          </section>
575          <section name="src">
576            <attribute name="Implementation-Title" 
577                       value="org.abcl-source"/>
578            <attribute name="Implementation-Version" 
579                       value="${abcl.version}"/>
580          </section>
581        </manifest>
582        <metainf dir="${src.dir}/META-INF"> 
583        </metainf>
584      </jar>
585    </target>
586
587   
588    <target name="abcl.wrapper" 
589            depends="abcl.jar,abcl.contrib,abcl.wrapper.unix,abcl.wrapper.windows">
590      <description>
591        Creates in-place executable shell/batch invocation wrapper for ABCL in
592        '${abcl.wrapper.file}'
593      </description>
594      <!-- Set from commandline or in 'build.properties' -->
595      <property name="additional.jars" value=""/>
596      <path id="abcl.runtime.classpath">
597        <pathelement location="${abcl.runtime.jar.path}"/>
598        <pathelement path="${additional.jars}"/>
599      </path>
600
601      <!--
602          set via '-Djava.options=JAVA_OPTIONS' or in <file:abcl.properties>
603
604          See 'abcl.properties.autoconfigure.openjdk.*' targets for
605          creation of <file:abcl.properties> for a given JVM invocation.
606      -->
607      <property name="java.options" value=""/>
608
609      <copy file="${abcl.wrapper.in.file}" toFile="${abcl.wrapper.file}" overwrite="yes">
610        <filterset>
611          <filter token="JAVA" 
612                  value="${java.path}"/>
613          <filter token="ABCL_JAVA_OPTIONS" 
614                  value="${java.options}"/>
615          <filter token="ABCL_CLASSPATH"
616                  value="${toString:abcl.runtime.classpath}"/>
617        </filterset>
618      </copy>
619      <chmod file="${abcl.wrapper.file}" perm="a+x"/>
620
621      <echo>Created an executable ABCL wrapper at</echo>
622      <echo/>
623      <echo>  ${basedir}/${abcl.wrapper.file}</echo>
624      <echo/>
625      <echo>with the options</echo>
626      <echo/>
627      <echo>  ${java.options}</echo>
628      <echo/>
629      <echo>N.b. This wrapper requires '${abcl.jar.path}' not be moved.</echo>
630    </target>
631
632    <target name="abcl.wrapper.unix" if="unix">
633      <property name="abcl.wrapper.file" value="abcl"/>
634      <property name="abcl.wrapper.in.file" value="abcl.in"/>
635    </target>
636
637    <target name="abcl.wrapper.windows" if="windows">
638      <property name="abcl.wrapper.file" value="abcl.bat"/>
639      <property name="abcl.wrapper.in.file" value="abcl.bat.in"/>
640    </target>
641
642    <patternset id="abcl.contrib.source">
643          <include name="**/*.asd"/>
644          <include name="**/*.lisp"/>
645          <include name="**/README.markdown"/>
646    </patternset>
647
648    <patternset id="abcl.contrib.docs">
649          <include name="**/README.markdown"/>
650    </patternset>
651
652    <property name="abcl-contrib.jar"
653              value="${dist.dir}/abcl-contrib.jar"/>
654    <condition property="abcl.contrib.uptodate.p">
655      <uptodate targetfile="${abcl-contrib.jar}">
656        <srcfiles dir="contrib">
657          <patternset refid="abcl.contrib.source"/>
658        </srcfiles>
659      </uptodate>
660    </condition>
661
662    <target name="abcl-contrib.jar" depends="abcl.contrib"/>
663    <target name="abcl.contrib" unless="abcl.contrib.uptodate.p">
664      <jar destfile="${abcl-contrib.jar}"
665           compress="true"
666           basedir="contrib">
667        <patternset refid="abcl.contrib.source"/>
668      </jar>
669      <echo>
670Packaged contribs in ${abcl-contrib.jar}. To use contribs, ensure that
671this file is in the same directory as 'abcl.jar', and then
672
673  CL-USER> (require 'abcl-contrib)
674
675will place all the contribs in the ASDF registry.
676
677To load a contrib, something like
678
679  CL-USER> (require 'jss)
680
681will compile (if necessary) and load JSS.
682</echo>
683    </target>
684
685    <target name="abcl.contrib.javadoc.jar">
686      <mkdir dir="${dist.dir}"/>
687      <jar destfile="${dist.dir}/abcl-contrib-javadoc.jar" basedir="contrib">
688        <patternset refid="abcl.contrib.docs" />
689      </jar>
690    </target>
691
692    <target name="abcl.contrib.source.jar">
693      <mkdir dir="${dist.dir}"/>
694      <jar destfile="${dist.dir}/abcl-contrib-sources.jar" basedir="contrib">
695        <patternset refid="abcl.contrib.source" />
696      </jar>
697    </target>
698
699    <target name="abcl.debug.jpda" depends="abcl.jar">
700      <description>Invoke ABCL with JPDA listener on port 6789</description>
701      <java fork="true"
702            classpathref="abcl.classpath.dist"
703            classname="org.armedbear.lisp.Main">
704        <jvmarg 
705            value="-agentlib:jdwp=transport=dt_socket,address=6789,server=y"/>
706      </java>
707      <echo>JPDA listening on localhost:6789</echo>
708    </target>
709
710    <target name="abcl.build.debug.jpda" depends="abcl.compile.java">
711      <description>Invoke ABCL with JPDA listener on port 6789</description>
712      <java fork="true"
713            classpathref="abcl.classpath.build"
714            classname="org.armedbear.lisp.Main">
715        <jvmarg
716            value="-agentlib:jdwp=transport=dt_socket,address=6789,server=y"/>
717        <jvmarg value="-Dabcl.home=${abcl.home.dir}${file.separator}"/>
718      </java>
719      <echo>JPDA listening on localhost:6789</echo>
720    </target>
721
722    <target name="abcl.run" depends="abcl.jar">
723      <java fork="true"
724            classpathref="abcl.classpath.dist"
725            classname="org.armedbear.lisp.Main">
726      </java>
727    </target>
728
729    <target name="abcl.clean">
730      <delete dir="${build.dir}"/>
731      <delete file="${abcl.jar.path}"/>
732      <delete file="abcl"/>
733      <delete file="abcl.bat"/>
734    </target>
735
736    <property name="slime.fasls" 
737              value="${user.home}/.slime/"/>
738    <property name="quicklisp.common-lisp.fasls"
739              value="${user.home}/.cache/common-lisp/"/>
740    <target name="abcl.clean.application.fasls">
741      <echo>Deleting ABCL SLIME fasls under ${slime.fasls}</echo>
742      <delete>
743        <fileset dir="${slime.fasls}" includes="**/*.abcl"/>
744      </delete>
745      <echo>Deleting ABCL Quicklisp fasls under ${quicklisp.common-lisp.fasls}</echo>
746      <delete>
747        <fileset dir="${quicklisp.common-lisp.fasls}" includes="**/*.abcl"/>
748      </delete>
749    </target>
750
751    <target name="abcl.dist" depends="abcl.jar">
752      <copy file="${abcl.jar.path}"
753            toFile="${dist.dir}/abcl-${abcl.version}.jar"/>
754    </target>
755
756    <target name="abcl.distclean" depends="abcl.clean">
757      <delete dir="${dist.dir}"/>
758      <delete file="abcl"/>
759      <delete file="abcl.bat"/>
760    </target>
761
762    <condition property="etags.executable"
763               value="etags"
764               else="c:/cygwin64/bin/ctags.exe">
765      <not>
766        <os family="windows"/>
767      </not>
768    </condition>
769
770    <!-- If the etags executable isn't found, one can specify the -->
771    <!-- correct absolute path via the etags.executable property: -->
772    <!-- ant -Detags.executable=/Users/evenson/bin/etags -->
773    <target name="TAGS">
774      <delete file="TAGS"/>
775      <apply executable="${etags.executable}" parallel="true" verbose="true" maxparallel="300">
776        <arg value="--append"/>
777        <arg value="--regex=|[ \t]+//[ \t]+###[ \t]+\([^ \t]+\)|\1|"/>
778        <arg value='--regex=|[ \t]*@DocString([ \n\r\t]*name=\"\([^\"]*\)|\1|m'/>
779        <fileset dir="${src.dir}">
780          <patternset refid="abcl.source.java"/>
781          <patternset refid="abcl.source.lisp"/>
782        </fileset>
783      </apply>
784    </target>
785
786    <patternset id="abcl.dist.misc"
787                description="Additional includes in the source distributions relative to basedir">
788      <include name="abcl.rdf"/>
789      <include name="build.xml"/>
790      <include name="abcl.properties.in"/>
791      <include name="COPYING"/>
792      <include name="README"/>
793      <include name="CHANGES"/>
794      <include name="abcl.in"/>
795      <include name="abcl.bat.in"/>
796
797      <include name="abcl.asd"/>
798     
799      <include name="examples/**"/>
800
801      <include name="contrib/**"/>
802     
803      <include name="test/**"/>
804
805      <include name="build-from-lisp.bash"/>
806     
807      <include name="build-abcl.lisp"/>
808      <include name="customizations.lisp.in"/>
809
810      <include name="etc/ant/*.xml"/>
811
812      <include name="doc/**/*"/>
813
814      <include name="ci/**/*"/>
815
816      <!-- FIXME:  currently necessary to build from our source archives -->
817      <include name="nbproject/**/*"/>
818    </patternset>
819
820    <!-- TODO merge with artifacts from 'abcl.stage' -->
821    <patternset 
822        id="abcl.source.misc"
823        description="Additional includes in the source distribution relative to source root">
824      <include name="org/armedbear/lisp/LICENSE"/>
825      <include name="manifest-abcl"/>
826      <include name="META-INF/services/javax.script.ScriptEngineFactory"/>
827    </patternset>
828
829    <target name="abcl.source.prepare" depends="abcl.stamp">
830      <property name="abcl.build.src.dir"
831                value="${build.dir}/abcl-src-${abcl.version}"/>
832      <mkdir dir="${abcl.build.src.dir}/src"/>
833      <copy todir="${abcl.build.src.dir}/src"
834            preservelastmodified="true">
835        <fileset dir="${src.dir}"
836                 id="abcl.source.src">
837            <patternset refid="abcl.source.java"/>
838            <patternset refid="abcl.source.lisp"/>
839            <patternset refid="abcl.source.misc"/>
840        </fileset>
841      </copy>
842      <copy todir="${abcl.build.src.dir}"
843            preservelastmodified="true">
844        <fileset dir="${basedir}">
845            <patternset refid="abcl.dist.misc"/>
846        </fileset>
847      </copy>
848    </target>
849
850    <!--  Files in source distribution that always get LF EOL (aka
851         'unix') -->   
852    <patternset id="abcl.dist.lf">
853      <include name="abcl.in"/>
854    </patternset>
855
856    <!--  Files in source distribution that always get CRLF EOL (aka
857         'dos') -->   
858    <patternset id="abcl.dist.crlf">
859      <include name="abcl.bat.in"/>
860    </patternset>
861
862    <target name="abcl.source.unix" depends="abcl.source.prepare">
863      <fixcrlf srcdir="${abcl.build.src.dir}"
864               preservelastmodified="true"
865               eol="lf">
866      </fixcrlf>
867
868      <fixcrlf srcdir="${abcl.build.src.dir}"
869               preservelastmodified="true"
870               eol="crlf">
871          <patternset refid="abcl.dist.crlf"/>
872      </fixcrlf>
873
874      <fixcrlf srcdir="${abcl.build.src.dir}"
875               preservelastmodified="true"
876               eol="lf">
877          <patternset refid="abcl.dist.lf"/>
878      </fixcrlf>
879    </target>
880
881    <target name="abcl.source.tar" depends="abcl.source.unix">
882      <mkdir dir="${dist.dir}"/>
883      <tar destfile="${dist.dir}/abcl-src-${abcl.version}.tar.gz"
884           compression="gzip">
885        <tarfileset dir="${build.dir}">
886          <include name="abcl-src-${abcl.version}/**"/>
887        </tarfileset>
888      </tar>
889    </target>
890
891    <target name="abcl.source.windows" depends="abcl.source.prepare">
892      <fixcrlf srcdir="${abcl.build.src.dir}"
893               preservelastmodified="true"
894               eol="crlf">
895      </fixcrlf>
896
897      <fixcrlf srcdir="${abcl.build.src.dir}"
898               preservelastmodified="true"
899               eol="crlf">
900          <patternset refid="abcl.dist.crlf"/>
901      </fixcrlf>
902
903      <fixcrlf srcdir="${abcl.build.src.dir}"
904               preservelastmodified="true"
905               eol="lf">
906          <patternset refid="abcl.dist.lf"/>
907      </fixcrlf>
908    </target>
909
910    <target name="abcl.source.zip" depends="abcl.stamp,abcl.source.windows">
911      <mkdir dir="${dist.dir}"/>
912      <zip destfile="${dist.dir}/abcl-src-${abcl.version}.zip"
913           compress="true">
914        <zipfileset dir="${abcl.build.src.dir}" prefix="abcl-src-${abcl.version}"/>
915      </zip>
916    </target>
917
918    <target name="abcl.source.jar" depends="abcl.stamp,abcl.source.unix">
919      <mkdir dir="${dist.dir}"/>
920      <jar destfile="${dist.dir}/abcl-${abcl.version}-sources.jar">
921        <metainf dir="${abcl.build.src.dir}">
922          <include name="COPYING"/>
923        </metainf>
924        <fileset dir="${abcl.build.src.dir}/src">
925          <include name="**/*.java"/>
926          <include name="**/*.lisp"/>
927        </fileset>
928      </jar>
929    </target>
930
931    <property name="abcl.javadoc.dir" value="${build.dir}/javadoc"/>
932
933    <target name="abcl.javadoc" depends="abcl.stamp">
934      <mkdir dir="${abcl.javadoc.dir}"/>
935      <javadoc destdir="${abcl.javadoc.dir}"
936               sourcepath="${src.dir}"/>
937    </target>
938   
939    <target name="abcl.javadoc.jar" depends="abcl.stamp.version,abcl.javadoc">
940      <mkdir dir="${dist.dir}"/>
941      <jar destfile="${dist.dir}/abcl-${abcl.version}-javadoc.jar">
942        <fileset dir="${abcl.javadoc.dir}"/>
943      </jar>
944    </target>
945
946    <target name="abcl.binary.prepare" depends="abcl.jar,abcl.contrib,abcl.documentation,abcl.stamp.version">
947      <property name="abcl.build.binary.dir"
948                value="${build.dir}/abcl-bin-${abcl.version}"/>
949      <mkdir dir="${abcl.build.binary.dir}"/>
950      <copy todir="${abcl.build.binary.dir}"
951            preservelastmodified="true">
952        <fileset dir="${basedir}/dist">
953          <patternset>
954            <include name="abcl.jar"/>
955            <include name="abcl-contrib.jar"/>
956            <include name="*.pdf"/>
957          </patternset>
958        </fileset>
959        <fileset dir="${basedir}">
960          <patternset>
961            <include name="README"/>
962            <include name="CHANGES"/>
963          </patternset>
964        </fileset>
965      </copy>
966    </target>
967
968    <target name="abcl.binary.tar" depends="abcl.binary.prepare">
969      <tar destfile="${dist.dir}/abcl-bin-${abcl.version}.tar.gz"
970           compression="gzip">
971        <tarfileset dir="${build.dir}">
972          <include name="abcl-bin-${abcl.version}/**"/>
973          </tarfileset>
974      </tar>
975    </target>
976
977    <target name="abcl.binary.zip" depends="abcl.binary.prepare">
978      <zip destfile="${dist.dir}/abcl-bin-${abcl.version}.zip"
979           compress="true">
980        <zipfileset dir="${abcl.build.binary.dir}" prefix="abcl-bin-${abcl.version}"/>
981      </zip>
982    </target>
983
984    <target name="help.test">
985      <echo>
986The following Ant targets run various test suites:
987 
988  abcl.test
989    --  Run all available tests.
990  abcl.test.java
991    --  Run the ABCL junit Java tests under ${basedir}/test/src/
992  abcl.test.lisp
993    --  Run the 'test.ansi.compiled', 'test.abcl', 'test.cl-bench' targets
994  test.ansi.compiled
995    --  Run the compiled version of the ANSI test suite
996  test.abcl
997    --  Run the Lisp RT tests collected in ${basedir}/test/lisp/abcl/
998  test.cl-bench
999    --  Run the cl-bench test suite.
1000
1001The ANSI tests require that the [ANSI tests][1] be manually installed in
1002${basedir}/../ansi-test/.
1003
1004[1]: git+https://gitlab.common-lisp.net/ansi-test/ansi-test.git
1005
1006The CL-BENCH tests require that [cl-bench][2] be manually installed in
1007${basedir}/../cl-bench
1008
1009[2]: http://www.chez.com/emarsden/downloads/cl-bench.tar.gz
1010      </echo>
1011    </target>
1012
1013    <property name="abcl.test.classes.dir"
1014              value="${build.dir}/classes-test"/>
1015
1016    <property name="abcl.test.src.dir"
1017              value="${basedir}/test/src"/>
1018
1019    <patternset id="abcl.test.source.java">
1020      <include name="org/armedbear/lisp/**/*.java"/>
1021    </patternset>
1022
1023    <property name="junit.path"
1024              value="${abcl.ext.dir}/junit-4.8.1.jar"/>
1025
1026    <!-- maven-3.9.x+ supported for openjdk8
1027   <https://maven.apache.org/docs/history.html>
1028    -->
1029    <property name="maven.version"
1030        value="3.9.12"/>
1031    <property name="maven.dist.name"
1032              value="apache-maven-${maven.version}-bin.zip"/>
1033    <property name="maven.dist.uri"
1034              value="http://www.apache.org/dist/maven/maven-3/${maven.version}/binaries/${maven.dist.name}"/>
1035    <property name="maven.local.path"
1036              value="${abcl.ext.dir}/${maven.dist.name}"/>
1037
1038    <path id="abcl.test.compile.classpath">
1039      <pathelement location="${junit.path}"/>
1040      <pathelement location="${build.classes.dir}"/>
1041    </path>
1042
1043    <target name="abcl.test.pre-compile" depends="abcl.ext"/>
1044
1045    <target name="abcl.ext.p">
1046      <!--XXX generalize over enumeration of all contributions to
1047          abcl.ext if we get more of them.  -->
1048      <condition property="abcl.ext.p">
1049        <and>
1050          <available file="${junit.path}"/>
1051          <available file="${maven.local.path}"/>
1052        </and>
1053      </condition>
1054    </target>
1055
1056    <target name="abcl.ext" depends="abcl.ext.p" unless="abcl.ext.p">
1057      <mkdir dir="${abcl.ext.dir}"/>
1058      <get
1059          src="https://repo1.maven.org/maven2/junit/junit/4.8.1/junit-4.8.1.jar"
1060          usetimestamp="true"
1061          dest="${junit.path}"/>
1062      <get 
1063          src="${maven.dist.uri}"
1064          usetimestamp="true"
1065          dest="${maven.local.path}"/>
1066    </target>
1067
1068    <target name="abcl.ext.maven" depends="abcl.ext">
1069      <echo>Installing Maven for ABCL from ${maven.dist.uri}.</echo>
1070      <unzip src="${maven.local.path}"
1071             dest="${abcl.ext.dir}">
1072      </unzip>
1073    </target>
1074       
1075    <target name="abcl.test.compile" 
1076            depends="abcl.test.pre-compile">
1077      <mkdir dir="${abcl.test.classes.dir}"/>
1078      <javac destdir="${abcl.test.classes.dir}"
1079             classpathref="abcl.test.compile.classpath"
1080             debug="true"
1081             target="1.8">
1082        <src path="${abcl.test.src.dir}"/>
1083        <patternset refid="abcl.test.source.java"/>
1084      </javac>
1085    </target>
1086
1087    <path id="abcl.test.run.classpath">
1088      <path refid="abcl.test.compile.classpath"/>
1089      <pathelement location="${abcl.test.classes.dir}"/>
1090    </path>
1091
1092    <target name="abcl.test" 
1093            depends="abcl.test.java,abcl.test.lisp"/>
1094       
1095    <target name="abcl.test.java" depends="abcl.test.compile">
1096      <java fork="true"
1097            classpathref="abcl.test.run.classpath"
1098            classname="org.junit.runner.JUnitCore">
1099        <arg value="org.armedbear.lisp.PathnameTest"/>
1100        <arg value="org.armedbear.lisp.StreamTest"/>
1101        <arg value="org.armedbear.lisp.SeekableStringWriterTest"/>
1102        <arg value="org.armedbear.lisp.UtilitiesTest"/>
1103        <arg value="org.armedbear.lisp.serialization.SerializationTest"/>
1104    <!-- currently hangs(!) the running process
1105        <arg value="org.armedbear.lisp.util.HttpHeadTest"/>
1106    -->
1107      </java>
1108    </target>
1109
1110    <target name="abcl.test.lisp" 
1111            depends="test.ansi.compiled,test.abcl,test.cl-bench"/>
1112
1113    <target name="test.ansi.interpreted" depends="abcl.jar">
1114      <echo>==] Recording test output in ${abcl.test.log.file}.</echo>
1115      <record name="${abcl.test.log.file}" emacsmode="true" action="start" append="yes"/>
1116      <java fork="true" dir="${basedir}"
1117            classpathref="abcl.classpath.dist"
1118            classname="org.armedbear.lisp.Main">
1119        <arg value="--noinit"/> 
1120        <arg value="--eval"/><arg value="(require (quote asdf))"/>
1121        <arg value="--eval"/>
1122          <arg value="(asdf:initialize-source-registry `(:source-registry (:directory ,*default-pathname-defaults*) :inherit-configuration)))"/>
1123        <arg value="--eval"/><arg value="(asdf:test-system :abcl/test/ansi/interpreted)"/>
1124        <arg value="--eval"/><arg value="(ext:exit)"/>
1125      </java>
1126      <record name="${abcl.test.log.file}" emacsmode="true" action="stop"/>
1127      <echo>[== Finished recording test output in ${abcl.test.log.file}.</echo>
1128    </target>
1129
1130    <target name="test.ansi.compiled" depends="abcl.jar">
1131      <echo>==] Recording test output in ${abcl.test.log.file}.</echo>
1132      <record name="${abcl.test.log.file}" emacsmode="true" action="start" append="yes"/>
1133      <java fork="true" dir="${basedir}"
1134            classpathref="abcl.classpath.dist"
1135            classname="org.armedbear.lisp.Main">
1136
1137        <arg value="--noinit"/> 
1138        <arg value="--eval"/><arg value="(require (quote asdf))"/>
1139        <arg value="--eval"/>
1140          <arg value="(asdf:initialize-source-registry `(:source-registry (:directory ,*default-pathname-defaults*) :inherit-configuration)))"/>
1141        <arg value="--eval"/><arg value="(asdf:test-system :abcl/test/ansi/compiled)"/>
1142        <arg value="--eval"/><arg value="(ext:exit)"/>
1143      </java>
1144      <record name="${abcl.test.log.file}" emacsmode="true" action="stop"/>
1145      <echo>Finished recording test output in ${abcl.test.log.file}.</echo>
1146    </target>
1147
1148    <target name="test.abcl" depends="abcl.jar">
1149      <echo>[== Recording test output in ${abcl.test.log.file}.</echo>
1150      <record name="${abcl.test.log.file}" emacsmode="true" action="start" append="yes"/>
1151      <java fork="true" dir="${basedir}"
1152            classpathref="abcl.classpath.dist"
1153            classname="org.armedbear.lisp.Main">
1154        <arg value="--noinit"/> 
1155        <arg value="--eval"/><arg value="(require (quote asdf))"/>
1156        <arg value="--eval"/>
1157          <arg value="(asdf:initialize-source-registry `(:source-registry (:directory ,*default-pathname-defaults*) :inherit-configuration)))"/>
1158        <arg value="--eval"/><arg value="(asdf:test-system :abcl)"/>
1159        <arg value="--eval"/><arg value="(ext:exit)"/>
1160      </java>
1161      <record name="${abcl.test.log.file}" emacsmode="true" action="stop"/>
1162      <echo>==] Finished recording test output in ${abcl.test.log.file}.</echo>
1163    </target>
1164
1165    <target name="test.cl-bench" depends="abcl.jar">
1166      <echo>==] Recording test output in ${abcl.test.log.file}.</echo>
1167      <record name="${abcl.test.log.file}" emacsmode="true" action="start" append="yes"/>
1168      <java fork="true" dir="${basedir}"
1169            classpathref="abcl.classpath.dist"
1170            classname="org.armedbear.lisp.Main">
1171        <arg value="--noinit"/> 
1172        <arg value="--eval"/><arg value="(require (quote asdf))"/>
1173        <arg value="--eval"/><arg value="(require (quote abcl-contrib))"/>
1174        <arg value="--eval"/><arg value="(asdf:make :quicklisp-abcl)"/>
1175        <arg value="--eval"/>
1176          <arg value="(asdf:initialize-source-registry `(:source-registry (:directory ,*default-pathname-defaults*) :inherit-configuration))"/>
1177        <arg value="--eval"/><arg value="(asdf:test-system :abcl/test/cl-bench)"/>
1178        <arg value="--eval"/><arg value="(ext:exit)"/>
1179      </java>
1180      <record name="${abcl.test.log.file}" emacsmode="true" action="stop"/>
1181      <echo>[== Finished recording test output in ${abcl.test.log.file}.</echo>
1182    </target>
1183
1184
1185<target name="abcl.diagnostic" 
1186        description="Emit diagnostics describing available hosting JVM properties."
1187        depends="abcl.build.diagnostic"/>
1188<!--
1189
1190urn:org.abcl.build.ant.targets.diagnostic
1191
1192"Possible JVM values from"
1193
1194http://docs.oracle.com/javase/6/docs/api/java/lang/System.html#getProperties
1195
1196.
1197
1198
1199java.version  Java Runtime Environment version
1200java.vendor   Java Runtime Environment vendor
1201java.vendor.url   Java vendor URL
1202java.home   Java installation directory
1203java.vm.specification.version   Java Virtual Machine specification version
1204java.vm.specification.vendor  Java Virtual Machine specification vendor
1205java.vm.specification.name  Java Virtual Machine specification name
1206java.vm.version   Java Virtual Machine implementation version
1207java.vm.vendor  Java Virtual Machine implementation vendor
1208java.vm.name  Java Virtual Machine implementation name
1209java.specification.version  Java Runtime Environment specification version
1210java.specification.vendor   Java Runtime Environment specification vendor
1211java.specification.name   Java Runtime Environment specification name
1212java.class.version  Java class format version number
1213java.class.path   Java class path
1214java.library.path   List of paths to search when loading libraries
1215java.io.tmpdir  Default temp file path
1216java.compiler   Name of JIT compiler to use
1217java.ext.dirs   Path of extension directory or directories
1218os.name   Operating system name
1219os.arch   Operating system architecture
1220os.version  Operating system version
1221file.separator  File separator ("/" on UNIX)
1222path.separator  Path separator (":" on UNIX)
1223line.separator  Line separator ("\n" on UNIX)
1224user.name   User's account name
1225user.home   User's home directory
1226user.dir
1227
1228-->
1229
1230<target name="abcl.build.diagnostic" description="Emit diagnostics describing available hosting JVM properties.">
1231  <echo>
1232JVM System Properties
1233=====================
1234:java.version    ${java.version}
1235:java.vendor     ${java.vendor}
1236:java.vm.vendor  ${java.vm.vendor}
1237:java.vm.name    ${java.vm.name}
1238
1239:os.name         ${os.name}
1240:os.arch         ${os.arch}
1241:os.version      ${os.version}
1242 
1243:java.specification.version
1244                 ${java.specification.version}
1245:java.vm.specification.version
1246                 ${java.vm.specification.version}
1247  </echo>
1248
1249  <echoproperties/>
1250</target>
1251
1252    <target name="abcl.release" 
1253            depends="abcl.clean,abcl.properties.autoconfigure.openjdk.8,abcl.binary.tar,abcl.source.tar,abcl.binary.zip,abcl.source.zip,abcl.wrapper">
1254      <copy file="${abcl.jar.path}"
1255            tofile="${dist.dir}/abcl-${abcl.version}.jar"/>
1256      <copy file="${abcl-contrib.jar}"
1257            tofile="${dist.dir}/abcl-contrib-${abcl.version}.jar"/>
1258    </target>
1259
1260    <target name="abcl.documentation"
1261            depends="abcl.stamp.version.generate,abcl.documentation.manual,abcl.documentation.asdf"/>
1262    <target name="abcl.documentation.manual"
1263            depends="abcl.stamp.version">
1264      <echo>This target requires 'make' and a LaTeX installation to be on the PATH.</echo>
1265      <exec
1266          executable="make"
1267          dir="${basedir}/doc/manual"/>
1268      <copy file="doc/manual/abcl.pdf"
1269            tofile="${dist.dir}/abcl-${abcl.version}.pdf"/>
1270    </target>
1271    <target name="abcl.documentation.asdf">
1272      <echo>This target requires 'texi2pdf' to be on the PATH.</echo>
1273      <exec
1274          executable="texi2pdf"
1275          dir="${basedir}/doc/asdf">
1276        <arg value="asdf.texinfo"/>
1277      </exec>
1278      <copy file="doc/asdf/asdf.pdf"
1279            tofile="${dist.dir}/asdf.pdf"/>
1280    </target>
1281
1282    <target name="abcl.properties.autoconfigure.openjdk.6">
1283      <exec executable="/usr/bin/env">
1284        <arg value="bash"/>
1285        <arg value="ci/create-abcl-properties.bash"/>
1286        <arg value="openjdk6"/>
1287      </exec>
1288    </target>
1289
1290
1291    <target name="abcl.properties.autoconfigure.openjdk.7">
1292      <exec executable="/usr/bin/env">
1293        <arg value="bash"/>
1294        <arg value="ci/create-abcl-properties.bash"/>
1295        <arg value="openjdk7"/>
1296      </exec>
1297    </target>
1298
1299
1300    <target name="abcl.properties.autoconfigure.openjdk.8">
1301      <exec executable="/usr/bin/env">
1302        <arg value="bash"/>
1303        <arg value="ci/create-abcl-properties.bash"/>
1304        <arg value="openjdk8"/>
1305      </exec>
1306    </target>
1307
1308      <target name="abcl.properties.autoconfigure.openjdk.11">
1309      <exec executable="/usr/bin/env">
1310        <arg value="bash"/>
1311        <arg value="ci/create-abcl-properties.bash"/>
1312        <arg value="openjdk11"/>
1313      </exec>
1314    </target>
1315
1316    <target name="abcl.properties.autoconfigure.openjdk.14">
1317      <exec executable="/usr/bin/env">
1318        <arg value="bash"/>
1319        <arg value="ci/create-abcl-properties.bash"/>
1320        <arg value="openjdk14"/>
1321      </exec>
1322    </target>
1323
1324    <target name="abcl.properties.autoconfigure.openjdk.15">
1325      <exec executable="/usr/bin/env">
1326        <arg value="bash"/>
1327        <arg value="ci/create-abcl-properties.bash"/>
1328        <arg value="openjdk15"/>
1329      </exec>
1330    </target>
1331
1332    <target name="abcl.properties.autoconfigure.openjdk.16">
1333      <exec executable="/usr/bin/env">
1334        <arg value="bash"/>
1335        <arg value="ci/create-abcl-properties.bash"/>
1336        <arg value="openjdk16"/>
1337      </exec>
1338    </target>
1339
1340    <target name="abcl.properties.autoconfigure.openjdk.17">
1341      <exec executable="/usr/bin/env">
1342        <arg value="bash"/>
1343        <arg value="ci/create-abcl-properties.bash"/>
1344        <arg value="openjdk17"/>
1345      </exec>
1346    </target>
1347
1348    <target name="abcl.properties.autoconfigure.openjdk.18">
1349      <exec executable="/usr/bin/env">
1350        <arg value="bash"/>
1351        <arg value="ci/create-abcl-properties.bash"/>
1352        <arg value="openjdk18"/>
1353      </exec>
1354    </target>
1355
1356    <target name="abcl.properties.autoconfigure.openjdk.19">
1357      <exec executable="/usr/bin/env">
1358        <arg value="bash"/>
1359        <arg value="ci/create-abcl-properties.bash"/>
1360        <arg value="openjdk19"/>
1361      </exec>
1362    </target>
1363
1364    <target name="abcl.properties.autoconfigure.openjdk.21">
1365      <exec executable="/usr/bin/env">
1366        <arg value="bash"/>
1367        <arg value="ci/create-abcl-properties.bash"/>
1368        <arg value="openjdk21"/>
1369      </exec>
1370    </target>
1371
1372    <target name="abcl.properties.autoconfigure.openjdk.22">
1373      <exec executable="/usr/bin/env">
1374        <arg value="bash"/>
1375        <arg value="ci/create-abcl-properties.bash"/>
1376        <arg value="openjdk22"/>
1377      </exec>
1378    </target>
1379
1380    <target name="abcl.properties.autoconfigure.openjdk.23">
1381      <exec executable="/usr/bin/env">
1382        <arg value="bash"/>
1383        <arg value="ci/create-abcl-properties.bash"/>
1384        <arg value="openjdk23"/>
1385      </exec>
1386    </target>
1387
1388    <target name="abcl.properties.autoconfigure.openjdk.25">
1389      <exec executable="/usr/bin/env">
1390        <arg value="bash"/>
1391        <arg value="ci/create-abcl-properties.bash"/>
1392        <arg value="openjdk25"/>
1393      </exec>
1394    </target>
1395
1396    <!-- TODO guess at a reasonable value -->
1397    <target name="abcl.configure"
1398      depends="abcl.properties.autoconfigure.openjdk.25">
1399    </target>
1400   
1401    <import file="etc/ant/netbeans-build.xml"
1402            optional="true"/> 
1403    <import file="etc/ant/build-snapshot.xml"
1404            optional="true"/>
1405    <import file="etc/ant/build-maven.xml"
1406            optional="true"/>
1407  </project>
Note: See TracBrowser for help on using the repository browser.