build.xml 44.7 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 52 53 54 55 56 57
    <fail message="Please build using Ant 1.7.1 or higher.">
        <condition>
            <not>
                <antversion atleast="1.7.1"/>
            </not>
        </condition>
    </fail>
58

59
    <!-- Checks if JSR-223 support is available - thanks to Mark Evenson -->
60
    <available property="abcl.jsr-223.p"
61
               classname="javax.script.ScriptEngine"/>
62

63 64 65
    <patternset id="abcl.source.java">
      <include name="org/armedbear/lisp/*.java"/>
      <include name="org/armedbear/lisp/util/*.java"/>
66
      <include name="org/armedbear/lisp/protocol/*.java"/>
67
      <include name="org/armedbear/lisp/java/**/*.java"/>
68 69 70 71
      <include if="abcl.jsr-223.p"
               name="org/armedbear/lisp/scripting/*.java" />
      <include if="abcl.jsr-223.p"
               name="org/armedbear/lisp/scripting/util/*.java" />
72
      <include name="org/armedbear/Main.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 if="abcl.jsr-223.p" 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 87 88 89
      <include if="abcl.jsr-223.p"
               name="org/armedbear/lisp/scripting/lisp/*.lisp" />
      <include if="abcl.compile.lisp.skip"
               name="**/*.lisp" />
90 91 92
    </patternset>

    <patternset id="abcl.objects">
93
      <!-- "system.lisp" is dynamically created by COMPILE-fSYSTEM -->
94
      <include name="org/armedbear/lisp/system.lisp"/> 
95 96 97
      <include name="org/armedbear/lisp/**/*.class"/>
      <include name="org/armedbear/lisp/**/*.cls"/> 
      <include name="org/armedbear/lisp/**/*.abcl"/>
98
      <include name="org/armedbear/lisp/version"/>
99 100 101 102
      <include if="abcl.jsr-223.p"
               name="org/armedbear/lisp/scripting/*.class"/>
      <include if="abcl.jsr-223.p"
               name="org/armedbear/lisp/scripting/util/*.class"/>
103
      <patternset refid="abcl.source.lisp.dist"/>
104
      <include name="abcl.rdf"/>
105 106 107 108 109 110
      <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"/>
111 112 113 114 115 116 117 118 119 120
    </patternset>
    
    <path id="abcl.classpath.dist">
      <pathelement location="${abcl.jar.path}"/>
    </path>
    
    <path id="abcl.classpath.build">
      <pathelement location="${build.classes.dir}"/>
    </path>

121
    <target name="abcl.compile" depends="abcl.clean.maybe,abcl.compile.lisp">
122
      <echo>Compiled ABCL with Java version: ${java.version}</echo>
123
    </target>
124

125 126 127 128 129
    <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>
130

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

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

      <property name="abcl.test.log.file"
141
                value="abcl-test-${build.stamp}.log"/>
142

143
      <property name="java.path"
144
                value="${java.home}/bin/java"/>
145

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

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

161 162
      <echo>java.version: ${java.version}</echo>
      <condition property="abcl.java.version.p">
163
        <or>
164 165
          <matches string="${java.version}" 
                   pattern="1\.5"/>
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
    <target name="abcl.jsr-223.notice"
186 187
            depends="abcl.init"
            unless="abcl.jsr-223.p">
188
      <echo>
189 190 191
        Notice: JSR-223 support won't be built since it is not
                supported, neither natively by your JVM nor by 
                libraries in the CLASSPATH.
192
      </echo>
193 194
    </target>

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

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

    <target name="abcl.stage"
	    depends="abcl.copy.lisp">
225 226
      <copy todir="${build.classes.dir}" preservelastmodified="yes"
            verbose="true">
227 228 229 230 231 232
	<fileset dir="${basedir}/">
	  <patternset refid="abcl.stage"/>
	</fileset>
      </copy>
    </target>
    
233 234
    <target name="abcl.copy.lisp">
      <copy todir="${build.classes.dir}" preservelastmodified="yes">
235
        <fileset dir="${src.dir}">
236
          <patternset refid="abcl.source.lisp.dist"/>
237
        </fileset>
238 239 240 241 242
      </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
243
         fasls.  Highly inter-dependent with the behavior specified in
244 245
         'compile-system.lisp', i.e. files not listed in
         there should NOT occur here. -->
246 247
    <patternset id="abcl.source.lisp.fasls">
      <patternset refid="abcl.source.lisp"/>
248
      <exclude name="org/armedbear/lisp/scripting/**/*.lisp"/>
249 250 251 252 253 254 255
      <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">
256 257 258 259
        <srcfiles dir="${src.dir}">
          <patternset refid="abcl.source.lisp.fasls"/>
        </srcfiles>
        <mapper type="glob" from="*.lisp" to="${build.classes.dir}/*.abcl"/>
260 261
      </uptodate>
    </target>
262 263 264

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

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

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

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

    <macrodef name="abcl.compile.lisp">
      <element name="additional.jvmarg" optional="true"/>
      <sequential>
        <echo>
285 286
Compiling Lisp system 
from ${abcl.home.dir}
287 288 289 290 291 292 293
 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}" 
294 295
            fork="true"
            failonerror="true"
296
            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))))"
297
            classname="org.armedbear.lisp.Main">
298
        <jvmarg value="-Dabcl.home=${abcl.home.dir}${file.separator}"/>
299
        <jvmarg value="-Dabcl.autoload.verbose=Y"/>
300
        <additional.jvmarg/>
301
        <arg value="--noinit"/>
302
        <arg value="--nosystem"/>
303 304
        <arg value="--eval"/>
        <arg value="(setf *load-verbose* t)"/>
305
      </java>
306 307 308
      <concat destfile="${system.lisp.file}" append="true">
        <fileset file="${abcl.startup.file}"/>
      </concat>
309 310 311 312 313 314
        </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" 
315
            depends="abcl.stage,abcl.compile.java,abcl.system.update.maybe,abcl.fasls.uptodate"
316 317 318 319 320 321 322
            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>
323 324
    </target>

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

335 336 337 338 339 340 341 342 343 344

    <!-- 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"/>
345 346 347 348 349 350 351 352 353 354 355 356 357 358
        <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>
359 360 361 362 363
      </and>
    </condition>

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

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

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

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

      <!-- 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}"/>

393 394 395 396 397 398 399 400 401 402 403 404
      <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>

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

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

414 415 416 417 418 419
    <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>

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

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

442 443 444 445 446 447 448 449 450 451 452 453
    <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}"/>
454 455 456 457 458 459 460
    </target>

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

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

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

486
    <target name="abcl.jar" depends="abcl.jar.uptodate,abcl-contrib.jar"
487
            unless="abcl.jar.uptodate.p">
488 489
      <mkdir dir="${dist.dir}"/>
      <jar destfile="${abcl.jar.path}"
490
           compress="true"
491
           update="true"
492 493 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"> 
          <exclude name="services/javax.script.ScriptEngineFactory"
                   unless="abcl.jsr-223.p"/>
        </metainf>
509 510
      </jar>
    </target>
511

512
    <target name="abcl-aio.jar" depends="abcl.compile,abcl.version">
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 562 563
        </manifest>
        <metainf dir="${src.dir}/META-INF"> 
          <exclude name="services/javax.script.ScriptEngineFactory"
                   unless="abcl.jsr-223.p"/>
        </metainf>
      </jar>
    </target>

564 565
    
    <target name="abcl.wrapper" 
566
            depends="abcl.jar,abcl.contrib,abcl.wrapper.unix,abcl.wrapper.windows">
567
      <description>
568 569
        Creates in-place executable shell wrapper in
        '${abcl.wrapper.file}'
570 571 572 573
      </description>
      <!-- Set from commandline or in 'build.properties' -->
      <property name="additional.jars" value=""/>
      <path id="abcl.runtime.classpath">
574
        <pathelement location="${abcl.runtime.jar.path}"/>
575
        <pathelement path="${additional.jars}"/>
576 577 578 579 580
      </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">
581 582 583 584 585 586 587 588
        <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>
589 590
      </copy>
      <chmod file="${abcl.wrapper.file}" perm="a+x"/>
591 592

      <echo>Created executable ABCL wrapper in '${abcl.wrapper.file}'</echo>
593 594 595 596 597 598 599 600 601 602 603 604
      <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>
605

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

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

616 617 618 619 620
    <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">
621
          <patternset refid="abcl.contrib.source"/>
622 623 624 625
        </srcfiles>
      </uptodate>
    </condition>

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

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

639
will place all the contribs in the ASDF registry. 
640

641
To load a contrib, something like
642

643
  CL-USER> (require 'jss) 
644

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

649 650 651 652 653 654 655 656 657 658 659 660 661 662
    <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>

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

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

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

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

700 701 702 703 704
    <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">
705 706 707 708 709 710 711 712
      <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>
713 714
    </target>

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

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

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

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

      <include name="abcl.asd"/>
759
      
760
      <include name="examples/**"/>
761 762

      <include name="contrib/**"/>
763 764
      
      <include name="test/**"/>
765

766
      <include name="build-from-lisp.bash"/>
767
      
768 769 770
      <!-- The remainder of these files are used by the Lisp hosted
           build in 'build-abcl.lisp' but not used by Ant, so include
           them in the source distribution. -->
771 772 773 774 775 776 777 778
      <include name="make-jar.in"/>
      <include name="make-jar.bat.in"/>

      <include name="build-abcl.lisp"/>
      <include name="customizations.lisp.in"/>

    </patternset>

779
    <!-- TODO merge with artifacts from 'abcl.stage' -->
780 781 782
    <patternset 
        id="abcl.source.misc"
        description="Additional includes in the source distribution relative to source root">
783 784
      <include name="org/armedbear/lisp/LICENSE"/>
      <include name="manifest-abcl"/>
785
      <include name="META-INF/services/javax.script.ScriptEngineFactory"/>
786
    </patternset>
787

788 789
    <target name="abcl.source.prepare" depends="abcl.stamp.version">
      <property name="abcl.build.src.dir"
790
                value="${build.dir}/abcl-src-${abcl.version}"/>
791
      <mkdir dir="${abcl.build.src.dir}/src"/>
792 793 794 795 796 797 798 799 800 801 802 803 804 805 806
      <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>
807 808
    </target>

809 810
    <!--  Files in source distribution that always get LF EOL (aka
         'unix') -->    
811
    <patternset id="abcl.dist.lf">
812 813 814 815 816 817 818 819 820
      <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>

821
    <target name="abcl.source.unix" depends="abcl.source.prepare">
822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837
      <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>
838
    </target>
839

840
    <target name="abcl.source.tar" depends="abcl.source.unix">
841 842
      <mkdir dir="${dist.dir}"/>
      <tar destfile="${dist.dir}/abcl-src-${abcl.version}.tar.gz"
843 844 845 846
           compression="gzip">
        <tarfileset dir="${build.dir}">
          <include name="abcl-src-${abcl.version}/**"/>
        </tarfileset>
847 848 849
      </tar>
    </target>

850
    <target name="abcl.source.windows" depends="abcl.source.prepare">
851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866
      <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>
867
    </target>
868

869
    <target name="abcl.source.zip" depends="abcl.stamp,abcl.source.windows">
870 871
      <mkdir dir="${dist.dir}"/>
      <zip destfile="${dist.dir}/abcl-src-${abcl.version}.zip"
872 873
           compress="true">
        <zipfileset dir="${abcl.build.src.dir}" prefix="abcl-src-${abcl.version}"/>
874 875
      </zip>
    </target>
876

877
    <target name="abcl.source.jar" depends="abcl.stamp,abcl.source.unix">
878 879 880 881 882 883 884 885 886 887 888 889
      <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>

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

892
    <target name="abcl.javadoc" depends="abcl.stamp">
893 894 895 896 897 898 899 900 901 902 903 904
      <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>

905
    <target name="abcl.binary.prepare" depends="abcl.jar,abcl.contrib,abcl.documentation,abcl.stamp.version">
906 907 908 909 910 911 912 913
      <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"/>
914
            <include name="abcl-contrib.jar"/>
915
            <include name="*.pdf"/>
916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941
          </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>
942

943 944 945 946 947 948 949
    <target name="help.test">
      <echo>
The following Ant targets run various test suites:
  
  abcl.test
    --  Run all available tests.
  abcl.test.java
950
    --  Run the ABCL junit Java tests under ${basedir}/test/src/
951 952 953 954 955
  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
956
    --  Run the Lisp RT tests collected in ${basedir}/test/lisp/abcl/
957 958 959 960 961 962
  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.

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

965
The CL-BENCH tests require that [cl-bench][2] be manually installed in
966 967 968 969 970 971
${basedir}/../cl-bench

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

972
    <property name="abcl.test.classes.dir"
973
              value="${build.dir}/classes-test"/>
974 975

    <property name="abcl.test.src.dir"
976
              value="${basedir}/test/src"/>
977 978

    <patternset id="abcl.test.source.java">
979
      <include name="org/armedbear/lisp/**/*.java"/>
980 981
    </patternset>

982
    <property name="junit.path"
983
              value="${abcl.ext.dir}/junit-4.8.1.jar"/>
984 985 986 987 988 989
    <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}"/>
990 991

    <path id="abcl.test.compile.classpath">
992
      <pathelement location="${junit.path}"/>
993 994 995
      <pathelement location="${build.classes.dir}"/>
    </path>

996 997 998
    <target name="abcl.test.pre-compile" depends="abcl.ext"/>

    <target name="abcl.ext.p">
999
      <!--XXX generalize over enumeration of all contributions to
1000 1001 1002 1003 1004 1005 1006
          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>
1007 1008
    </target>

1009
    <target name="abcl.ext" depends="abcl.ext.p" unless="abcl.ext.p">
1010
      <mkdir dir="${abcl.ext.dir}"/>
1011 1012 1013 1014
      <get 
          src="http://cloud.github.com/downloads/KentBeck/junit/junit-4.8.1.jar"
          usetimestamp="true"
          dest="${junit.path}"/>
1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025
      <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>
1026
    </target>
1027
        
1028
    <target name="abcl.test.compile" 
1029
            depends="abcl.test.pre-compile">
1030 1031
      <mkdir dir="${abcl.test.classes.dir}"/>
      <javac destdir="${abcl.test.classes.dir}"
1032 1033 1034 1035 1036
             classpathref="abcl.test.compile.classpath"
             debug="true"
             target="1.5">
        <src path="${abcl.test.src.dir}"/>
        <patternset refid="abcl.test.source.java"/>
1037 1038 1039 1040 1041 1042 1043
      </javac>
    </target>

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

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

1062
    <target name="abcl.test.lisp" 
1063
            depends="test.ansi.compiled,test.abcl,test.cl-bench"/>
1064

1065 1066 1067
    <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"/>
1068
      <java fork="true" dir="${basedir}"
1069 1070 1071 1072
            classpathref="abcl.classpath.dist"
            classname="org.armedbear.lisp.Main">
        <arg value="--noinit"/> 
        <arg value="--eval"/><arg value="(require (quote asdf))"/>
1073 1074
        <arg value="--eval"/>
          <arg value="(asdf:initialize-source-registry `(:source-registry (:directory ,*default-pathname-defaults*) :inherit-configuration)))"/>
1075
        <arg value="--eval"/><arg value="(asdf:test-system :abcl/test/ansi/interpreted)"/>
1076
        <arg value="--eval"/><arg value="(ext:exit)"/>
1077
      </java>
1078 1079
      <record name="${abcl.test.log.file}" emacsmode="true" action="stop"/>
      <echo>Finished recording test output in ${abcl.test.log.file}.</echo>
1080 1081
    </target>

1082
    <target name="test.ansi.compiled" depends="abcl.jar">
1083
      <echo>Recording test output in ${abcl.test.log.file}.</echo>
1084
      <record name="${abcl.test.log.file}" emacsmode="true" action="start" append="yes"/>
1085
      <java fork="true" dir="${basedir}"
1086 1087
            classpathref="abcl.classpath.dist"
            classname="org.armedbear.lisp.Main">
1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099
        <!-- 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"/> 

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

1111 1112 1113 1114
    <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}"
1115 1116 1117 1118
            classpathref="abcl.classpath.dist"
            classname="org.armedbear.lisp.Main">
        <arg value="--noinit"/> 
        <arg value="--eval"/><arg value="(require (quote asdf))"/>
1119 1120
        <arg value="--eval"/>
          <arg value="(asdf:initialize-source-registry `(:source-registry (:directory ,*default-pathname-defaults*) :inherit-configuration)))"/>
1121
        <arg value="--eval"/><arg value="(asdf:test-system :abcl)"/>
1122
        <arg value="--eval"/><arg value="(ext:exit)"/>
1123 1124 1125
      </java>
      <record name="${abcl.test.log.file}" emacsmode="true" action="stop"/>
      <echo>Finished recording test output in ${abcl.test.log.file}.</echo>
1126
    </target>
1127

1128 1129 1130 1131
    <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}"
1132 1133 1134 1135
            classpathref="abcl.classpath.dist"
            classname="org.armedbear.lisp.Main">
        <arg value="--noinit"/> 
        <arg value="--eval"/><arg value="(require (quote asdf))"/>
1136
        <arg value="--eval"/>
1137 1138
          <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)"/>
1139
        <arg value="--eval"/><arg value="(ext:exit)"/>
1140 1141 1142 1143
      </java>
      <record name="${abcl.test.log.file}" emacsmode="true" action="stop"/>
      <echo>Finished recording test output in ${abcl.test.log.file}.</echo>
    </target>
1144 1145


1146 1147
<target name="abcl.diagnostic" 
        description="Emit diagnostics describing available hosting JVM properties."
1148 1149 1150
        depends="abcl.build.diagnostic"/>
<!-- 

1151 1152 1153 1154 1155 1156 1157 1158
urn:org.abcl.build.ant.targets.diagnostic

"Possible JVM values from"

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

.

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 1199 1200 1201 1202 1203 1204

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>

1205
    <target name="abcl.release" 
1206
            depends="abcl.clean,abcl.binary.tar,abcl.source.tar,abcl.binary.zip,abcl.source.zip">
1207 1208
      <copy file="${abcl.jar.path}"
            tofile="${dist.dir}/abcl-${abcl.version}.jar"/>
1209 1210
      <copy file="${abcl-contrib.jar}"
            tofile="${dist.dir}/abcl-contrib-${abcl.version}.jar"/>
1211
    </target>
1212

1213 1214 1215
    <target name="abcl.documentation"
            depends="abcl.documentation.manual,abcl.documentation.asdf"/>
    <target name="abcl.documentation.manual"
1216
            depends="abcl.stamp.version">
1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234
      <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>

1235 1236 1237
    <import file="netbeans-build.xml" optional="true"/> 
<!--    <import file="j-build.xml" optional="true"/>  -->
    <import file="not.org-build.xml" optional="true"/> 
1238 1239
    
    <import file="build-snapshot.xml" optional="true"/>
1240

1241
    <import file="build-maven.xml" optional="true"/> </project>