| 1 | <?xml version="1.0" encoding="UTF-8"?> | 
|---|
| 2 | <project xmlns="antlib:org.apache.tools.ant" | 
|---|
| 3 | name="abcl-master" default="abcl.wrapper" basedir="."> | 
|---|
| 4 | <description>Compiling, testing, and packaging Armed Bear Common Lisp</description> | 
|---|
| 5 |  | 
|---|
| 6 | <target name="abcl" depends="abcl.wrapper"/> | 
|---|
| 7 |  | 
|---|
| 8 | <target name="help"> | 
|---|
| 9 | <echo> | 
|---|
| 10 | Main Ant targets: | 
|---|
| 11 |  | 
|---|
| 12 | abcl.wrapper | 
|---|
| 13 | -- [default] create executable wrapper for ABCL. | 
|---|
| 14 | abcl.compile | 
|---|
| 15 | -- compile ABCL to ${build.classes.dir}. | 
|---|
| 16 | abcl.jar | 
|---|
| 17 | -- create packaged ${abcl.jar.path}. | 
|---|
| 18 | abcl.source.zip abcl.source.tar | 
|---|
| 19 | -- create source distributions in ${dist.dir}. | 
|---|
| 20 | abcl.clean | 
|---|
| 21 | -- remove ABCL intermediate files | 
|---|
| 22 | </echo> | 
|---|
| 23 |  | 
|---|
| 24 | <echo> | 
|---|
| 25 | For help on the automatic tests available, use the Ant target 'help.test'. | 
|---|
| 26 | </echo> | 
|---|
| 27 | </target> | 
|---|
| 28 |  | 
|---|
| 29 | <!-- Behavior of the build system can be customized via setting | 
|---|
| 30 | properties in the 'abcl.properties' file. --> | 
|---|
| 31 | <property file="abcl.properties"/> | 
|---|
| 32 |  | 
|---|
| 33 | <property name="build.dir" | 
|---|
| 34 | value="${basedir}/build"/> | 
|---|
| 35 | <property name="build.classes.dir" | 
|---|
| 36 | value="${build.dir}/classes"/> | 
|---|
| 37 | <property name="src.dir" | 
|---|
| 38 | value="${basedir}/src"/> | 
|---|
| 39 | <property name="dist.dir" | 
|---|
| 40 | value="${basedir}/dist"/> | 
|---|
| 41 | <property name="abcl.jar.path" | 
|---|
| 42 | value="${dist.dir}/abcl.jar"/> | 
|---|
| 43 | <property name="abcl.ext.dir" | 
|---|
| 44 | value="${basedir}/ext"/> | 
|---|
| 45 |  | 
|---|
| 46 | <property name="abcl.runtime.jar.path" | 
|---|
| 47 | value="${abcl.jar.path}"/> | 
|---|
| 48 |  | 
|---|
| 49 | <fail message="Please build using Ant 1.7.1 or higher."> | 
|---|
| 50 | <condition> | 
|---|
| 51 | <not> | 
|---|
| 52 | <antversion atleast="1.7.1"/> | 
|---|
| 53 | </not> | 
|---|
| 54 | </condition> | 
|---|
| 55 | </fail> | 
|---|
| 56 |  | 
|---|
| 57 | <!-- Checks if JSR-223 support is available - thanks to Mark Evenson --> | 
|---|
| 58 | <available property="abcl.jsr-223.p" | 
|---|
| 59 | classname="javax.script.ScriptEngine"/> | 
|---|
| 60 |  | 
|---|
| 61 | <patternset id="abcl.source.java"> | 
|---|
| 62 | <include name="org/armedbear/lisp/*.java"/> | 
|---|
| 63 | <include name="org/armedbear/lisp/util/*.java"/> | 
|---|
| 64 | <include name="org/armedbear/lisp/protocol/*.java"/> | 
|---|
| 65 | <include name="org/armedbear/lisp/java/**/*.java"/> | 
|---|
| 66 | <include name="org/armedbear/lisp/scripting/*.java" if="abcl.jsr-223.p"/> | 
|---|
| 67 | <include name="org/armedbear/lisp/scripting/util/*.java" if="abcl.jsr-223.p"/> | 
|---|
| 68 | <include name="org/armedbear/Main.java"/> | 
|---|
| 69 | </patternset> | 
|---|
| 70 |  | 
|---|
| 71 | <patternset id="abcl.source.lisp"> | 
|---|
| 72 | <include name="org/armedbear/lisp/*.lisp"/> | 
|---|
| 73 | <include name="org/armedbear/lisp/java/**/*.lisp"/> | 
|---|
| 74 | <include name="org/armedbear/lisp/tests/*.lisp"/> | 
|---|
| 75 | <exclude name="org/armedbear/lisp/j.lisp"/> | 
|---|
| 76 | <include name="org/armedbear/lisp/scripting/lisp/*.lisp" if="abcl.jsr-223.p"/> | 
|---|
| 77 | </patternset> | 
|---|
| 78 |  | 
|---|
| 79 | <!-- Lisp files required at runtime --> | 
|---|
| 80 | <patternset id="abcl.source.lisp.dist"> | 
|---|
| 81 | <include name="org/armedbear/lisp/boot.lisp"/> | 
|---|
| 82 | <include name="org/armedbear/lisp/scripting/lisp/*.lisp" if="abcl.jsr-223.p"/> | 
|---|
| 83 | <include name="**/*.lisp" if="abcl.compile.lisp.skip"/> | 
|---|
| 84 | </patternset> | 
|---|
| 85 |  | 
|---|
| 86 | <patternset id="abcl.objects"> | 
|---|
| 87 | <!-- "system.lisp" is dynamically created by COMPILE-fSYSTEM --> | 
|---|
| 88 | <include name="org/armedbear/lisp/system.lisp"/> | 
|---|
| 89 | <include name="org/armedbear/lisp/**/*.class"/> | 
|---|
| 90 | <include name="org/armedbear/lisp/**/*.cls"/> | 
|---|
| 91 | <include name="org/armedbear/lisp/**/*.abcl"/> | 
|---|
| 92 | <include name="org/armedbear/lisp/version"/> | 
|---|
| 93 | <include name="org/armedbear/lisp/scripting/*.class" if="abcl.jsr-223.p"/> | 
|---|
| 94 | <include name="org/armedbear/lisp/scripting/util/*.class" if="abcl.jsr-223.p"/> | 
|---|
| 95 | <patternset refid="abcl.source.lisp.dist"/> | 
|---|
| 96 | <include name="abcl.rdf"/> | 
|---|
| 97 | </patternset> | 
|---|
| 98 |  | 
|---|
| 99 | <path id="abcl.classpath.dist"> | 
|---|
| 100 | <pathelement location="${abcl.jar.path}"/> | 
|---|
| 101 | </path> | 
|---|
| 102 |  | 
|---|
| 103 | <path id="abcl.classpath.build"> | 
|---|
| 104 | <pathelement location="${build.classes.dir}"/> | 
|---|
| 105 | </path> | 
|---|
| 106 |  | 
|---|
| 107 | <target name="abcl.compile" depends="abcl.clean.maybe,abcl.compile.lisp"> | 
|---|
| 108 | <echo>Compiled ABCL with Java version: ${java.version}</echo> | 
|---|
| 109 | </target> | 
|---|
| 110 |  | 
|---|
| 111 | <target name="abcl.clean.maybe" unless="abcl.build.incremental"> | 
|---|
| 112 | <echo>Cleaning all intermediate compilation artifacts.</echo> | 
|---|
| 113 | <echo>Setting 'abcl.build.incremental' enables incremental compilation.</echo> | 
|---|
| 114 | <antcall target="abcl.clean"/> | 
|---|
| 115 | </target> | 
|---|
| 116 |  | 
|---|
| 117 |  | 
|---|
| 118 | <target name="abcl.init"> | 
|---|
| 119 | <tstamp> | 
|---|
| 120 | <format property="build" pattern="EEE MMM dd yyyy HH:mm:ss zzz"/> | 
|---|
| 121 | </tstamp> | 
|---|
| 122 |  | 
|---|
| 123 | <tstamp> | 
|---|
| 124 | <format property="build.stamp" pattern="yyyymmdd-HHmm"/> | 
|---|
| 125 | </tstamp> | 
|---|
| 126 |  | 
|---|
| 127 | <property name="abcl.test.log.file" | 
|---|
| 128 | value="abcl-test-${build.stamp}.log"/> | 
|---|
| 129 |  | 
|---|
| 130 | <property name="java.path" | 
|---|
| 131 | value="${java.home}/bin/java"/> | 
|---|
| 132 |  | 
|---|
| 133 | <!-- Deprecated. Two main types of build environents: 'unix' or 'windows'. --> | 
|---|
| 134 | <condition property="unix"> | 
|---|
| 135 | <or> | 
|---|
| 136 | <os family="unix"/> | 
|---|
| 137 | <os family="mac"/> | 
|---|
| 138 | </or> | 
|---|
| 139 | </condition> | 
|---|
| 140 | <condition property="windows"> | 
|---|
| 141 | <os family="windows"/> | 
|---|
| 142 | </condition> | 
|---|
| 143 |  | 
|---|
| 144 | <!-- Deprecated. --> | 
|---|
| 145 | <available file="${src.dir}org/armedbear/lisp/Interpreter.java" | 
|---|
| 146 | property="abcl.lisp.p"/> | 
|---|
| 147 |  | 
|---|
| 148 | <echo>java.version: ${java.version}</echo> | 
|---|
| 149 | <condition property="abcl.java.version.p"> | 
|---|
| 150 | <or> | 
|---|
| 151 | <matches string="${java.version}" | 
|---|
| 152 | pattern="1\.5"/> | 
|---|
| 153 | <!-- Don't use 1.6.0_09 or earlier. --> | 
|---|
| 154 | <matches string="${java.version}" | 
|---|
| 155 | pattern="1\.6\.0_[1-9][0-9]"/> | 
|---|
| 156 | <!-- 1.7.0_04 works much better. --> | 
|---|
| 157 | <matches string="${java.version}" | 
|---|
| 158 | pattern="1\.7\.0_(0[4-9])|([1-9][0-9])"/> | 
|---|
| 159 | </or> | 
|---|
| 160 | </condition> | 
|---|
| 161 |  | 
|---|
| 162 | </target> | 
|---|
| 163 |  | 
|---|
| 164 | <target name="abcl.java.warning" | 
|---|
| 165 | depends="abcl.init" | 
|---|
| 166 | unless="abcl.java.version.p"> | 
|---|
| 167 | <echo>WARNING: Use of Java version ${java.version} not recommended.</echo> | 
|---|
| 168 | </target> | 
|---|
| 169 |  | 
|---|
| 170 | <target name="abcl.jsr-223.notice" | 
|---|
| 171 | depends="abcl.init" | 
|---|
| 172 | unless="abcl.jsr-223.p"> | 
|---|
| 173 | <echo> | 
|---|
| 174 | Notice: JSR-223 support won't be built since it is not | 
|---|
| 175 | supported, neither natively by your JVM nor by | 
|---|
| 176 | libraries in the CLASSPATH. | 
|---|
| 177 | </echo> | 
|---|
| 178 | </target> | 
|---|
| 179 |  | 
|---|
| 180 | <target name="abcl.compile.java" | 
|---|
| 181 | depends="abcl.init,abcl.java.warning,abcl.jsr-223.notice"> | 
|---|
| 182 | <mkdir dir="${build.dir}"/> | 
|---|
| 183 | <mkdir dir="${build.classes.dir}"/> | 
|---|
| 184 | <!-- Stock build for Java 1.5 (aka Java 2) container --> | 
|---|
| 185 | <javac destdir="${build.classes.dir}" | 
|---|
| 186 | debug="true" | 
|---|
| 187 | target="1.5" | 
|---|
| 188 | source="1.5" | 
|---|
| 189 | includeantruntime="false" | 
|---|
| 190 | failonerror="true"> | 
|---|
| 191 | <src path="${src.dir}"/> | 
|---|
| 192 | <patternset refid="abcl.source.java"/> | 
|---|
| 193 | </javac> | 
|---|
| 194 | <echo message="${build}" | 
|---|
| 195 | file="${build.classes.dir}/org/armedbear/lisp/build"/> | 
|---|
| 196 | </target> | 
|---|
| 197 |  | 
|---|
| 198 | <!-- Additional artifacts to stage relative to Ant ${basedir} --> | 
|---|
| 199 | <patternset id="abcl.stage"> | 
|---|
| 200 | <include name="abcl.rdf"/> | 
|---|
| 201 | </patternset> | 
|---|
| 202 |  | 
|---|
| 203 | <target name="abcl.stage" | 
|---|
| 204 | depends="abcl.copy.lisp"> | 
|---|
| 205 | <copy todir="${build.classes.dir}" preservelastmodified="yes"> | 
|---|
| 206 | <fileset dir="${basedir}/"> | 
|---|
| 207 | <patternset refid="abcl.stage"/> | 
|---|
| 208 | </fileset> | 
|---|
| 209 | </copy> | 
|---|
| 210 | </target> | 
|---|
| 211 |  | 
|---|
| 212 | <target name="abcl.copy.lisp"> | 
|---|
| 213 | <copy todir="${build.classes.dir}" preservelastmodified="yes"> | 
|---|
| 214 | <fileset dir="${src.dir}"> | 
|---|
| 215 | <patternset refid="abcl.source.lisp.dist"/> | 
|---|
| 216 | </fileset> | 
|---|
| 217 | </copy> | 
|---|
| 218 | </target> | 
|---|
| 219 |  | 
|---|
| 220 | <!-- Adjust the patternset for ABCL source to use the much faster | 
|---|
| 221 | Ant 'uptodate' task to check if we need to compile the system | 
|---|
| 222 | fasls.  Highly inter-dependent with the behavior specified in | 
|---|
| 223 | 'compile-system.lisp', i.e. files not listed in | 
|---|
| 224 | there should NOT occur here. --> | 
|---|
| 225 | <patternset id="abcl.source.lisp.fasls"> | 
|---|
| 226 | <patternset refid="abcl.source.lisp"/> | 
|---|
| 227 | <exclude name="org/armedbear/lisp/scripting/**/*.lisp"/> | 
|---|
| 228 | <exclude name="org/armedbear/lisp/boot.lisp"/> | 
|---|
| 229 | <exclude name="org/armedbear/lisp/emacs.lisp"/> | 
|---|
| 230 | <exclude name="org/armedbear/lisp/run-benchmarks.lisp"/> | 
|---|
| 231 | </patternset> | 
|---|
| 232 |  | 
|---|
| 233 | <target name="abcl.fasls.uptodate"> | 
|---|
| 234 | <uptodate property="abcl.fasls.uptodate.p" value="true"> | 
|---|
| 235 | <srcfiles dir="${src.dir}"> | 
|---|
| 236 | <patternset refid="abcl.source.lisp.fasls"/> | 
|---|
| 237 | </srcfiles> | 
|---|
| 238 | <mapper type="glob" from="*.lisp" to="${build.classes.dir}/*.abcl"/> | 
|---|
| 239 | </uptodate> | 
|---|
| 240 | </target> | 
|---|
| 241 |  | 
|---|
| 242 | <path id="abcl.home.dir.path"> | 
|---|
| 243 | <path location="${src.dir}/org/armedbear/lisp/"/> | 
|---|
| 244 | </path> | 
|---|
| 245 | <pathconvert property="abcl.home.dir" refid="abcl.home.dir.path"/> | 
|---|
| 246 |  | 
|---|
| 247 | <path id="abcl.lisp.output.path" | 
|---|
| 248 | location="${build.classes.dir}/org/armedbear/lisp/"/> | 
|---|
| 249 | <pathconvert dirsep="/" property="abcl.lisp.output" refid="abcl.lisp.output.path"/> | 
|---|
| 250 |  | 
|---|
| 251 | <property name="system.lisp.file" | 
|---|
| 252 | value="${build.classes.dir}/org/armedbear/lisp/system.lisp"/> | 
|---|
| 253 |  | 
|---|
| 254 | <target name="abcl.compile.lisp" | 
|---|
| 255 | depends="abcl.stage,abcl.compile.java,abcl.system.update.maybe,abcl.fasls.uptodate" | 
|---|
| 256 | unless="abcl.fasls.uptodate.p"> | 
|---|
| 257 | <abcl.compile.lisp/> | 
|---|
| 258 | </target> | 
|---|
| 259 |  | 
|---|
| 260 | <macrodef name="abcl.compile.lisp"> | 
|---|
| 261 | <element name="additional.jvmarg" optional="true"/> | 
|---|
| 262 | <sequential> | 
|---|
| 263 | <echo> | 
|---|
| 264 | Compiling Lisp system | 
|---|
| 265 | from ${abcl.home.dir} | 
|---|
| 266 | to  ${abcl.lisp.output}</echo> | 
|---|
| 267 |  | 
|---|
| 268 | <!-- Not good if ${abcl.home.dir} == ${abcl.lisp.output} --> | 
|---|
| 269 | <delete> | 
|---|
| 270 | <fileset dir="${abcl.home.dir}" includes="**/*.abcl **/*.cls **/*._"/> | 
|---|
| 271 | </delete> | 
|---|
| 272 | <java classpath="${build.classes.dir}" | 
|---|
| 273 | fork="true" | 
|---|
| 274 | failonerror="true" | 
|---|
| 275 | inputstring="(handler-case (compile-system :zip nil :quit t :output-path "${abcl.lisp.output}/") (t (x) (progn (format t "~A: ~A~%" (type-of x) x) (exit :status -1))))" | 
|---|
| 276 | classname="org.armedbear.lisp.Main"> | 
|---|
| 277 | <jvmarg value="-Dabcl.home=${abcl.home.dir}${file.separator}"/> | 
|---|
| 278 | <jvmarg value="-Dabcl.autoload.verbose=Y"/> | 
|---|
| 279 | <additional.jvmarg/> | 
|---|
| 280 | <arg value="--noinit"/> | 
|---|
| 281 | <arg value="--nosystem"/> | 
|---|
| 282 | <arg value="--eval"/> | 
|---|
| 283 | <arg value="(setf *load-verbose* t)"/> | 
|---|
| 284 | </java> | 
|---|
| 285 | <concat destfile="${system.lisp.file}" append="true"> | 
|---|
| 286 | <fileset file="${abcl.startup.file}"/> | 
|---|
| 287 | </concat> | 
|---|
| 288 | </sequential> | 
|---|
| 289 | </macrodef> | 
|---|
| 290 |  | 
|---|
| 291 | <property name="abcl.compile.lisp.debug.jvmarg" | 
|---|
| 292 | value="-agentlib:jdwp=transport=dt_socket,server=y,address=6789,suspend=y"/> | 
|---|
| 293 | <target name="abcl.compile.lisp.debug" | 
|---|
| 294 | depends="abcl.stage,abcl.compile.java,abcl.system.update.maybe,abcl.fasls.uptodate" | 
|---|
| 295 | unless="abcl.fasls.uptodate.p"> | 
|---|
| 296 | <echo>Debugging with jvmarg ${abcl.compile.lisp.debug.jvmarg}</echo> | 
|---|
| 297 | <abcl.compile.lisp> | 
|---|
| 298 | <additional.jvmarg> | 
|---|
| 299 | <jvmarg value="${abcl.compile.lisp.debug.jvmarg}"/> | 
|---|
| 300 | </additional.jvmarg> | 
|---|
| 301 | </abcl.compile.lisp> | 
|---|
| 302 | </target> | 
|---|
| 303 |  | 
|---|
| 304 | <property name="abcl.build.path" | 
|---|
| 305 | value="${build.classes.dir}/org/armedbear/lisp/build"/> | 
|---|
| 306 | <target name="abcl.stamp" | 
|---|
| 307 | depends="abcl.compile,abcl.stamp.version,abcl.stamp.hostname"> | 
|---|
| 308 | <mkdir dir="${abcl.build.path}/.."/> | 
|---|
| 309 | <loadfile property="abcl.version" | 
|---|
| 310 | srcFile="${abcl.version.path}"/> | 
|---|
| 311 | <echo message="${build}" file="${abcl.build.path}"/> | 
|---|
| 312 | </target> | 
|---|
| 313 |  | 
|---|
| 314 |  | 
|---|
| 315 | <!-- Environment variables may be accessed as ${env.NAME} --> | 
|---|
| 316 | <property environment="env"/> | 
|---|
| 317 |  | 
|---|
| 318 | <!-- Can we derive an SVN version from the current build tree? --> | 
|---|
| 319 | <condition property="abcl.version.svn.p"> | 
|---|
| 320 | <and> | 
|---|
| 321 | <available | 
|---|
| 322 | file="${basedir}/.svn" | 
|---|
| 323 | type="dir"/> | 
|---|
| 324 | <or> | 
|---|
| 325 | <available | 
|---|
| 326 | file="svnversion.exe" | 
|---|
| 327 | filepath="${env.Path}"/> | 
|---|
| 328 | <available | 
|---|
| 329 | file="svnversion.exe" | 
|---|
| 330 | filepath="${env.PATH}"/> | 
|---|
| 331 | <available | 
|---|
| 332 | file="svnversion" | 
|---|
| 333 | filepath="${env.Path}"/> | 
|---|
| 334 | <available | 
|---|
| 335 | file="svnversion" | 
|---|
| 336 | filepath="${env.PATH}"/> | 
|---|
| 337 | </or> | 
|---|
| 338 | </and> | 
|---|
| 339 | </condition> | 
|---|
| 340 |  | 
|---|
| 341 | <target name="abcl.version.src" depends="abcl.version.src.3"/> | 
|---|
| 342 |  | 
|---|
| 343 | <target name="abcl.version.src.0" if="windows"> | 
|---|
| 344 | <exec | 
|---|
| 345 | executable="svnversion.exe" | 
|---|
| 346 | outputproperty="abcl.version.svn.raw" | 
|---|
| 347 | failifexecutionfails="false" | 
|---|
| 348 | searchpath="true" /> | 
|---|
| 349 | </target> | 
|---|
| 350 |  | 
|---|
| 351 | <target name="abcl.version.src.1" depends="abcl.version.src.0"> | 
|---|
| 352 | <exec | 
|---|
| 353 | executable="svnversion" | 
|---|
| 354 | outputproperty="abcl.version.svn.raw" | 
|---|
| 355 | failifexecutionfails="false" | 
|---|
| 356 | searchpath="true" /> | 
|---|
| 357 | </target> | 
|---|
| 358 |  | 
|---|
| 359 | <target name="abcl.version.src.2" | 
|---|
| 360 | depends="abcl.version.src.1" | 
|---|
| 361 | if="abcl.version.svn.p"> | 
|---|
| 362 |  | 
|---|
| 363 | <!-- Transform all occurances of ":" ==> "-" in the version string --> | 
|---|
| 364 | <tempfile property="version-tmp.path"/> | 
|---|
| 365 | <echo message="${abcl.version.svn.raw}" | 
|---|
| 366 | file="${version-tmp.path}"/> | 
|---|
| 367 | <replace file="${version-tmp.path}" | 
|---|
| 368 | token=":" value="-"/> | 
|---|
| 369 | <loadfile property="abcl.version.svn" srcFile="${version-tmp.path}"/> | 
|---|
| 370 | <delete file="${version-tmp.path}"/> | 
|---|
| 371 |  | 
|---|
| 372 | <echo>abcl.version.svn: ${abcl.version.svn}</echo> | 
|---|
| 373 | <property name="abcl.version.src" | 
|---|
| 374 | value="svn-${abcl.version.svn}"/> | 
|---|
| 375 | </target> | 
|---|
| 376 |  | 
|---|
| 377 | <target name="abcl.version.src.3" | 
|---|
| 378 | depends="abcl.version.src.2" | 
|---|
| 379 | unless="abcl.version.svn.p"> | 
|---|
| 380 | <property name="abcl.version.src" | 
|---|
| 381 | value=""/> | 
|---|
| 382 | </target> | 
|---|
| 383 |  | 
|---|
| 384 | <property name="abcl.home.dir" | 
|---|
| 385 | value="${src.dir}/org/armedbear/lisp/"/> | 
|---|
| 386 | <property name="abcl.version.path" | 
|---|
| 387 | value="${build.classes.dir}/org/armedbear/lisp/version"/> | 
|---|
| 388 |  | 
|---|
| 389 | <target name="abcl.clean.version"> | 
|---|
| 390 | <delete file="${abcl.version.path}"/> | 
|---|
| 391 | </target> | 
|---|
| 392 |  | 
|---|
| 393 | <target name="abcl.stamp.version.uptodate"> | 
|---|
| 394 | <uptodate property="abcl.stamp.version.uptodate.p" | 
|---|
| 395 | targetfile="${abcl.version.path}" | 
|---|
| 396 | srcfile="${build.classes.dir}/org/armedbear/lisp/Version.class"/> | 
|---|
| 397 | </target> | 
|---|
| 398 |  | 
|---|
| 399 | <target name="abcl.stamp.version" | 
|---|
| 400 | depends="abcl.version.src,abcl.stamp.version.1,abcl.stamp.version.2" | 
|---|
| 401 | unless="abcl.stamp.version.uptodate.p"> | 
|---|
| 402 | <mkdir dir="${abcl.version.path}/.."/> | 
|---|
| 403 | <echo>ABCL implementation version: ${abcl.implementation.version}</echo> | 
|---|
| 404 | <echo file="${abcl.version.path}">${abcl.implementation.version}</echo> | 
|---|
| 405 | </target> | 
|---|
| 406 |  | 
|---|
| 407 | <target name="abcl.stamp.version.generate" | 
|---|
| 408 | depends="abcl.compile.java" | 
|---|
| 409 | unless="abcl.stamp.version.uptodate.p"> | 
|---|
| 410 | <java fork="true" | 
|---|
| 411 | classpath="${build.classes.dir}" | 
|---|
| 412 | outputproperty="abcl.version" | 
|---|
| 413 | classname="org.armedbear.lisp.Version" | 
|---|
| 414 | logerror="yes"/> <!-- Don't catch stderr output --> | 
|---|
| 415 | </target> | 
|---|
| 416 |  | 
|---|
| 417 | <target name="abcl.stamp.version.0" | 
|---|
| 418 | depends="abcl.stamp.version.uptodate,abcl.stamp.version.generate"> | 
|---|
| 419 | </target> | 
|---|
| 420 |  | 
|---|
| 421 | <target name="abcl.stamp.version.1" | 
|---|
| 422 | depends="abcl.stamp.version.0" | 
|---|
| 423 | unless="abcl.version.svn.p"> | 
|---|
| 424 | <property name="abcl.implementation.version" | 
|---|
| 425 | value="${abcl.version}"/> | 
|---|
| 426 | </target> | 
|---|
| 427 |  | 
|---|
| 428 | <target name="abcl.stamp.version.2" | 
|---|
| 429 | depends="abcl.stamp.version.0" | 
|---|
| 430 | if="abcl.version.svn.p"> | 
|---|
| 431 | <property name="abcl.implementation.version" | 
|---|
| 432 | value="${abcl.version}-${abcl.version.src}"/> | 
|---|
| 433 | </target> | 
|---|
| 434 |  | 
|---|
| 435 | <target name="abcl.stamp.hostname" if="unix"> | 
|---|
| 436 | <exec executable="hostname" outputproperty="abcl.hostname"/> | 
|---|
| 437 | <echo>abcl.hostname: ${abcl.hostname}</echo> | 
|---|
| 438 | </target> | 
|---|
| 439 |  | 
|---|
| 440 | <target name="abcl.system.uptodate"> | 
|---|
| 441 | <condition property="abcl.system.needs-update.p"> | 
|---|
| 442 | <and> | 
|---|
| 443 | <available file="${system.lisp.file}"/> | 
|---|
| 444 | <available file="${abcl.startup.file}"/> | 
|---|
| 445 | <uptodate | 
|---|
| 446 | srcfile="${system.lisp.file}" | 
|---|
| 447 | targetfile="${abcl.startup.file}"/> | 
|---|
| 448 | </and> | 
|---|
| 449 | </condition> | 
|---|
| 450 | </target> | 
|---|
| 451 |  | 
|---|
| 452 | <target name="abcl.system.update.maybe" depends="abcl.system.uptodate" | 
|---|
| 453 | if="abcl.system.needs-update.p"> | 
|---|
| 454 | <touch file="${src.dir}/org/armedbear/lisp/compile-system.lisp"/> | 
|---|
| 455 | </target> | 
|---|
| 456 |  | 
|---|
| 457 | <target name="abcl.jar.uptodate" depends="abcl.compile,abcl.stamp"> | 
|---|
| 458 | <uptodate property="abcl.jar.uptodate.p" targetfile="${abcl.jar.path}"> | 
|---|
| 459 | <srcfiles dir="${build.classes.dir}"> | 
|---|
| 460 | <patternset refid="abcl.objects"/> | 
|---|
| 461 | </srcfiles> | 
|---|
| 462 | </uptodate> | 
|---|
| 463 | </target> | 
|---|
| 464 |  | 
|---|
| 465 | <target name="abcl.jar" depends="abcl.jar.uptodate,abcl-contrib.jar" | 
|---|
| 466 | unless="abcl.jar.uptodate.p"> | 
|---|
| 467 | <mkdir dir="${dist.dir}"/> | 
|---|
| 468 | <jar destfile="${abcl.jar.path}" | 
|---|
| 469 | compress="true" | 
|---|
| 470 | update="true" | 
|---|
| 471 | basedir="${build.classes.dir}"> | 
|---|
| 472 | <patternset refid="abcl.objects"/> | 
|---|
| 473 | <manifest> | 
|---|
| 474 | <attribute name="Main-Class" value="org.armedbear.lisp.Main"/> | 
|---|
| 475 | <section name="org/armedbear/lisp"> | 
|---|
| 476 | <attribute name="Implementation-Title" | 
|---|
| 477 | value="ABCL"/> | 
|---|
| 478 | <attribute name="Implementation-Version" | 
|---|
| 479 | value="${abcl.implementation.version}"/> | 
|---|
| 480 | <attribute name="Implementation-Build" | 
|---|
| 481 | value="${build}"/> | 
|---|
| 482 | </section> | 
|---|
| 483 | </manifest> | 
|---|
| 484 | <metainf dir="${src.dir}/META-INF"> | 
|---|
| 485 | <exclude name="services/javax.script.ScriptEngineFactory" | 
|---|
| 486 | unless="abcl.jsr-223.p"/> | 
|---|
| 487 | </metainf> | 
|---|
| 488 | </jar> | 
|---|
| 489 | </target> | 
|---|
| 490 |  | 
|---|
| 491 | <target name="abcl.wrapper" | 
|---|
| 492 | depends="abcl.jar,abcl.contrib,abcl.wrapper.unix,abcl.wrapper.windows"> | 
|---|
| 493 | <description> | 
|---|
| 494 | Creates in-place executable shell wrapper in '${abcl.wrapper.file}' | 
|---|
| 495 | </description> | 
|---|
| 496 | <!-- Set from commandline or in 'build.properties' --> | 
|---|
| 497 | <property name="additional.jars" value=""/> | 
|---|
| 498 | <path id="abcl.runtime.classpath"> | 
|---|
| 499 | <pathelement location="${abcl.runtime.jar.path}"/> | 
|---|
| 500 | <pathelement path="${additional.jars}"/> | 
|---|
| 501 | </path> | 
|---|
| 502 | <!-- set via '-Djava.options=JAVA_OPTIONS' or in 'build.properties --> | 
|---|
| 503 | <property name="java.options" value=""/> | 
|---|
| 504 |  | 
|---|
| 505 | <copy file="${abcl.wrapper.in.file}" toFile="${abcl.wrapper.file}" overwrite="yes"> | 
|---|
| 506 | <filterset> | 
|---|
| 507 | <filter token="JAVA" | 
|---|
| 508 | value="${java.path}"/> | 
|---|
| 509 | <filter token="ABCL_JAVA_OPTIONS" | 
|---|
| 510 | value="${java.options}"/> | 
|---|
| 511 | <filter token="ABCL_CLASSPATH" | 
|---|
| 512 | value="${toString:abcl.runtime.classpath}"/> | 
|---|
| 513 | </filterset> | 
|---|
| 514 | </copy> | 
|---|
| 515 | <chmod file="${abcl.wrapper.file}" perm="a+x"/> | 
|---|
| 516 |  | 
|---|
| 517 | <echo>Created executable ABCL wrapper in '${abcl.wrapper.file}'</echo> | 
|---|
| 518 | <echo>N.B. This wrapper requires '${abcl.jar.path}' not be moved.</echo> | 
|---|
| 519 | </target> | 
|---|
| 520 |  | 
|---|
| 521 | <target name="abcl.wrapper.unix" if="unix"> | 
|---|
| 522 | <property name="abcl.wrapper.file" value="abcl"/> | 
|---|
| 523 | <property name="abcl.wrapper.in.file" value="abcl.in"/> | 
|---|
| 524 | </target> | 
|---|
| 525 |  | 
|---|
| 526 | <target name="abcl.wrapper.windows" if="windows"> | 
|---|
| 527 | <property name="abcl.wrapper.file" value="abcl.bat"/> | 
|---|
| 528 | <property name="abcl.wrapper.in.file" value="abcl.bat.in"/> | 
|---|
| 529 | </target> | 
|---|
| 530 |  | 
|---|
| 531 | <patternset id="abcl.contrib.source"> | 
|---|
| 532 | <include name="**/*.asd"/> | 
|---|
| 533 | <include name="**/*.lisp"/> | 
|---|
| 534 | <include name="**/README.markdown"/> | 
|---|
| 535 | </patternset> | 
|---|
| 536 |  | 
|---|
| 537 | <patternset id="abcl.contrib.docs"> | 
|---|
| 538 | <include name="**/README.markdown"/> | 
|---|
| 539 | </patternset> | 
|---|
| 540 |  | 
|---|
| 541 | <property name="abcl-contrib.jar" | 
|---|
| 542 | value="${dist.dir}/abcl-contrib.jar"/> | 
|---|
| 543 | <condition property="abcl.contrib.uptodate.p"> | 
|---|
| 544 | <uptodate targetfile="${abcl-contrib.jar}"> | 
|---|
| 545 | <srcfiles dir="contrib"> | 
|---|
| 546 | <patternset refid="abcl.contrib.source"/> | 
|---|
| 547 | </srcfiles> | 
|---|
| 548 | </uptodate> | 
|---|
| 549 | </condition> | 
|---|
| 550 |  | 
|---|
| 551 | <target name="abcl-contrib.jar" depends="abcl.contrib"/> | 
|---|
| 552 | <target name="abcl.contrib" unless="abcl.contrib.uptodate.p"> | 
|---|
| 553 | <jar destfile="${abcl-contrib.jar}" | 
|---|
| 554 | compress="true" | 
|---|
| 555 | basedir="contrib"> | 
|---|
| 556 | <patternset refid="abcl.contrib.source"/> | 
|---|
| 557 | </jar> | 
|---|
| 558 | <echo> | 
|---|
| 559 | Packaged contribs in ${abcl-contrib.jar}. To use contribs, ensure that | 
|---|
| 560 | this file is in the same directory as 'abcl.jar', and then | 
|---|
| 561 |  | 
|---|
| 562 | CL-USER> (require 'abcl-contrib) | 
|---|
| 563 |  | 
|---|
| 564 | will place all the contribs in the ASDF registry. | 
|---|
| 565 |  | 
|---|
| 566 | To load a contrib, something like | 
|---|
| 567 |  | 
|---|
| 568 | CL-USER> (require 'jss) | 
|---|
| 569 |  | 
|---|
| 570 | will compile (if necessary) and load JSS. | 
|---|
| 571 | </echo> | 
|---|
| 572 | </target> | 
|---|
| 573 |  | 
|---|
| 574 | <target name="abcl.contrib.javadoc.jar"> | 
|---|
| 575 | <mkdir dir="${dist.dir}"/> | 
|---|
| 576 | <jar destfile="${dist.dir}/abcl-contrib-javadoc.jar" basedir="contrib"> | 
|---|
| 577 | <patternset refid="abcl.contrib.docs" /> | 
|---|
| 578 | </jar> | 
|---|
| 579 | </target> | 
|---|
| 580 |  | 
|---|
| 581 | <target name="abcl.contrib.source.jar"> | 
|---|
| 582 | <mkdir dir="${dist.dir}"/> | 
|---|
| 583 | <jar destfile="${dist.dir}/abcl-contrib-sources.jar" basedir="contrib"> | 
|---|
| 584 | <patternset refid="abcl.contrib.source" /> | 
|---|
| 585 | </jar> | 
|---|
| 586 | </target> | 
|---|
| 587 |  | 
|---|
| 588 | <target name="abcl.debug.jpda" depends="abcl.jar"> | 
|---|
| 589 | <description>Invoke ABCL with JPDA listener on port 6789</description> | 
|---|
| 590 | <java fork="true" | 
|---|
| 591 | classpathref="abcl.classpath.dist" | 
|---|
| 592 | classname="org.armedbear.lisp.Main"> | 
|---|
| 593 | <jvmarg | 
|---|
| 594 | value="-agentlib:jdwp=transport=dt_socket,address=6789,server=y"/> | 
|---|
| 595 | </java> | 
|---|
| 596 | <echo>JPDA listening on localhost:6789</echo> | 
|---|
| 597 | </target> | 
|---|
| 598 |  | 
|---|
| 599 | <target name="abcl.build.debug.jpda" depends="abcl.compile.java"> | 
|---|
| 600 | <description>Invoke ABCL with JPDA listener on port 6789</description> | 
|---|
| 601 | <java fork="true" | 
|---|
| 602 | classpathref="abcl.classpath.build" | 
|---|
| 603 | classname="org.armedbear.lisp.Main"> | 
|---|
| 604 | <jvmarg | 
|---|
| 605 | value="-agentlib:jdwp=transport=dt_socket,address=6789,server=y"/> | 
|---|
| 606 | <jvmarg value="-Dabcl.home=${abcl.home.dir}${file.separator}"/> | 
|---|
| 607 | </java> | 
|---|
| 608 | <echo>JPDA listening on localhost:6789</echo> | 
|---|
| 609 | </target> | 
|---|
| 610 |  | 
|---|
| 611 | <target name="abcl.run" depends="abcl.jar"> | 
|---|
| 612 | <java fork="true" | 
|---|
| 613 | classpathref="abcl.classpath.dist" | 
|---|
| 614 | classname="org.armedbear.lisp.Main"> | 
|---|
| 615 | </java> | 
|---|
| 616 | </target> | 
|---|
| 617 |  | 
|---|
| 618 | <target name="abcl.clean"> | 
|---|
| 619 | <delete dir="${build.dir}"/> | 
|---|
| 620 | <delete file="${abcl.jar.path}"/> | 
|---|
| 621 | <delete file="abcl"/> | 
|---|
| 622 | <delete file="abcl.bat"/> | 
|---|
| 623 | </target> | 
|---|
| 624 |  | 
|---|
| 625 | <property name="slime.fasls" | 
|---|
| 626 | value="${user.home}/.slime/"/> | 
|---|
| 627 | <property name="quicklisp.common-lisp.fasls" | 
|---|
| 628 | value="${user.home}/.cache/common-lisp/"/> | 
|---|
| 629 | <target name="abcl.clean.application.fasls"> | 
|---|
| 630 | <echo>WARNING:  This target is removing local application inter-Lisp fasls, forcing recompilation. | 
|---|
| 631 | </echo> | 
|---|
| 632 | <echo>Deleting local SLIME fasls under ${slime.fasls}</echo> | 
|---|
| 633 | <delete dir="${slime.fasls}"/> | 
|---|
| 634 | <echo>Deleting local Quicklisp fasls under ${quicklisp.common-lisp.fasls}</echo> | 
|---|
| 635 | <delete dir="${quicklisp.common-lisp.fasls}"/> | 
|---|
| 636 | </target> | 
|---|
| 637 |  | 
|---|
| 638 | <target name="abcl.dist" depends="abcl.jar"> | 
|---|
| 639 | <copy file="${abcl.jar.path}" | 
|---|
| 640 | toFile="${dist.dir}/abcl-${abcl.version}.jar"/> | 
|---|
| 641 | </target> | 
|---|
| 642 |  | 
|---|
| 643 | <target name="abcl.distclean" depends="abcl.clean"> | 
|---|
| 644 | <delete dir="${dist.dir}"/> | 
|---|
| 645 | <delete file="abcl"/> | 
|---|
| 646 | <delete file="abcl.bat"/> | 
|---|
| 647 | </target> | 
|---|
| 648 |  | 
|---|
| 649 | <target name="TAGS"> | 
|---|
| 650 | <delete file="TAGS"/> | 
|---|
| 651 | <apply executable="etags" parallel="true" verbose="true" maxparallel="300"> | 
|---|
| 652 | <arg value="--append"/> | 
|---|
| 653 | <arg value="--regex=|[ \t]+//[ \t]+###[ \t]+\([^ \t]+\)|\1|"/> | 
|---|
| 654 | <arg value='--regex=|[ \t]*@DocString([ \n\r\t]*name=\"\([^\"]*\)|\1|m'/> | 
|---|
| 655 | <fileset dir="${src.dir}"> | 
|---|
| 656 | <patternset refid="abcl.source.java"/> | 
|---|
| 657 | <patternset refid="abcl.source.lisp"/> | 
|---|
| 658 | </fileset> | 
|---|
| 659 | </apply> | 
|---|
| 660 | </target> | 
|---|
| 661 |  | 
|---|
| 662 | <patternset id="abcl.dist.misc" | 
|---|
| 663 | description="Additional includes in the source distributions relative to basedir"> | 
|---|
| 664 | <include name="abcl.rdf"/> | 
|---|
| 665 | <include name="build.xml"/> | 
|---|
| 666 | <include name="abcl.properties.in"/> | 
|---|
| 667 | <include name="COPYING"/> | 
|---|
| 668 | <include name="README"/> | 
|---|
| 669 | <include name="CHANGES"/> | 
|---|
| 670 | <include name="abcl.in"/> | 
|---|
| 671 | <include name="abcl.bat.in"/> | 
|---|
| 672 |  | 
|---|
| 673 | <include name="abcl.asd"/> | 
|---|
| 674 |  | 
|---|
| 675 | <include name="examples/**"/> | 
|---|
| 676 |  | 
|---|
| 677 | <include name="contrib/**"/> | 
|---|
| 678 |  | 
|---|
| 679 | <include name="test/**"/> | 
|---|
| 680 |  | 
|---|
| 681 | <include name="build-from-lisp.sh"/> | 
|---|
| 682 |  | 
|---|
| 683 | <!-- The remainder of these files are used by the Lisp hosted | 
|---|
| 684 | build in 'build-abcl.lisp' but not used by Ant, so include | 
|---|
| 685 | them in the source distribution. --> | 
|---|
| 686 | <include name="make-jar.in"/> | 
|---|
| 687 | <include name="make-jar.bat.in"/> | 
|---|
| 688 |  | 
|---|
| 689 | <include name="build-abcl.lisp"/> | 
|---|
| 690 | <include name="customizations.lisp.in"/> | 
|---|
| 691 |  | 
|---|
| 692 | </patternset> | 
|---|
| 693 |  | 
|---|
| 694 | <patternset | 
|---|
| 695 | id="abcl.source.misc" | 
|---|
| 696 | description="Additional includes in the source distribution relative to source root"> | 
|---|
| 697 | <include name="org/armedbear/lisp/LICENSE"/> | 
|---|
| 698 | <include name="manifest-abcl"/> | 
|---|
| 699 | <include name="META-INF/services/javax.script.ScriptEngineFactory"/> | 
|---|
| 700 | </patternset> | 
|---|
| 701 |  | 
|---|
| 702 | <target name="abcl.source.prepare" depends="abcl.stamp.version"> | 
|---|
| 703 | <property name="abcl.build.src.dir" | 
|---|
| 704 | value="${build.dir}/abcl-src-${abcl.version}"/> | 
|---|
| 705 | <mkdir dir="${abcl.build.src.dir}/src"/> | 
|---|
| 706 | <copy todir="${abcl.build.src.dir}/src" | 
|---|
| 707 | preservelastmodified="true"> | 
|---|
| 708 | <fileset dir="${src.dir}" | 
|---|
| 709 | id="abcl.source.src"> | 
|---|
| 710 | <patternset refid="abcl.source.java"/> | 
|---|
| 711 | <patternset refid="abcl.source.lisp"/> | 
|---|
| 712 | <patternset refid="abcl.source.misc"/> | 
|---|
| 713 | </fileset> | 
|---|
| 714 | </copy> | 
|---|
| 715 | <copy todir="${abcl.build.src.dir}" | 
|---|
| 716 | preservelastmodified="true"> | 
|---|
| 717 | <fileset dir="${basedir}"> | 
|---|
| 718 | <patternset refid="abcl.dist.misc"/> | 
|---|
| 719 | </fileset> | 
|---|
| 720 | </copy> | 
|---|
| 721 | </target> | 
|---|
| 722 |  | 
|---|
| 723 | <!--  Files in source distribution that always get LF EOL (aka | 
|---|
| 724 | 'unix') --> | 
|---|
| 725 | <patternset id="abcl.dist.lf"> | 
|---|
| 726 | <include name="abcl.in"/> | 
|---|
| 727 | </patternset> | 
|---|
| 728 |  | 
|---|
| 729 | <!--  Files in source distribution that always get CRLF EOL (aka | 
|---|
| 730 | 'dos') --> | 
|---|
| 731 | <patternset id="abcl.dist.crlf"> | 
|---|
| 732 | <include name="abcl.bat.in"/> | 
|---|
| 733 | </patternset> | 
|---|
| 734 |  | 
|---|
| 735 | <target name="abcl.source.unix" depends="abcl.source.prepare"> | 
|---|
| 736 | <fixcrlf srcdir="${abcl.build.src.dir}" | 
|---|
| 737 | preservelastmodified="true" | 
|---|
| 738 | eol="lf"> | 
|---|
| 739 | </fixcrlf> | 
|---|
| 740 |  | 
|---|
| 741 | <fixcrlf srcdir="${abcl.build.src.dir}" | 
|---|
| 742 | preservelastmodified="true" | 
|---|
| 743 | eol="crlf"> | 
|---|
| 744 | <patternset refid="abcl.dist.crlf"/> | 
|---|
| 745 | </fixcrlf> | 
|---|
| 746 |  | 
|---|
| 747 | <fixcrlf srcdir="${abcl.build.src.dir}" | 
|---|
| 748 | preservelastmodified="true" | 
|---|
| 749 | eol="lf"> | 
|---|
| 750 | <patternset refid="abcl.dist.lf"/> | 
|---|
| 751 | </fixcrlf> | 
|---|
| 752 | </target> | 
|---|
| 753 |  | 
|---|
| 754 | <target name="abcl.source.tar" depends="abcl.source.unix"> | 
|---|
| 755 | <mkdir dir="${dist.dir}"/> | 
|---|
| 756 | <tar destfile="${dist.dir}/abcl-src-${abcl.version}.tar.gz" | 
|---|
| 757 | compression="gzip"> | 
|---|
| 758 | <tarfileset dir="${build.dir}"> | 
|---|
| 759 | <include name="abcl-src-${abcl.version}/**"/> | 
|---|
| 760 | </tarfileset> | 
|---|
| 761 | </tar> | 
|---|
| 762 | </target> | 
|---|
| 763 |  | 
|---|
| 764 | <target name="abcl.source.windows" depends="abcl.source.prepare"> | 
|---|
| 765 | <fixcrlf srcdir="${abcl.build.src.dir}" | 
|---|
| 766 | preservelastmodified="true" | 
|---|
| 767 | eol="crlf"> | 
|---|
| 768 | </fixcrlf> | 
|---|
| 769 |  | 
|---|
| 770 | <fixcrlf srcdir="${abcl.build.src.dir}" | 
|---|
| 771 | preservelastmodified="true" | 
|---|
| 772 | eol="crlf"> | 
|---|
| 773 | <patternset refid="abcl.dist.crlf"/> | 
|---|
| 774 | </fixcrlf> | 
|---|
| 775 |  | 
|---|
| 776 | <fixcrlf srcdir="${abcl.build.src.dir}" | 
|---|
| 777 | preservelastmodified="true" | 
|---|
| 778 | eol="lf"> | 
|---|
| 779 | <patternset refid="abcl.dist.lf"/> | 
|---|
| 780 | </fixcrlf> | 
|---|
| 781 | </target> | 
|---|
| 782 |  | 
|---|
| 783 | <target name="abcl.source.zip" depends="abcl.source.windows"> | 
|---|
| 784 | <mkdir dir="${dist.dir}"/> | 
|---|
| 785 | <zip destfile="${dist.dir}/abcl-src-${abcl.version}.zip" | 
|---|
| 786 | compress="true"> | 
|---|
| 787 | <zipfileset dir="${abcl.build.src.dir}" prefix="abcl-src-${abcl.version}"/> | 
|---|
| 788 | </zip> | 
|---|
| 789 | </target> | 
|---|
| 790 |  | 
|---|
| 791 | <target name="abcl.source.jar" depends="abcl.source.unix"> | 
|---|
| 792 | <mkdir dir="${dist.dir}"/> | 
|---|
| 793 | <jar destfile="${dist.dir}/abcl-${abcl.version}-sources.jar"> | 
|---|
| 794 | <metainf dir="${abcl.build.src.dir}"> | 
|---|
| 795 | <include name="COPYING"/> | 
|---|
| 796 | </metainf> | 
|---|
| 797 | <fileset dir="${abcl.build.src.dir}/src"> | 
|---|
| 798 | <include name="**/*.java"/> | 
|---|
| 799 | <include name="**/*.lisp"/> | 
|---|
| 800 | </fileset> | 
|---|
| 801 | </jar> | 
|---|
| 802 | </target> | 
|---|
| 803 |  | 
|---|
| 804 | <property name="abcl.javadoc.dir" value="${build.dir}/javadoc"/> | 
|---|
| 805 |  | 
|---|
| 806 | <target name="abcl.javadoc"> | 
|---|
| 807 | <mkdir dir="${abcl.javadoc.dir}"/> | 
|---|
| 808 | <javadoc destdir="${abcl.javadoc.dir}" | 
|---|
| 809 | sourcepath="${src.dir}"/> | 
|---|
| 810 | </target> | 
|---|
| 811 |  | 
|---|
| 812 | <target name="abcl.javadoc.jar" depends="abcl.stamp.version,abcl.javadoc"> | 
|---|
| 813 | <mkdir dir="${dist.dir}"/> | 
|---|
| 814 | <jar destfile="${dist.dir}/abcl-${abcl.version}-javadoc.jar"> | 
|---|
| 815 | <fileset dir="${abcl.javadoc.dir}"/> | 
|---|
| 816 | </jar> | 
|---|
| 817 | </target> | 
|---|
| 818 |  | 
|---|
| 819 | <target name="abcl.binary.prepare" depends="abcl.jar,abcl.contrib,abcl.stamp.version"> | 
|---|
| 820 | <property name="abcl.build.binary.dir" | 
|---|
| 821 | value="${build.dir}/abcl-bin-${abcl.version}"/> | 
|---|
| 822 | <mkdir dir="${abcl.build.binary.dir}"/> | 
|---|
| 823 | <copy todir="${abcl.build.binary.dir}" | 
|---|
| 824 | preservelastmodified="true"> | 
|---|
| 825 | <fileset dir="${basedir}/dist"> | 
|---|
| 826 | <patternset> | 
|---|
| 827 | <include name="abcl.jar"/> | 
|---|
| 828 | <include name="abcl-contrib.jar"/> | 
|---|
| 829 | </patternset> | 
|---|
| 830 | </fileset> | 
|---|
| 831 | <fileset dir="${basedir}"> | 
|---|
| 832 | <patternset> | 
|---|
| 833 | <include name="README"/> | 
|---|
| 834 | <include name="CHANGES"/> | 
|---|
| 835 | </patternset> | 
|---|
| 836 | </fileset> | 
|---|
| 837 | </copy> | 
|---|
| 838 | </target> | 
|---|
| 839 |  | 
|---|
| 840 | <target name="abcl.binary.tar" depends="abcl.binary.prepare"> | 
|---|
| 841 | <tar destfile="${dist.dir}/abcl-bin-${abcl.version}.tar.gz" | 
|---|
| 842 | compression="gzip"> | 
|---|
| 843 | <tarfileset dir="${build.dir}"> | 
|---|
| 844 | <include name="abcl-bin-${abcl.version}/**"/> | 
|---|
| 845 | </tarfileset> | 
|---|
| 846 | </tar> | 
|---|
| 847 | </target> | 
|---|
| 848 |  | 
|---|
| 849 | <target name="abcl.binary.zip" depends="abcl.binary.prepare"> | 
|---|
| 850 | <zip destfile="${dist.dir}/abcl-bin-${abcl.version}.zip" | 
|---|
| 851 | compress="true"> | 
|---|
| 852 | <zipfileset dir="${abcl.build.binary.dir}" prefix="abcl-bin-${abcl.version}"/> | 
|---|
| 853 | </zip> | 
|---|
| 854 | </target> | 
|---|
| 855 |  | 
|---|
| 856 | <target name="help.test"> | 
|---|
| 857 | <echo> | 
|---|
| 858 | The following Ant targets run various test suites: | 
|---|
| 859 |  | 
|---|
| 860 | abcl.test | 
|---|
| 861 | --  Run all available tests. | 
|---|
| 862 | abcl.test.java | 
|---|
| 863 | --  Run the ABCL junit Java tests under ${basedir}/test/src/ | 
|---|
| 864 | abcl.test.lisp | 
|---|
| 865 | --  Run the 'test.ansi.compiled', 'test.abcl', 'test.cl-bench' targets | 
|---|
| 866 | test.ansi.compiled | 
|---|
| 867 | --  Run the compiled version of the ANSI test suite | 
|---|
| 868 | test.abcl | 
|---|
| 869 | --  Run the Lisp RT tests collected in ${basedir}/test/lisp/abcl/ | 
|---|
| 870 | test.cl-bench | 
|---|
| 871 | --  Run the cl-bench test suite. | 
|---|
| 872 |  | 
|---|
| 873 | The ANSI tests require that the [ansi-tests][1] be manually installed in | 
|---|
| 874 | ${basedir}/../ansi-tests. | 
|---|
| 875 |  | 
|---|
| 876 | [1]: svn://common-lisp.net/project/ansi-test/svn/trunk/ansi-tests | 
|---|
| 877 |  | 
|---|
| 878 | The CL-BENCH tests require that [cl-bench][2] be manually installed in | 
|---|
| 879 | ${basedir}/../cl-bench | 
|---|
| 880 |  | 
|---|
| 881 | [2]: http://www.chez.com/emarsden/downloads/cl-bench.tar.gz | 
|---|
| 882 | </echo> | 
|---|
| 883 | </target> | 
|---|
| 884 |  | 
|---|
| 885 | <property name="abcl.test.classes.dir" | 
|---|
| 886 | value="${build.dir}/classes-test"/> | 
|---|
| 887 |  | 
|---|
| 888 | <property name="abcl.test.src.dir" | 
|---|
| 889 | value="${basedir}/test/src"/> | 
|---|
| 890 |  | 
|---|
| 891 | <patternset id="abcl.test.source.java"> | 
|---|
| 892 | <include name="org/armedbear/lisp/**/*.java"/> | 
|---|
| 893 | </patternset> | 
|---|
| 894 |  | 
|---|
| 895 | <property name="junit.path" | 
|---|
| 896 | value="${abcl.ext.dir}/junit-4.8.1.jar"/> | 
|---|
| 897 |  | 
|---|
| 898 |  | 
|---|
| 899 | <path id="abcl.test.compile.classpath"> | 
|---|
| 900 | <pathelement location="${junit.path}"/> | 
|---|
| 901 | <pathelement location="${build.classes.dir}"/> | 
|---|
| 902 | </path> | 
|---|
| 903 |  | 
|---|
| 904 | <target name="abcl.test.pre-compile" depends="abcl.ext"/> | 
|---|
| 905 |  | 
|---|
| 906 | <target name="abcl.ext.p"> | 
|---|
| 907 | <!--XXX generalize over enumeration of all contributions to | 
|---|
| 908 | abcl.ext if we get more of them.  --> | 
|---|
| 909 | <available file="${junit.path}" property="abcl.ext.p"/> | 
|---|
| 910 | </target> | 
|---|
| 911 | <target name="abcl.ext" depends="abcl.ext.p" unless="abcl.ext.p"> | 
|---|
| 912 |  | 
|---|
| 913 | <mkdir dir="${abcl.ext.dir}"/> | 
|---|
| 914 | <get | 
|---|
| 915 | src="http://cloud.github.com/downloads/KentBeck/junit/junit-4.8.1.jar" | 
|---|
| 916 | usetimestamp="true" | 
|---|
| 917 | dest="${junit.path}"/> | 
|---|
| 918 | </target> | 
|---|
| 919 |  | 
|---|
| 920 | <target name="abcl.test.compile" | 
|---|
| 921 | depends="abcl.test.pre-compile"> | 
|---|
| 922 | <mkdir dir="${abcl.test.classes.dir}"/> | 
|---|
| 923 | <javac destdir="${abcl.test.classes.dir}" | 
|---|
| 924 | classpathref="abcl.test.compile.classpath" | 
|---|
| 925 | debug="true" | 
|---|
| 926 | target="1.5"> | 
|---|
| 927 | <src path="${abcl.test.src.dir}"/> | 
|---|
| 928 | <patternset refid="abcl.test.source.java"/> | 
|---|
| 929 | </javac> | 
|---|
| 930 | </target> | 
|---|
| 931 |  | 
|---|
| 932 | <path id="abcl.test.run.classpath"> | 
|---|
| 933 | <path refid="abcl.test.compile.classpath"/> | 
|---|
| 934 | <pathelement location="${abcl.test.classes.dir}"/> | 
|---|
| 935 | </path> | 
|---|
| 936 |  | 
|---|
| 937 | <target name="abcl.test" | 
|---|
| 938 | depends="abcl.test.java,abcl.test.lisp"/> | 
|---|
| 939 |  | 
|---|
| 940 | <target name="abcl.test.java" depends="abcl.test.compile"> | 
|---|
| 941 | <java fork="true" | 
|---|
| 942 | classpathref="abcl.test.run.classpath" | 
|---|
| 943 | classname="org.junit.runner.JUnitCore"> | 
|---|
| 944 | <arg value="org.armedbear.lisp.PathnameTest"/> | 
|---|
| 945 | <arg value="org.armedbear.lisp.StreamTest"/> | 
|---|
| 946 | <arg value="org.armedbear.lisp.UtilitiesTest"/> | 
|---|
| 947 | <!-- currently hangs(!) the running process | 
|---|
| 948 | <arg value="org.armedbear.lisp.util.HttpHeadTest"/> | 
|---|
| 949 | --> | 
|---|
| 950 | </java> | 
|---|
| 951 | </target> | 
|---|
| 952 |  | 
|---|
| 953 | <target name="abcl.test.lisp" | 
|---|
| 954 | depends="test.ansi.compiled,test.abcl,test.cl-bench"/> | 
|---|
| 955 |  | 
|---|
| 956 | <target name="test.ansi.interpreted" depends="abcl.jar"> | 
|---|
| 957 | <echo>Recording test output in ${abcl.test.log.file}.</echo> | 
|---|
| 958 | <record name="${abcl.test.log.file}" emacsmode="true" action="start" append="yes"/> | 
|---|
| 959 | <java fork="true" dir="${basedir}" | 
|---|
| 960 | classpathref="abcl.classpath.dist" | 
|---|
| 961 | classname="org.armedbear.lisp.Main"> | 
|---|
| 962 | <arg value="--noinit"/> | 
|---|
| 963 | <arg value="--eval"/><arg value="(require (quote asdf))"/> | 
|---|
| 964 | <arg value="--eval"/> | 
|---|
| 965 | <arg value="(asdf:initialize-source-registry `(:source-registry (:directory ,*default-pathname-defaults*) :inherit-configuration)))"/> | 
|---|
| 966 | <arg value="--eval"/><arg value="(asdf:load-system :abcl)"/> | 
|---|
| 967 | <arg value="--eval"/><arg value="(asdf:test-system :ansi-interpreted)"/> | 
|---|
| 968 | <arg value="--eval"/><arg value="(ext:exit)"/> | 
|---|
| 969 | </java> | 
|---|
| 970 | <record name="${abcl.test.log.file}" emacsmode="true" action="stop"/> | 
|---|
| 971 | <echo>Finished recording test output in ${abcl.test.log.file}.</echo> | 
|---|
| 972 | </target> | 
|---|
| 973 |  | 
|---|
| 974 | <target name="test.ansi.compiled" depends="abcl.jar"> | 
|---|
| 975 | <echo>Recording test output in ${abcl.test.log.file}.</echo> | 
|---|
| 976 | <record name="${abcl.test.log.file}" emacsmode="true" action="start" append="yes"/> | 
|---|
| 977 | <java fork="true" dir="${basedir}" | 
|---|
| 978 | classpathref="abcl.classpath.dist" | 
|---|
| 979 | classname="org.armedbear.lisp.Main"> | 
|---|
| 980 | <!-- Run in 64bit mode--> | 
|---|
| 981 | <jvmarg value="-d64"/> | 
|---|
| 982 |  | 
|---|
| 983 | <!-- Enable JVM assertions --> | 
|---|
| 984 | <jvmarg value="-ea"/> | 
|---|
| 985 |  | 
|---|
| 986 | <!-- (Possibly) unload classes when reference count reaches zero --> | 
|---|
| 987 | <jvmarg value="-XX:+CMSClassUnloadingEnabled"/> | 
|---|
| 988 |  | 
|---|
| 989 | <!-- Increase the size of the space used to store JVM class metadata. --> | 
|---|
| 990 | <jvmarg value="-XX:MaxPermSize=768m"/> | 
|---|
| 991 |  | 
|---|
| 992 | <arg value="--noinit"/> | 
|---|
| 993 | <arg value="--eval"/><arg value="(require (quote asdf))"/> | 
|---|
| 994 | <arg value="--eval"/> | 
|---|
| 995 | <arg value="(asdf:initialize-source-registry `(:source-registry (:directory ,*default-pathname-defaults*) :inherit-configuration)))"/> | 
|---|
| 996 | <arg value="--eval"/><arg value="(asdf:load-system :abcl)"/> | 
|---|
| 997 | <arg value="--eval"/><arg value="(asdf:test-system :ansi-compiled)"/> | 
|---|
| 998 | <arg value="--eval"/><arg value="(ext:exit)"/> | 
|---|
| 999 | </java> | 
|---|
| 1000 | <record name="${abcl.test.log.file}" emacsmode="true" action="stop"/> | 
|---|
| 1001 | <echo>Finished recording test output in ${abcl.test.log.file}.</echo> | 
|---|
| 1002 | </target> | 
|---|
| 1003 |  | 
|---|
| 1004 | <target name="test.abcl" depends="abcl.jar"> | 
|---|
| 1005 | <echo>Recording test output in ${abcl.test.log.file}.</echo> | 
|---|
| 1006 | <record name="${abcl.test.log.file}" emacsmode="true" action="start" append="yes"/> | 
|---|
| 1007 | <java fork="true" dir="${basedir}" | 
|---|
| 1008 | classpathref="abcl.classpath.dist" | 
|---|
| 1009 | classname="org.armedbear.lisp.Main"> | 
|---|
| 1010 | <arg value="--noinit"/> | 
|---|
| 1011 | <arg value="--eval"/><arg value="(require (quote asdf))"/> | 
|---|
| 1012 | <arg value="--eval"/> | 
|---|
| 1013 | <arg value="(asdf:initialize-source-registry `(:source-registry (:directory ,*default-pathname-defaults*) :inherit-configuration)))"/> | 
|---|
| 1014 | <arg value="--eval"/><arg value="(asdf:load-system :abcl)"/> | 
|---|
| 1015 | <arg value="--eval"/><arg value="(asdf:test-system :abcl-test-lisp)"/> | 
|---|
| 1016 | <arg value="--eval"/><arg value="(ext:exit)"/> | 
|---|
| 1017 | </java> | 
|---|
| 1018 | <record name="${abcl.test.log.file}" emacsmode="true" action="stop"/> | 
|---|
| 1019 | <echo>Finished recording test output in ${abcl.test.log.file}.</echo> | 
|---|
| 1020 | </target> | 
|---|
| 1021 |  | 
|---|
| 1022 | <target name="test.cl-bench" depends="abcl.jar"> | 
|---|
| 1023 | <echo>Recording test output in ${abcl.test.log.file}.</echo> | 
|---|
| 1024 | <record name="${abcl.test.log.file}" emacsmode="true" action="start" append="yes"/> | 
|---|
| 1025 | <java fork="true" dir="${basedir}" | 
|---|
| 1026 | classpathref="abcl.classpath.dist" | 
|---|
| 1027 | classname="org.armedbear.lisp.Main"> | 
|---|
| 1028 | <arg value="--noinit"/> | 
|---|
| 1029 | <arg value="--eval"/><arg value="(require (quote asdf))"/> | 
|---|
| 1030 | <arg value="--eval"/> | 
|---|
| 1031 | <arg value="(asdf:initialize-source-registry `(:source-registry (:directory ,*default-pathname-defaults*) :inherit-configuration)))"/> | 
|---|
| 1032 | <arg value="--eval"/><arg value="(asdf:load-system :abcl)"/> | 
|---|
| 1033 | <arg value="--eval"/><arg value="(asdf:test-system :cl-bench)"/> | 
|---|
| 1034 | <arg value="--eval"/><arg value="(ext:exit)"/> | 
|---|
| 1035 | </java> | 
|---|
| 1036 | <record name="${abcl.test.log.file}" emacsmode="true" action="stop"/> | 
|---|
| 1037 | <echo>Finished recording test output in ${abcl.test.log.file}.</echo> | 
|---|
| 1038 | </target> | 
|---|
| 1039 |  | 
|---|
| 1040 |  | 
|---|
| 1041 | <target name="abcl.diagnostic" | 
|---|
| 1042 | description="Emit diagnostics describing available hosting JVM properties." | 
|---|
| 1043 | depends="abcl.build.diagnostic"/> | 
|---|
| 1044 | <!-- | 
|---|
| 1045 |  | 
|---|
| 1046 | urn:org.abcl.build.ant.targets.diagnostic | 
|---|
| 1047 |  | 
|---|
| 1048 | "Possible JVM values from" | 
|---|
| 1049 |  | 
|---|
| 1050 | http://docs.oracle.com/javase/6/docs/api/java/lang/System.html#getProperties | 
|---|
| 1051 |  | 
|---|
| 1052 | . | 
|---|
| 1053 |  | 
|---|
| 1054 |  | 
|---|
| 1055 | java.version  Java Runtime Environment version | 
|---|
| 1056 | java.vendor   Java Runtime Environment vendor | 
|---|
| 1057 | java.vendor.url   Java vendor URL | 
|---|
| 1058 | java.home   Java installation directory | 
|---|
| 1059 | java.vm.specification.version   Java Virtual Machine specification version | 
|---|
| 1060 | java.vm.specification.vendor  Java Virtual Machine specification vendor | 
|---|
| 1061 | java.vm.specification.name  Java Virtual Machine specification name | 
|---|
| 1062 | java.vm.version   Java Virtual Machine implementation version | 
|---|
| 1063 | java.vm.vendor  Java Virtual Machine implementation vendor | 
|---|
| 1064 | java.vm.name  Java Virtual Machine implementation name | 
|---|
| 1065 | java.specification.version  Java Runtime Environment specification version | 
|---|
| 1066 | java.specification.vendor   Java Runtime Environment specification vendor | 
|---|
| 1067 | java.specification.name   Java Runtime Environment specification name | 
|---|
| 1068 | java.class.version  Java class format version number | 
|---|
| 1069 | java.class.path   Java class path | 
|---|
| 1070 | java.library.path   List of paths to search when loading libraries | 
|---|
| 1071 | java.io.tmpdir  Default temp file path | 
|---|
| 1072 | java.compiler   Name of JIT compiler to use | 
|---|
| 1073 | java.ext.dirs   Path of extension directory or directories | 
|---|
| 1074 | os.name   Operating system name | 
|---|
| 1075 | os.arch   Operating system architecture | 
|---|
| 1076 | os.version  Operating system version | 
|---|
| 1077 | file.separator  File separator ("/" on UNIX) | 
|---|
| 1078 | path.separator  Path separator (":" on UNIX) | 
|---|
| 1079 | line.separator  Line separator ("\n" on UNIX) | 
|---|
| 1080 | user.name   User's account name | 
|---|
| 1081 | user.home   User's home directory | 
|---|
| 1082 | user.dir | 
|---|
| 1083 |  | 
|---|
| 1084 | --> | 
|---|
| 1085 |  | 
|---|
| 1086 | <target name="abcl.build.diagnostic" description="Emit diagnostics describing available hosting JVM properties."> | 
|---|
| 1087 | <echo>:java.version    ${java.version}</echo> | 
|---|
| 1088 | <echo>:java.vendor     ${java.vendor}</echo> | 
|---|
| 1089 | <echo>:java.vm.vendor  ${java.vm.vendor}</echo> | 
|---|
| 1090 | <echo>:java.vm.name    ${java.vm.name}</echo> | 
|---|
| 1091 |  | 
|---|
| 1092 | <echo>:os.name    ${os.name}</echo> | 
|---|
| 1093 | <echo>:os.arch    ${os.arch}</echo> | 
|---|
| 1094 | <echo>:os.version ${os.version}</echo> | 
|---|
| 1095 |  | 
|---|
| 1096 | <echo>:java.specification.version       ${java.specification.version}</echo> | 
|---|
| 1097 | <echo>:java.vm.specification.version    ${java.vm.specification.version}</echo> | 
|---|
| 1098 | </target> | 
|---|
| 1099 |  | 
|---|
| 1100 | <target name="abcl.release" | 
|---|
| 1101 | depends="abcl.clean,abcl.binary.tar,abcl.source.tar,abcl.binary.zip,abcl.source.zip"> | 
|---|
| 1102 | <copy file="${abcl.jar.path}" | 
|---|
| 1103 | tofile="${dist.dir}/abcl-${abcl.version}.jar"/> | 
|---|
| 1104 | <copy file="${abcl-contrib.jar}" | 
|---|
| 1105 | tofile="${dist.dir}/abcl-contrib-${abcl.version}.jar"/> | 
|---|
| 1106 | </target> | 
|---|
| 1107 |  | 
|---|
| 1108 | <import file="netbeans-build.xml" optional="true"/> | 
|---|
| 1109 | <!--    <import file="j-build.xml" optional="true"/>  --> | 
|---|
| 1110 | <import file="not.org-build.xml" optional="true"/> | 
|---|
| 1111 |  | 
|---|
| 1112 | <import file="build-snapshot.xml" optional="true"/> | 
|---|
| 1113 |  | 
|---|
| 1114 | <import file="build-maven.xml" optional="true"/> | 
|---|
| 1115 | </project> | 
|---|
| 1116 |  | 
|---|
| 1117 |  | 
|---|
| 1118 |  | 
|---|
| 1119 |  | 
|---|