build.xml 44.3 KB
Newer Older
1 2
<?xml version="1.0" encoding="UTF-8"?>
<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 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
    <target name="help">
      <echo>
Main Ant targets:

 abcl.wrapper 
   -- [default] create executable wrapper for ABCL.
 abcl.compile  
   -- compile ABCL to ${build.classes.dir}.
 abcl.jar      
   -- create packaged ${abcl.jar.path}.
 abcl.source.zip abcl.source.tar
   -- create source distributions in ${dist.dir}.
 abcl.clean 
   -- remove ABCL intermediate files
      </echo>

      <echo>
For help on the automatic tests available, use the Ant target 'help.test'.
      </echo>
    </target>
28

29
    <!-- Behavior of the build system can be customized via setting
30 31
         properties in the 'abcl.properties' file. -->
    <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 49 50
    <property name="abcl.runtime.jar.path"
              value="${abcl.jar.path}"/>

51
    <!-- TODO verify me -->
52 53 54 55 56 57 58
    <fail message="Please build using Ant 1.7.1 or higher.">
        <condition>
            <not>
                <antversion atleast="1.7.1"/>
            </not>
        </condition>
    </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 65 66
    <patternset id="abcl.source.java">
      <include name="org/armedbear/lisp/*.java"/>
      <include name="org/armedbear/lisp/util/*.java"/>
67
      <include name="org/armedbear/lisp/protocol/*.java"/>
68
      <include name="org/armedbear/lisp/java/**/*.java"/>
69 70
      <include name="org/armedbear/lisp/scripting/*.java" />
      <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 76
    <patternset id="abcl.source.lisp">
      <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 84 85
    <!-- Lisp files required at runtime -->
    <patternset id="abcl.source.lisp.dist">
      <include name="org/armedbear/lisp/boot.lisp"/>
86
      <include name="org/armedbear/lisp/scripting/lisp/*.lisp" />
87 88
      <include if="abcl.compile.lisp.skip"
               name="**/*.lisp" />
89 90 91
    </patternset>

    <patternset id="abcl.objects">
92
      <!-- "system.lisp" is dynamically created by COMPILE-fSYSTEM -->
93
      <include name="org/armedbear/lisp/system.lisp"/> 
94 95 96
      <include name="org/armedbear/lisp/**/*.class"/>
      <include name="org/armedbear/lisp/**/*.cls"/> 
      <include name="org/armedbear/lisp/**/*.abcl"/>
97
      <include name="org/abcl/util/*.class"/>
98
      <include name="org/armedbear/lisp/version"/>
99 100
      <include name="org/armedbear/lisp/scripting/*.class"/>
      <include name="org/armedbear/lisp/scripting/util/*.class"/>
101
      <patternset refid="abcl.source.lisp.dist"/>
102
      <include name="abcl.rdf"/>
103 104 105 106 107 108
      <include name="abcl.asd"/>
      <include name="README"/>
      <include name="build.xml"/>
      <include name="abcl.properties.in"/>
      <include name="abcl.in"/>
      <include name="abcl.bat.in"/>
109 110 111 112 113 114 115 116 117 118
    </patternset>
    
    <path id="abcl.classpath.dist">
      <pathelement location="${abcl.jar.path}"/>
    </path>
    
    <path id="abcl.classpath.build">
      <pathelement location="${build.classes.dir}"/>
    </path>

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 124 125 126 127
    <target name="abcl.clean.maybe" unless="abcl.build.incremental">
      <echo>Cleaning all intermediate compilation artifacts.</echo>
      <echo>Setting 'abcl.build.incremental' enables incremental compilation.</echo>
      <antcall target="abcl.clean"/>
    </target>
128

129 130
    <target name="abcl.init">
      <tstamp>
131
        <format property="build" pattern="EEE MMM dd yyyy HH:mm:ss zzz"/>
132 133
      </tstamp>

134
      <tstamp>
135
        <format property="build.stamp" pattern="yyyymmdd-HHmm"/>
136 137 138
      </tstamp>

      <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 145
      <!-- Deprecated. Two main types of build environents: 'unix' or 'windows'. -->
      <condition property="unix"> 
146 147 148 149
        <or>
          <os family="unix"/>
          <os family="mac"/>
        </or>
150 151
      </condition>
      <condition property="windows"> 
152
        <os family="windows"/>
153
      </condition>
154

155 156
      <!-- Deprecated. -->
      <available file="${src.dir}org/armedbear/lisp/Interpreter.java" 
157
                 property="abcl.lisp.p"/>
158

159 160
      <echo>java.version: ${java.version}</echo>
      <condition property="abcl.java.version.p">
161
        <!-- Unsupported as of abcl-1.5.0 due to lack of open jdk
162 163
          <matches string="${java.version}" 
                   pattern="1\.5"/>
164 165
          -->
          <or>
166
          <!-- Don't use 1.6.0_09 or earlier. -->
167 168 169 170
          <matches string="${java.version}" 
                   pattern="1\.6\.0_[1-9][0-9]"/>
          <!-- 1.7.0_04 works much better. -->
          <matches string="${java.version}" 
171
                   pattern="1\.7\.0_(0[4-9])|([1-9][0-9])"/>
172 173
          <matches string="${java.version}" 
                   pattern="1\.8\.0"/>
174
        </or>  
175
      </condition>
176

177 178 179
    </target>
    
    <target name="abcl.java.warning" 
180 181
            depends="abcl.init"
            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 188
            depends="abcl.init"
            unless="abcl.jsr-223.p">
189
      <echo>
190 191 192
        Notice: JSR-223 support won't be built since it is not
                supported, neither natively by your JVM nor by 
                libraries in the CLASSPATH.
193
      </echo>
194 195
    </target>

196
    <target name="abcl.compile.java" 
197
            depends="abcl.init,abcl.java.warning">
198 199
      <mkdir dir="${build.dir}"/>
      <mkdir dir="${build.classes.dir}"/>
200
      <!-- Stock build for Java 1.6 (aka Java 2) container -->
201
      <javac destdir="${build.classes.dir}"
202
             debug="true"
203 204
             target="1.6"
             source="1.6"
205
             includeantruntime="false"
206 207 208
             failonerror="true">
        <src path="${src.dir}"/>
        <patternset refid="abcl.source.java"/>
209 210 211
      </javac>
    </target>

212 213
    <!-- Additional artifacts to stage relative to Ant ${basedir} -->
    <patternset id="abcl.stage">
214 215
      <include name="README"/>
      <include name="COPYING"/>
216
      <include name="abcl.rdf"/>
217 218 219
      <include name="abcl.asd"/> 
      <include name="build.xml"/>
      <include name="abcl.properties.in"/> <!--TODO: massage into abcl.properties at build-time -->
220
      <include name="abcl.in"/>
221
      <include name="abcl.bat.in"/>
222
      <include name="etc/ant/*.xml"/>
223 224 225 226
    </patternset>

    <target name="abcl.stage"
	    depends="abcl.copy.lisp">
227 228
      <copy todir="${build.classes.dir}" preservelastmodified="yes"
            verbose="true">
229 230 231 232 233 234
	<fileset dir="${basedir}/">
	  <patternset refid="abcl.stage"/>
	</fileset>
      </copy>
    </target>
    
235 236
    <target name="abcl.copy.lisp">
      <copy todir="${build.classes.dir}" preservelastmodified="yes">
237
        <fileset dir="${src.dir}">
238
          <patternset refid="abcl.source.lisp.dist"/>
239
        </fileset>
240 241 242 243 244
      </copy>
    </target>

    <!-- Adjust the patternset for ABCL source to use the much faster
         Ant 'uptodate' task to check if we need to compile the system
245
         fasls.  Highly inter-dependent with the behavior specified in
246 247
         'compile-system.lisp', i.e. files not listed in
         there should NOT occur here. -->
248 249
    <patternset id="abcl.source.lisp.fasls">
      <patternset refid="abcl.source.lisp"/>
250
      <exclude name="org/armedbear/lisp/scripting/**/*.lisp"/>
251 252 253 254 255 256 257
      <exclude name="org/armedbear/lisp/boot.lisp"/>
      <exclude name="org/armedbear/lisp/emacs.lisp"/>
      <exclude name="org/armedbear/lisp/run-benchmarks.lisp"/>
    </patternset>

    <target name="abcl.fasls.uptodate">
      <uptodate property="abcl.fasls.uptodate.p" value="true">
258 259 260 261
        <srcfiles dir="${src.dir}">
          <patternset refid="abcl.source.lisp.fasls"/>
        </srcfiles>
        <mapper type="glob" from="*.lisp" to="${build.classes.dir}/*.abcl"/>
262 263
      </uptodate>
    </target>
264 265 266

    <path id="abcl.home.dir.path">
        <path location="${src.dir}/org/armedbear/lisp/"/>
267
    </path>         
268 269 270 271
    <pathconvert property="abcl.home.dir" refid="abcl.home.dir.path"/>

    <path id="abcl.lisp.output.path"
          location="${build.classes.dir}/org/armedbear/lisp/"/>
272
    <pathconvert dirsep="/" property="abcl.lisp.output" refid="abcl.lisp.output.path"/>
273 274 275

    <property name="system.lisp.file" 
              value="${build.classes.dir}/org/armedbear/lisp/system.lisp"/>
276

277
    <target name="abcl.compile.lisp" 
278
            depends="abcl.stage,abcl.compile.java,abcl.system.update.maybe,abcl.fasls.uptodate"
279
            unless="abcl.fasls.uptodate.p">
280 281 282 283 284 285 286
      <abcl.compile.lisp/>
    </target>

    <macrodef name="abcl.compile.lisp">
      <element name="additional.jvmarg" optional="true"/>
      <sequential>
        <echo>
287 288
Compiling Lisp system 
from ${abcl.home.dir}
289 290 291 292 293 294 295
 to  ${abcl.lisp.output}</echo>
 
     <!-- Not good if ${abcl.home.dir} == ${abcl.lisp.output} -->
     <delete>
       <fileset dir="${abcl.home.dir}" includes="**/*.abcl **/*.cls **/*._"/>
     </delete>
     <java classpath="${build.classes.dir}" 
296 297
            fork="true"
            failonerror="true"
298
            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))))"
299
            classname="org.armedbear.lisp.Main">
300
        <jvmarg value="-Dabcl.home=${abcl.home.dir}${file.separator}"/>
301
        <jvmarg value="-Dabcl.autoload.verbose=Y"/>
302
        <additional.jvmarg/>
303
        <arg value="--noinit"/>
304
        <arg value="--nosystem"/>
305 306
        <arg value="--eval"/>
        <arg value="(setf *load-verbose* t)"/>
307
      </java>
308 309 310
      <concat destfile="${system.lisp.file}" append="true">
        <fileset file="${abcl.startup.file}"/>
      </concat>
311 312 313 314 315 316
        </sequential>
    </macrodef>

    <property name="abcl.compile.lisp.debug.jvmarg"
              value="-agentlib:jdwp=transport=dt_socket,server=y,address=6789,suspend=y"/>
    <target name="abcl.compile.lisp.debug" 
317
            depends="abcl.stage,abcl.compile.java,abcl.system.update.maybe,abcl.fasls.uptodate"
318 319 320 321 322 323 324
            unless="abcl.fasls.uptodate.p">
      <echo>Debugging with jvmarg ${abcl.compile.lisp.debug.jvmarg}</echo>
      <abcl.compile.lisp> 
          <additional.jvmarg>
            <jvmarg value="${abcl.compile.lisp.debug.jvmarg}"/>
          </additional.jvmarg>
      </abcl.compile.lisp>
325 326
    </target>

327
    <property name="abcl.build.path"
328
              value="${build.classes.dir}/org/armedbear/lisp/build"/>
329 330
    <target name="abcl.stamp" 
            depends="abcl.compile,abcl.stamp.version,abcl.stamp.hostname">
331
      <mkdir dir="${abcl.build.path}/.."/>
332 333
      <loadfile property="abcl.version"
                srcFile="${abcl.version.path}"/>
334 335 336
      <echo message="${build}" file="${abcl.build.path}"/>    
    </target>

337 338 339 340 341 342 343 344 345 346

    <!-- Environment variables may be accessed as ${env.NAME} -->
    <property environment="env"/>

    <!-- Can we derive an SVN version from the current build tree? -->
    <condition property="abcl.version.svn.p">
      <and>
        <available
            file="${basedir}/.svn"
            type="dir"/>
347 348 349 350 351 352 353 354 355 356 357 358 359 360
        <or>
            <available
                file="svnversion.exe"
                filepath="${env.Path}"/>
            <available
                file="svnversion.exe"
                filepath="${env.PATH}"/>
             <available
                file="svnversion"
                filepath="${env.Path}"/>
            <available
                file="svnversion"
                filepath="${env.PATH}"/>
        </or>
361 362 363 364 365
      </and>
    </condition>

    <target name="abcl.version.src" depends="abcl.version.src.3"/>

366 367 368
    <target name="abcl.version.src.0" if="windows">
      <exec
          executable="svnversion.exe"
369
          outputproperty="abcl.version.svn.raw"
370 371 372 373 374
          failifexecutionfails="false"
          searchpath="true" />
    </target>

    <target name="abcl.version.src.1" depends="abcl.version.src.0">
375 376
      <exec 
          executable="svnversion"
377
          outputproperty="abcl.version.svn.raw"
378 379
          failifexecutionfails="false"
          searchpath="true" />
380 381 382 383 384
    </target>

    <target name="abcl.version.src.2" 
            depends="abcl.version.src.1"
            if="abcl.version.svn.p">
385 386 387 388 389 390 391 392 393 394

      <!-- Transform all occurances of ":" ==> "-" in the version string -->
      <tempfile property="version-tmp.path"/>
      <echo message="${abcl.version.svn.raw}"
            file="${version-tmp.path}"/>
      <replace file="${version-tmp.path}"
               token=":" value="-"/>
      <loadfile property="abcl.version.svn" srcFile="${version-tmp.path}"/>
      <delete file="${version-tmp.path}"/>

395 396 397 398 399 400 401 402 403 404 405 406
      <echo>abcl.version.svn: ${abcl.version.svn}</echo>
      <property name="abcl.version.src"
                value="svn-${abcl.version.svn}"/>
    </target>

    <target name="abcl.version.src.3"
            depends="abcl.version.src.2"
            unless="abcl.version.svn.p">
      <property name="abcl.version.src"
                value=""/>
    </target>

407 408
    <property name="abcl.home.dir"
              value="${src.dir}/org/armedbear/lisp/"/>
409
    <property name="abcl.version.path"
410
              value="${build.classes.dir}/org/armedbear/lisp/version"/>
411

412 413 414 415
    <target name="abcl.clean.version">
      <delete file="${abcl.version.path}"/>
    </target>

416 417 418 419 420 421
    <target name="abcl.stamp.version.uptodate">
      <uptodate property="abcl.stamp.version.uptodate.p" 
                targetfile="${abcl.version.path}"
                srcfile="${build.classes.dir}/org/armedbear/lisp/Version.class"/>
    </target>

422
    <target name="abcl.stamp.version" 
423 424
            depends="abcl.version.src,abcl.stamp.version.1,abcl.stamp.version.2"
            unless="abcl.stamp.version.uptodate.p">
425 426 427 428 429
      <mkdir dir="${abcl.version.path}/.."/>
      <echo>ABCL implementation version: ${abcl.implementation.version}</echo>
      <echo file="${abcl.version.path}">${abcl.implementation.version}</echo>
    </target>
    
430 431 432
    <target name="abcl.stamp.version.generate" 
            depends="abcl.compile.java"
            unless="abcl.stamp.version.uptodate.p">
433
      <java fork="true"
434 435 436
            classpath="${build.classes.dir}"
            outputproperty="abcl.version"
            classname="org.armedbear.lisp.Version"
437
            logerror="yes"/> <!-- Don't catch stderr output -->
438
    </target>
439

440
    <target name="abcl.stamp.version.0" 
441 442
            depends="abcl.stamp.version.uptodate,abcl.stamp.version.generate">
    </target>
443

444 445 446 447 448 449 450 451 452 453 454 455
    <target name="abcl.stamp.version.1"
            depends="abcl.stamp.version.0"
            unless="abcl.version.svn.p">
      <property name="abcl.implementation.version"
                value="${abcl.version}"/>
    </target>

    <target name="abcl.stamp.version.2" 
            depends="abcl.stamp.version.0"
            if="abcl.version.svn.p">
      <property name="abcl.implementation.version"
                value="${abcl.version}-${abcl.version.src}"/>
456 457 458 459 460 461 462
    </target>

    <target name="abcl.stamp.hostname" if="unix">
      <exec executable="hostname" outputproperty="abcl.hostname"/>
      <echo>abcl.hostname: ${abcl.hostname}</echo>
    </target>

463
    <target name="abcl.system.uptodate">
464 465 466 467 468
      <condition property="abcl.system.needs-update.p">
        <and>
          <available file="${system.lisp.file}"/>
          <available file="${abcl.startup.file}"/>
          <uptodate
469 470
                srcfile="${system.lisp.file}"
                targetfile="${abcl.startup.file}"/>
471 472
        </and>
      </condition>
473 474
    </target>
    
475 476
    <target name="abcl.system.update.maybe" depends="abcl.system.uptodate" 
            if="abcl.system.needs-update.p">
477 478 479
      <touch file="${src.dir}/org/armedbear/lisp/compile-system.lisp"/>
    </target>

480
    <target name="abcl.jar.uptodate" depends="abcl.compile,abcl.stamp">
481
      <uptodate property="abcl.jar.uptodate.p" targetfile="${abcl.jar.path}">
482 483 484
        <srcfiles dir="${build.classes.dir}">
          <patternset refid="abcl.objects"/>
        </srcfiles>
485 486 487
      </uptodate>
    </target>

488
    <target name="abcl.jar" depends="abcl.jar.uptodate,abcl-contrib.jar"
489
            unless="abcl.jar.uptodate.p">
490 491
      <mkdir dir="${dist.dir}"/>
      <jar destfile="${abcl.jar.path}"
492
           compress="true"
493
           update="true"
494 495 496 497 498 499 500 501 502 503 504 505 506 507 508
           basedir="${build.classes.dir}">
        <patternset refid="abcl.objects"/>
        <manifest>
          <attribute name="Main-Class" value="org.armedbear.lisp.Main"/>
          <section name="org/armedbear/lisp">
            <attribute name="Implementation-Title" 
                       value="ABCL"/>
            <attribute name="Implementation-Version"  
                       value="${abcl.implementation.version}"/>
            <attribute name="Implementation-Build" 
                       value="${build}"/>
          </section>
        </manifest>
        <metainf dir="${src.dir}/META-INF"> 
        </metainf>
509 510
      </jar>
    </target>
511

512
    <target name="abcl-aio.jar" depends="abcl.compile,abcl.stamp">
513
      <mkdir dir="${dist.dir}"/>
514
      <jar destfile="${abcl-aio.jar.path}"
515 516 517 518 519 520 521 522 523 524 525
           compress="true"
           update="true"
           basedir="${build.classes.dir}">
	<fileset dir="${src.dir}">
          <patternset refid="abcl.objects"/>
	  <patternset refid="abcl.source.java"/>
	  <patternset refid="abcl.source.lisp"/>
	</fileset>
	<fileset dir="${basedir}">
	  <patternset refid="abcl.contrib.source"/>
	</fileset>
526 527 528
        <!-- According to <http://docs.oracle.com/javase/8/docs/technotes/guides/jar/jar.html>
             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.
            -->
529 530 531 532 533 534 535 536 537 538
        <manifest>
          <attribute name="Main-Class" value="org.armedbear.lisp.Main"/>
          <section name="org/armedbear/lisp">
            <attribute name="Implementation-Title" 
                       value="ABCL"/>
            <attribute name="Implementation-Version"  
                       value="${abcl.implementation.version}"/>
            <attribute name="Implementation-Build" 
                       value="${build}"/>
          </section>
539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555
          <section name="contrib">
            <attribute name="Implementation-Title" 
                       value="org.abcl-contrib"/>
            <!-- FIXME: declare separate abcl-contrib version? -->
            <attribute name="Implementation-Version"  
                       value="${abcl.implementation.version}"/>
          </section>
          <section name="tools">
            <attribute name="Implementation-Title" 
                       value="org.abcl-tools"/>
          </section>
          <section name="src">
            <attribute name="Implementation-Title" 
                       value="org.abcl-source"/>
            <attribute name="Implementation-Version"  
                       value="${abcl.implementation.version}"/>
          </section>
556 557 558 559 560 561
        </manifest>
        <metainf dir="${src.dir}/META-INF"> 
        </metainf>
      </jar>
    </target>

562 563
    
    <target name="abcl.wrapper" 
564
            depends="abcl.jar,abcl.contrib,abcl.wrapper.unix,abcl.wrapper.windows">
565
      <description>
566 567
        Creates in-place executable shell wrapper in
        '${abcl.wrapper.file}'
568 569 570 571
      </description>
      <!-- Set from commandline or in 'build.properties' -->
      <property name="additional.jars" value=""/>
      <path id="abcl.runtime.classpath">
572
        <pathelement location="${abcl.runtime.jar.path}"/>
573
        <pathelement path="${additional.jars}"/>
574 575 576 577 578
      </path>
      <!-- set via '-Djava.options=JAVA_OPTIONS' or in 'build.properties -->
      <property name="java.options" value=""/>

      <copy file="${abcl.wrapper.in.file}" toFile="${abcl.wrapper.file}" overwrite="yes">
579 580 581 582 583 584 585 586
        <filterset>
          <filter token="JAVA" 
                  value="${java.path}"/>
          <filter token="ABCL_JAVA_OPTIONS" 
                  value="${java.options}"/>
          <filter token="ABCL_CLASSPATH"
                  value="${toString:abcl.runtime.classpath}"/>
        </filterset>
587 588
      </copy>
      <chmod file="${abcl.wrapper.file}" perm="a+x"/>
589 590

      <echo>Created executable ABCL wrapper in '${abcl.wrapper.file}'</echo>
591 592 593 594 595 596 597 598 599 600 601 602
      <echo>N.B. This wrapper requires '${abcl.jar.path}' not be moved.</echo>
    </target>

    <target name="abcl.wrapper.unix" if="unix">
      <property name="abcl.wrapper.file" value="abcl"/>
      <property name="abcl.wrapper.in.file" value="abcl.in"/>
    </target>

    <target name="abcl.wrapper.windows" if="windows">
      <property name="abcl.wrapper.file" value="abcl.bat"/>
      <property name="abcl.wrapper.in.file" value="abcl.bat.in"/>
    </target>
603

604 605 606 607 608 609
    <patternset id="abcl.contrib.source">
          <include name="**/*.asd"/>
          <include name="**/*.lisp"/>
          <include name="**/README.markdown"/>
    </patternset>

610 611 612 613
    <patternset id="abcl.contrib.docs">
          <include name="**/README.markdown"/>
    </patternset>

614 615 616 617 618
    <property name="abcl-contrib.jar"
              value="${dist.dir}/abcl-contrib.jar"/>
    <condition property="abcl.contrib.uptodate.p">
      <uptodate targetfile="${abcl-contrib.jar}">
        <srcfiles dir="contrib">
619
          <patternset refid="abcl.contrib.source"/>
620 621 622 623
        </srcfiles>
      </uptodate>
    </condition>

624
    <target name="abcl-contrib.jar" depends="abcl.contrib"/>
625 626
    <target name="abcl.contrib" unless="abcl.contrib.uptodate.p">
      <jar destfile="${abcl-contrib.jar}"
627 628
           compress="true"
           basedir="contrib">
629
        <patternset refid="abcl.contrib.source"/>
630 631
      </jar>
      <echo>
632 633
Packaged contribs in ${abcl-contrib.jar}. To use contribs, ensure that
this file is in the same directory as 'abcl.jar', and then
634 635

  CL-USER> (require 'abcl-contrib)
636

637
will place all the contribs in the ASDF registry. 
638

639
To load a contrib, something like
640

641
  CL-USER> (require 'jss) 
642

643
will compile (if necessary) and load JSS.
644 645
</echo>
    </target>
646

647 648 649 650 651 652 653 654 655 656 657 658 659 660
    <target name="abcl.contrib.javadoc.jar">
      <mkdir dir="${dist.dir}"/>
      <jar destfile="${dist.dir}/abcl-contrib-javadoc.jar" basedir="contrib">
        <patternset refid="abcl.contrib.docs" />
      </jar>
    </target>

    <target name="abcl.contrib.source.jar">
      <mkdir dir="${dist.dir}"/>
      <jar destfile="${dist.dir}/abcl-contrib-sources.jar" basedir="contrib">
        <patternset refid="abcl.contrib.source" />
      </jar>
    </target>

661 662 663
    <target name="abcl.debug.jpda" depends="abcl.jar">
      <description>Invoke ABCL with JPDA listener on port 6789</description>
      <java fork="true"
664 665 666 667
            classpathref="abcl.classpath.dist"
            classname="org.armedbear.lisp.Main">
        <jvmarg 
            value="-agentlib:jdwp=transport=dt_socket,address=6789,server=y"/>
668
      </java>
669
      <echo>JPDA listening on localhost:6789</echo>
670 671
    </target>

672 673 674
    <target name="abcl.build.debug.jpda" depends="abcl.compile.java">
      <description>Invoke ABCL with JPDA listener on port 6789</description>
      <java fork="true"
675 676 677 678
            classpathref="abcl.classpath.build"
            classname="org.armedbear.lisp.Main">
        <jvmarg
            value="-agentlib:jdwp=transport=dt_socket,address=6789,server=y"/>
679 680 681 682 683
        <jvmarg value="-Dabcl.home=${abcl.home.dir}${file.separator}"/>
      </java>
      <echo>JPDA listening on localhost:6789</echo>
    </target>

684 685
    <target name="abcl.run" depends="abcl.jar">
      <java fork="true"
686 687
            classpathref="abcl.classpath.dist"
            classname="org.armedbear.lisp.Main">
688 689 690
      </java>
    </target>

691 692
    <target name="abcl.clean">
      <delete dir="${build.dir}"/>
693
      <delete file="${abcl.jar.path}"/>
694
      <delete file="abcl"/>
695
      <delete file="abcl.bat"/>
696 697
    </target>

698 699 700 701 702
    <property name="slime.fasls" 
              value="${user.home}/.slime/"/>
    <property name="quicklisp.common-lisp.fasls"
              value="${user.home}/.cache/common-lisp/"/>
    <target name="abcl.clean.application.fasls">
703 704 705 706 707 708 709 710
      <echo>Deleting ABCL SLIME fasls under ${slime.fasls}</echo>
      <delete>
        <fileset dir="${slime.fasls}" includes="**/*.abcl"/>
      </delete>
      <echo>Deleting ABCL Quicklisp fasls under ${quicklisp.common-lisp.fasls}</echo>
      <delete>
        <fileset dir="${quicklisp.common-lisp.fasls}" includes="**/*.abcl"/>
      </delete>
711 712
    </target>

713 714
    <target name="abcl.dist" depends="abcl.jar">
      <copy file="${abcl.jar.path}"
715
            toFile="${dist.dir}/abcl-${abcl.version}.jar"/>
716 717 718 719 720
    </target>

    <target name="abcl.distclean" depends="abcl.clean">
      <delete dir="${dist.dir}"/>
      <delete file="abcl"/>
721
      <delete file="abcl.bat"/>
722 723
    </target>

724 725 726 727 728 729 730 731
    <condition property="etags.executable"
               value="etags"
               else="c:/cygwin64/bin/ctags.exe">
      <not>
        <os family="windows"/>
      </not>
    </condition>
      
732
    <target name="TAGS">
733
      <delete file="TAGS"/>
734
      <apply executable="${etags.executable}" parallel="true" verbose="true" maxparallel="300">
735
        <arg value="--append"/>
736
        <arg value="--regex=|[ \t]+//[ \t]+###[ \t]+\([^ \t]+\)|\1|"/>
737
        <arg value='--regex=|[ \t]*@DocString([ \n\r\t]*name=\"\([^\"]*\)|\1|m'/>
738 739 740 741
        <fileset dir="${src.dir}">
          <patternset refid="abcl.source.java"/>
          <patternset refid="abcl.source.lisp"/>
        </fileset>
742 743 744 745
      </apply>
    </target>

    <patternset id="abcl.dist.misc"
746
                description="Additional includes in the source distributions relative to basedir">
747
      <include name="abcl.rdf"/>
748
      <include name="build.xml"/>
749
      <include name="abcl.properties.in"/>
750 751
      <include name="COPYING"/>
      <include name="README"/>
752
      <include name="CHANGES"/>
753 754
      <include name="abcl.in"/>
      <include name="abcl.bat.in"/>
755 756

      <include name="abcl.asd"/>
757
      
758
      <include name="examples/**"/>
759 760

      <include name="contrib/**"/>
761 762
      
      <include name="test/**"/>
763

764
      <include name="build-from-lisp.bash"/>
765
      
766 767 768
      <include name="build-abcl.lisp"/>
      <include name="customizations.lisp.in"/>

769 770
      <include name="etc/ant/*.xml"/>

771 772
    </patternset>

773
    <!-- TODO merge with artifacts from 'abcl.stage' -->
774 775 776
    <patternset 
        id="abcl.source.misc"
        description="Additional includes in the source distribution relative to source root">
777 778
      <include name="org/armedbear/lisp/LICENSE"/>
      <include name="manifest-abcl"/>
779
      <include name="META-INF/services/javax.script.ScriptEngineFactory"/>
780
    </patternset>
781

782
    <target name="abcl.source.prepare" depends="abcl.stamp">
783
      <property name="abcl.build.src.dir"
784
                value="${build.dir}/abcl-src-${abcl.version}"/>
785
      <mkdir dir="${abcl.build.src.dir}/src"/>
786 787 788 789 790 791 792 793 794 795 796 797 798 799 800
      <copy todir="${abcl.build.src.dir}/src"
            preservelastmodified="true">
        <fileset dir="${src.dir}"
                 id="abcl.source.src">
            <patternset refid="abcl.source.java"/>
            <patternset refid="abcl.source.lisp"/>
            <patternset refid="abcl.source.misc"/>
        </fileset>
      </copy>
      <copy todir="${abcl.build.src.dir}"
            preservelastmodified="true">
        <fileset dir="${basedir}">
            <patternset refid="abcl.dist.misc"/>
        </fileset>
      </copy>
801 802
    </target>

803 804
    <!--  Files in source distribution that always get LF EOL (aka
         'unix') -->    
805
    <patternset id="abcl.dist.lf">
806 807 808 809 810 811 812 813 814
      <include name="abcl.in"/>
    </patternset>

    <!--  Files in source distribution that always get CRLF EOL (aka
         'dos') -->    
    <patternset id="abcl.dist.crlf">
      <include name="abcl.bat.in"/>
    </patternset>

815
    <target name="abcl.source.unix" depends="abcl.source.prepare">
816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831
      <fixcrlf srcdir="${abcl.build.src.dir}"
               preservelastmodified="true"
               eol="lf">
      </fixcrlf>

      <fixcrlf srcdir="${abcl.build.src.dir}"
               preservelastmodified="true"
               eol="crlf">
          <patternset refid="abcl.dist.crlf"/>
      </fixcrlf>

      <fixcrlf srcdir="${abcl.build.src.dir}"
               preservelastmodified="true"
               eol="lf">
          <patternset refid="abcl.dist.lf"/>
      </fixcrlf>
832
    </target>
833

834
    <target name="abcl.source.tar" depends="abcl.source.unix">
835 836
      <mkdir dir="${dist.dir}"/>
      <tar destfile="${dist.dir}/abcl-src-${abcl.version}.tar.gz"
837 838 839 840
           compression="gzip">
        <tarfileset dir="${build.dir}">
          <include name="abcl-src-${abcl.version}/**"/>
        </tarfileset>
841 842 843
      </tar>
    </target>

844
    <target name="abcl.source.windows" depends="abcl.source.prepare">
845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860
      <fixcrlf srcdir="${abcl.build.src.dir}"
               preservelastmodified="true"
               eol="crlf">
      </fixcrlf>

      <fixcrlf srcdir="${abcl.build.src.dir}"
               preservelastmodified="true"
               eol="crlf">
          <patternset refid="abcl.dist.crlf"/>
      </fixcrlf>

      <fixcrlf srcdir="${abcl.build.src.dir}"
               preservelastmodified="true"
               eol="lf">
          <patternset refid="abcl.dist.lf"/>
      </fixcrlf>
861
    </target>
862

863
    <target name="abcl.source.zip" depends="abcl.stamp,abcl.source.windows">
864 865
      <mkdir dir="${dist.dir}"/>
      <zip destfile="${dist.dir}/abcl-src-${abcl.version}.zip"
866 867
           compress="true">
        <zipfileset dir="${abcl.build.src.dir}" prefix="abcl-src-${abcl.version}"/>
868 869
      </zip>
    </target>
870

871
    <target name="abcl.source.jar" depends="abcl.stamp,abcl.source.unix">
872 873 874 875 876 877 878 879 880 881 882 883
      <mkdir dir="${dist.dir}"/>
      <jar destfile="${dist.dir}/abcl-${abcl.version}-sources.jar">
        <metainf dir="${abcl.build.src.dir}">
          <include name="COPYING"/>
        </metainf>
        <fileset dir="${abcl.build.src.dir}/src">
          <include name="**/*.java"/>
          <include name="**/*.lisp"/>
        </fileset>
      </jar>
    </target>

884 885
    <property name="abcl.javadoc.dir" value="${build.dir}/javadoc"/>

886
    <target name="abcl.javadoc" depends="abcl.stamp">
887 888 889 890 891 892 893 894 895 896 897 898
      <mkdir dir="${abcl.javadoc.dir}"/>
      <javadoc destdir="${abcl.javadoc.dir}"
               sourcepath="${src.dir}"/>
    </target>
    
    <target name="abcl.javadoc.jar" depends="abcl.stamp.version,abcl.javadoc">
      <mkdir dir="${dist.dir}"/>
      <jar destfile="${dist.dir}/abcl-${abcl.version}-javadoc.jar">
        <fileset dir="${abcl.javadoc.dir}"/>
      </jar>
    </target>

899
    <target name="abcl.binary.prepare" depends="abcl.jar,abcl.contrib,abcl.documentation,abcl.stamp.version">
900 901 902 903 904 905 906 907
      <property name="abcl.build.binary.dir"
                value="${build.dir}/abcl-bin-${abcl.version}"/>
      <mkdir dir="${abcl.build.binary.dir}"/>
      <copy todir="${abcl.build.binary.dir}"
            preservelastmodified="true">
        <fileset dir="${basedir}/dist">
          <patternset>
            <include name="abcl.jar"/>
908
            <include name="abcl-contrib.jar"/>
909
            <include name="*.pdf"/>
910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935
          </patternset>
        </fileset>
        <fileset dir="${basedir}">
          <patternset>
            <include name="README"/>
            <include name="CHANGES"/>
          </patternset>
        </fileset>
      </copy>
    </target>

    <target name="abcl.binary.tar" depends="abcl.binary.prepare">
      <tar destfile="${dist.dir}/abcl-bin-${abcl.version}.tar.gz"
           compression="gzip">
        <tarfileset dir="${build.dir}">
          <include name="abcl-bin-${abcl.version}/**"/>
          </tarfileset>
      </tar>
    </target>

    <target name="abcl.binary.zip" depends="abcl.binary.prepare">
      <zip destfile="${dist.dir}/abcl-bin-${abcl.version}.zip"
           compress="true">
        <zipfileset dir="${abcl.build.binary.dir}" prefix="abcl-bin-${abcl.version}"/>
      </zip>
    </target>
936

937 938 939 940 941 942 943
    <target name="help.test">
      <echo>
The following Ant targets run various test suites:
  
  abcl.test
    --  Run all available tests.
  abcl.test.java
944
    --  Run the ABCL junit Java tests under ${basedir}/test/src/
945 946 947 948 949
  abcl.test.lisp
    --  Run the 'test.ansi.compiled', 'test.abcl', 'test.cl-bench' targets
  test.ansi.compiled
    --  Run the compiled version of the ANSI test suite
  test.abcl
950
    --  Run the Lisp RT tests collected in ${basedir}/test/lisp/abcl/
951 952 953 954 955 956
  test.cl-bench 
    --  Run the cl-bench test suite.

The ANSI tests require that the [ansi-tests][1] be manually installed in 
${basedir}/../ansi-tests.

957
[1]: git+https://gitlab.common-lisp.net/ansi-test/ansi-test.git
958

959
The CL-BENCH tests require that [cl-bench][2] be manually installed in
960 961 962 963 964 965
${basedir}/../cl-bench

[2]: http://www.chez.com/emarsden/downloads/cl-bench.tar.gz
      </echo>
    </target>

966
    <property name="abcl.test.classes.dir"
967
              value="${build.dir}/classes-test"/>
968 969

    <property name="abcl.test.src.dir"
970
              value="${basedir}/test/src"/>
971 972

    <patternset id="abcl.test.source.java">
973
      <include name="org/armedbear/lisp/**/*.java"/>
974 975
    </patternset>

976
    <property name="junit.path"
977
              value="${abcl.ext.dir}/junit-4.8.1.jar"/>
978 979 980 981 982 983
    <property name="maven.dist.name"
              value="apache-maven-3.3.9-bin.zip"/>
    <property name="maven.dist.uri"
              value="http://www-eu.apache.org/dist/maven/maven-3/3.3.9/binaries/${maven.dist.name}"/>
    <property name="maven.local.path"
              value="${abcl.ext.dir}/${maven.dist.name}"/>
984 985

    <path id="abcl.test.compile.classpath">
986
      <pathelement location="${junit.path}"/>
987 988 989
      <pathelement location="${build.classes.dir}"/>
    </path>

990 991 992
    <target name="abcl.test.pre-compile" depends="abcl.ext"/>

    <target name="abcl.ext.p">
993
      <!--XXX generalize over enumeration of all contributions to
994 995 996 997 998 999 1000
          abcl.ext if we get more of them.  -->
      <condition property="abcl.ext.p">
        <and>
          <available file="${junit.path}"/>
          <available file="${maven.local.path}"/>
        </and>
      </condition>
1001 1002
    </target>

1003
    <target name="abcl.ext" depends="abcl.ext.p" unless="abcl.ext.p">
1004
      <mkdir dir="${abcl.ext.dir}"/>
1005 1006 1007 1008
      <get 
          src="http://cloud.github.com/downloads/KentBeck/junit/junit-4.8.1.jar"
          usetimestamp="true"
          dest="${junit.path}"/>
1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019
      <get 
          src="${maven.dist.uri}"
          usetimestamp="true"
          dest="${maven.local.path}"/>
    </target>

    <target name="abcl.ext.maven" depends="abcl.ext">
      <echo>Installing Maven for ABCL from ${maven.dist.uri}.</echo>
      <unzip src="${maven.local.path}"
             dest="${abcl.ext.dir}">
      </unzip>
1020
    </target>
1021
        
1022
    <target name="abcl.test.compile" 
1023
            depends="abcl.test.pre-compile">
1024 1025
      <mkdir dir="${abcl.test.classes.dir}"/>
      <javac destdir="${abcl.test.classes.dir}"
1026 1027 1028 1029 1030
             classpathref="abcl.test.compile.classpath"
             debug="true"
             target="1.5">
        <src path="${abcl.test.src.dir}"/>
        <patternset refid="abcl.test.source.java"/>
1031 1032 1033 1034 1035 1036 1037
      </javac>
    </target>

    <path id="abcl.test.run.classpath">
      <path refid="abcl.test.compile.classpath"/>
      <pathelement location="${abcl.test.classes.dir}"/>
    </path>
1038

1039
    <target name="abcl.test" 
1040 1041
            depends="abcl.test.java,abcl.test.lisp"/>
        
1042 1043
    <target name="abcl.test.java" depends="abcl.test.compile">
      <java fork="true"
1044 1045
            classpathref="abcl.test.run.classpath"
            classname="org.junit.runner.JUnitCore">
1046 1047
        <arg value="org.armedbear.lisp.PathnameTest"/>
        <arg value="org.armedbear.lisp.StreamTest"/>
1048
        <arg value="org.armedbear.lisp.SeekableStringWriterTest"/>
1049
        <arg value="org.armedbear.lisp.UtilitiesTest"/>
1050 1051 1052
		<!-- currently hangs(!) the running process
        <arg value="org.armedbear.lisp.util.HttpHeadTest"/>
		-->
1053 1054 1055
      </java>
    </target>

1056
    <target name="abcl.test.lisp" 
1057
            depends="test.ansi.compiled,test.abcl,test.cl-bench"/>
1058

1059 1060 1061
    <target name="test.ansi.interpreted" depends="abcl.jar">
      <echo>Recording test output in ${abcl.test.log.file}.</echo>
      <record name="${abcl.test.log.file}" emacsmode="true" action="start" append="yes"/>
1062
      <java fork="true" dir="${basedir}"
1063 1064 1065 1066
            classpathref="abcl.classpath.dist"
            classname="org.armedbear.lisp.Main">
        <arg value="--noinit"/> 
        <arg value="--eval"/><arg value="(require (quote asdf))"/>
1067 1068
        <arg value="--eval"/>
          <arg value="(asdf:initialize-source-registry `(:source-registry (:directory ,*default-pathname-defaults*) :inherit-configuration)))"/>
1069
        <arg value="--eval"/><arg value="(asdf:test-system :abcl/test/ansi/interpreted)"/>
1070
        <arg value="--eval"/><arg value="(ext:exit)"/>
1071
      </java>
1072 1073
      <record name="${abcl.test.log.file}" emacsmode="true" action="stop"/>
      <echo>Finished recording test output in ${abcl.test.log.file}.</echo>
1074 1075
    </target>

1076
    <target name="test.ansi.compiled" depends="abcl.jar">
1077
      <echo>Recording test output in ${abcl.test.log.file}.</echo>
1078
      <record name="${abcl.test.log.file}" emacsmode="true" action="start" append="yes"/>
1079
      <java fork="true" dir="${basedir}"
1080 1081
            classpathref="abcl.classpath.dist"
            classname="org.armedbear.lisp.Main">
1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093
        <!-- Run in 64bit mode-->
        <jvmarg value="-d64"/> 

        <!-- Enable JVM assertions -->
        <jvmarg value="-ea"/>  
        
        <!-- (Possibly) unload classes when reference count reaches zero -->
        <jvmarg value="-XX:+CMSClassUnloadingEnabled"/> 

        <!-- Increase the size of the space used to store JVM class metadata. -->
        <jvmarg value="-XX:MaxPermSize=768m"/> 

1094 1095
        <arg value="--noinit"/> 
        <arg value="--eval"/><arg value="(require (quote asdf))"/>
1096 1097
        <arg value="--eval"/>
          <arg value="(asdf:initialize-source-registry `(:source-registry (:directory ,*default-pathname-defaults*) :inherit-configuration)))"/>
1098
        <arg value="--eval"/><arg value="(asdf:test-system :abcl/test/ansi/compiled)"/>
1099
        <arg value="--eval"/><arg value="(ext:exit)"/>
1100
      </java>
1101
      <record name="${abcl.test.log.file}" emacsmode="true" action="stop"/>
1102 1103
      <echo>Finished recording test output in ${abcl.test.log.file}.</echo>
    </target>
1104

1105 1106 1107 1108
    <target name="test.abcl" depends="abcl.jar">
      <echo>Recording test output in ${abcl.test.log.file}.</echo>
      <record name="${abcl.test.log.file}" emacsmode="true" action="start" append="yes"/>
      <java fork="true" dir="${basedir}"
1109 1110 1111 1112
            classpathref="abcl.classpath.dist"
            classname="org.armedbear.lisp.Main">
        <arg value="--noinit"/> 
        <arg value="--eval"/><arg value="(require (quote asdf))"/>
1113 1114
        <arg value="--eval"/>
          <arg value="(asdf:initialize-source-registry `(:source-registry (:directory ,*default-pathname-defaults*) :inherit-configuration)))"/>
1115
        <arg value="--eval"/><arg value="(asdf:test-system :abcl)"/>
1116
        <arg value="--eval"/><arg value="(ext:exit)"/>
1117 1118 1119
      </java>
      <record name="${abcl.test.log.file}" emacsmode="true" action="stop"/>
      <echo>Finished recording test output in ${abcl.test.log.file}.</echo>
1120
    </target>
1121

1122 1123 1124 1125
    <target name="test.cl-bench" depends="abcl.jar">
      <echo>Recording test output in ${abcl.test.log.file}.</echo>
      <record name="${abcl.test.log.file}" emacsmode="true" action="start" append="yes"/>
      <java fork="true" dir="${basedir}"
1126 1127 1128 1129
            classpathref="abcl.classpath.dist"
            classname="org.armedbear.lisp.Main">
        <arg value="--noinit"/> 
        <arg value="--eval"/><arg value="(require (quote asdf))"/>
1130
        <arg value="--eval"/>
1131 1132
          <arg value="(asdf:initialize-source-registry `(:source-registry (:directory ,*default-pathname-defaults*) :inherit-configuration))"/>
        <arg value="--eval"/><arg value="(asdf:test-system :abcl/test/cl-bench)"/>
1133
        <arg value="--eval"/><arg value="(ext:exit)"/>
1134 1135 1136 1137
      </java>
      <record name="${abcl.test.log.file}" emacsmode="true" action="stop"/>
      <echo>Finished recording test output in ${abcl.test.log.file}.</echo>
    </target>
1138 1139


1140 1141
<target name="abcl.diagnostic" 
        description="Emit diagnostics describing available hosting JVM properties."
1142 1143 1144
        depends="abcl.build.diagnostic"/>
<!-- 

1145 1146 1147 1148 1149 1150 1151 1152
urn:org.abcl.build.ant.targets.diagnostic

"Possible JVM values from"

http://docs.oracle.com/javase/6/docs/api/java/lang/System.html#getProperties 

.

1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198

java.version 	Java Runtime Environment version
java.vendor 	Java Runtime Environment vendor
java.vendor.url 	Java vendor URL
java.home 	Java installation directory
java.vm.specification.version 	Java Virtual Machine specification version
java.vm.specification.vendor 	Java Virtual Machine specification vendor
java.vm.specification.name 	Java Virtual Machine specification name
java.vm.version 	Java Virtual Machine implementation version
java.vm.vendor 	Java Virtual Machine implementation vendor
java.vm.name 	Java Virtual Machine implementation name
java.specification.version 	Java Runtime Environment specification version
java.specification.vendor 	Java Runtime Environment specification vendor
java.specification.name 	Java Runtime Environment specification name
java.class.version 	Java class format version number
java.class.path 	Java class path
java.library.path 	List of paths to search when loading libraries
java.io.tmpdir 	Default temp file path
java.compiler 	Name of JIT compiler to use
java.ext.dirs 	Path of extension directory or directories
os.name 	Operating system name
os.arch 	Operating system architecture
os.version 	Operating system version
file.separator 	File separator ("/" on UNIX)
path.separator 	Path separator (":" on UNIX)
line.separator 	Line separator ("\n" on UNIX)
user.name 	User's account name
user.home 	User's home directory
user.dir

-->

<target name="abcl.build.diagnostic" description="Emit diagnostics describing available hosting JVM properties.">
  <echo>:java.version    ${java.version}</echo>
  <echo>:java.vendor     ${java.vendor}</echo>
  <echo>:java.vm.vendor  ${java.vm.vendor}</echo>
  <echo>:java.vm.name    ${java.vm.name}</echo>

  <echo>:os.name    ${os.name}</echo>
  <echo>:os.arch    ${os.arch}</echo>
  <echo>:os.version ${os.version}</echo>
  
  <echo>:java.specification.version       ${java.specification.version}</echo>
  <echo>:java.vm.specification.version    ${java.vm.specification.version}</echo>
</target>

1199
    <target name="abcl.release" 
1200
            depends="abcl.clean,abcl.binary.tar,abcl.source.tar,abcl.binary.zip,abcl.source.zip">
1201 1202
      <copy file="${abcl.jar.path}"
            tofile="${dist.dir}/abcl-${abcl.version}.jar"/>
1203 1204
      <copy file="${abcl-contrib.jar}"
            tofile="${dist.dir}/abcl-contrib-${abcl.version}.jar"/>
1205
    </target>
1206

1207 1208 1209
    <target name="abcl.documentation"
            depends="abcl.documentation.manual,abcl.documentation.asdf"/>
    <target name="abcl.documentation.manual"
1210
            depends="abcl.stamp.version">
1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228
      <echo>This target requires 'make' and a LaTeX installation to be on the PATH.</echo>
      <exec
          executable="make"
          dir="${basedir}/doc/manual"/>
      <copy file="doc/manual/abcl.pdf"
            tofile="${dist.dir}/abcl-${abcl.version}.pdf"/>
    </target>
    <target name="abcl.documentation.asdf">
      <echo>This target requires 'texi2pdf' to be on the PATH.</echo>
      <exec
          executable="texi2pdf"
          dir="${basedir}/doc/asdf">
        <arg value="asdf.texinfo"/>
      </exec>
      <copy file="doc/asdf/asdf.pdf"
            tofile="${dist.dir}/asdf.pdf"/>
    </target>

1229 1230 1231 1232 1233 1234
    <import file="etc/ant/netbeans-build.xml"
            optional="true"/> 
    <import file="etc/ant/build-snapshot.xml"
            optional="true"/>
    <import file="etc/ant/build-maven.xml"
            optional="true"/>
1235
  </project>