Changeset 13292
- Timestamp:
- 05/24/11 12:25:23 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/build.xml
r13279 r13292 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 2 <project xmlns="antlib:org.apache.tools.ant" 3 3 name="abcl-master" default="abcl.wrapper" basedir="."> 4 4 <description>Compiling, testing, and packaging Armed Bear Common Lisp</description> 5 5 6 6 <target name="abcl" depends="abcl.wrapper"/> 7 7 8 8 <target name="help"> 9 9 <echo> … … 32 32 33 33 <property name="build.dir" 34 34 value="${basedir}/build"/> 35 35 <property name="build.classes.dir" 36 36 value="${build.dir}/classes"/> 37 37 <property name="src.dir" 38 38 value="${basedir}/src"/> 39 39 <property name="dist.dir" 40 40 value="${basedir}/dist"/> 41 41 <property name="abcl.jar.path" 42 42 value="${dist.dir}/abcl.jar"/> 43 43 <property name="abcl.ext.dir" 44 44 value="${basedir}/ext"/> 45 45 46 46 <fail message="Please build using Ant 1.7.1 or higher."> … … 54 54 <!-- Checks if JSR-223 support is available - thanks to Mark Evenson --> 55 55 <available property="abcl.jsr-223.p" 56 56 classname="javax.script.ScriptEngine"/> 57 57 58 58 <patternset id="abcl.source.java"> … … 113 113 <target name="abcl.init"> 114 114 <tstamp> 115 115 <format property="build" pattern="EEE MMM dd yyyy HH:mm:ss zzz"/> 116 116 </tstamp> 117 117 118 118 <tstamp> 119 119 <format property="build.stamp" pattern="yyyymmdd-HHmm"/> 120 120 </tstamp> 121 121 122 122 <property name="abcl.test.log.file" 123 123 value="abcl-test-${build.stamp}.log"/> 124 124 125 125 <property name="java.path" 126 126 value="${java.home}/bin/java"/> 127 127 128 128 <!-- Deprecated. Two main types of build environents: 'unix' or 'windows'. --> 129 129 <condition property="unix"> 130 131 132 133 130 <or> 131 <os family="unix"/> 132 <os family="mac"/> 133 </or> 134 134 </condition> 135 135 <condition property="windows"> 136 136 <os family="windows"/> 137 137 </condition> 138 138 139 139 <!-- Deprecated. --> 140 140 <available file="${src.dir}org/armedbear/lisp/Interpreter.java" 141 141 property="abcl.lisp.p"/> 142 142 143 143 <echo>java.version: ${java.version}</echo> 144 144 <condition property="abcl.java.version.p"> 145 146 147 148 145 <or> 146 <matches string="${java.version}" pattern="1\.5"/> 147 <matches string="${java.version}" pattern="1\.6\.0_[12][0-9]"/> 148 </or> 149 149 </condition> 150 150 … … 152 152 153 153 <target name="abcl.java.warning" 154 155 154 depends="abcl.init" 155 unless="abcl.java.version.p"> 156 156 <echo>WARNING: Use of Java version ${java.version} not recommended.</echo> 157 157 </target> 158 158 159 159 <target name="abcl.jsr-223.notice" 160 161 160 depends="abcl.init" 161 unless="abcl.jsr-223.p"> 162 162 <echo> 163 164 165 163 Notice: JSR-223 support won't be built since it is not 164 supported, neither natively by your JVM nor by 165 libraries in the CLASSPATH. 166 166 </echo> 167 167 </target> 168 168 169 169 <target name="abcl.compile.java" 170 170 depends="abcl.init,abcl.java.warning,abcl.jsr-223.notice"> 171 171 <mkdir dir="${build.dir}"/> 172 172 <mkdir dir="${build.classes.dir}"/> 173 173 <javac destdir="${build.classes.dir}" 174 175 174 debug="true" 175 target="1.5" 176 176 includeantruntime="false" 177 178 179 177 failonerror="true"> 178 <src path="${src.dir}"/> 179 <patternset refid="abcl.source.java"/> 180 180 </javac> 181 181 <echo message="${build}" 182 182 file="${build.classes.dir}/org/armedbear/lisp/build"/> 183 183 </target> 184 184 185 185 <target name="abcl.copy.lisp"> 186 186 <copy todir="${build.classes.dir}" preservelastmodified="yes"> 187 187 <fileset dir="${src.dir}"> 188 188 <patternset refid="abcl.source.lisp.dist"/> 189 189 </fileset> 190 190 </copy> 191 191 </target> … … 207 207 <target name="abcl.fasls.uptodate"> 208 208 <uptodate property="abcl.fasls.uptodate.p" value="true"> 209 210 211 212 209 <srcfiles dir="${src.dir}"> 210 <patternset refid="abcl.source.lisp.fasls"/> 211 </srcfiles> 212 <mapper type="glob" from="*.lisp" to="${build.classes.dir}/*.abcl"/> 213 213 </uptodate> 214 214 </target> … … 216 216 <path id="abcl.home.dir.path"> 217 217 <path location="${src.dir}/org/armedbear/lisp/"/> 218 </path> 218 </path> 219 219 <pathconvert property="abcl.home.dir" refid="abcl.home.dir.path"/> 220 220 … … 227 227 228 228 <target name="abcl.compile.lisp" 229 230 229 depends="abcl.copy.lisp,abcl.compile.java,abcl.system.update.maybe,abcl.fasls.uptodate" 230 unless="abcl.fasls.uptodate.p"> 231 231 <echo> 232 232 Compiling Lisp system … … 239 239 </delete> 240 240 <java classpath="${build.classes.dir}" 241 242 241 fork="true" 242 failonerror="true" 243 243 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))))" 244 244 classname="org.armedbear.lisp.Main"> 245 245 <jvmarg value="-Dabcl.home=${abcl.home.dir}${file.separator}"/> 246 246 <arg value="--noinit"/> 247 247 <arg value="--nosystem"/> 248 248 <arg value="--eval"/> … … 255 255 256 256 <property name="abcl.build.path" 257 257 value="${build.classes.dir}/org/armedbear/lisp/build"/> 258 258 <target name="abcl.stamp" 259 259 depends="abcl.compile,abcl.stamp.version,abcl.stamp.hostname"> … … 325 325 value="${src.dir}/org/armedbear/lisp/"/> 326 326 <property name="abcl.version.path" 327 327 value="${build.classes.dir}/org/armedbear/lisp/version"/> 328 328 329 329 <target name="abcl.clean.version"> … … 349 349 unless="abcl.stamp.version.uptodate.p"> 350 350 <java fork="true" 351 352 353 351 classpath="${build.classes.dir}" 352 outputproperty="abcl.version" 353 classname="org.armedbear.lisp.Version" 354 354 logerror="yes"/> <!-- Don't catch stderr output --> 355 355 </target> … … 403 403 404 404 <target name="abcl.jar" depends="abcl.jar.uptodate" 405 405 unless="abcl.jar.uptodate.p"> 406 406 <mkdir dir="${dist.dir}"/> 407 407 <loadfile property="abcl.version" 408 408 srcFile="${abcl.version.path}"/> 409 409 <jar destfile="${abcl.jar.path}" 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 410 compress="true" 411 basedir="${build.classes.dir}"> 412 <patternset refid="abcl.objects"/> 413 <manifest> 414 <attribute name="Main-Class" value="org.armedbear.lisp.Main"/> 415 <section name="org/armedbear/lisp"> 416 <attribute name="Implementation-Title" 417 value="ABCL"/> 418 <attribute name="Implementation-Version" 419 value="${abcl.implementation.version}"/> 420 <attribute name="Implementation-Build" 421 value="${build}"/> 422 </section> 423 </manifest> 424 <metainf dir="${src.dir}/META-INF"> 425 <exclude name="services/javax.script.ScriptEngineFactory" 426 unless="abcl.jsr-223.p"/> 427 </metainf> 428 428 </jar> 429 429 </target> 430 430 431 431 <target name="abcl.wrapper" 432 432 depends="abcl.jar,abcl.wrapper.unix,abcl.wrapper.windows"> 433 433 <description> 434 434 Creates in-place exectuable shell wrapper in '${abcl.wrapper.file}' 435 435 </description> 436 436 <!-- Set from commandline or in 'build.properties' --> 437 437 <property name="additional.jars" value=""/> 438 438 <path id="abcl.runtime.classpath"> 439 440 439 <pathelement location="${abcl.jar.path}"/> 440 <pathelement path="${additional.jars}"/> 441 441 </path> 442 442 <!-- set via '-Djava.options=JAVA_OPTIONS' or in 'build.properties --> … … 444 444 445 445 <copy file="${abcl.wrapper.in.file}" toFile="${abcl.wrapper.file}" overwrite="yes"> 446 447 448 449 450 451 452 453 446 <filterset> 447 <filter token="JAVA" 448 value="${java.path}"/> 449 <filter token="ABCL_JAVA_OPTIONS" 450 value="${java.options}"/> 451 <filter token="ABCL_CLASSPATH" 452 value="${toString:abcl.runtime.classpath}"/> 453 </filterset> 454 454 </copy> 455 455 <chmod file="${abcl.wrapper.file}" perm="a+x"/> … … 472 472 <target name="abcl.contrib.compile" depends="abcl.jar"> 473 473 <java fork="true" 474 474 failonerror="true" 475 475 classpathref="abcl.classpath.dist" 476 476 inputstring="(require 'asdf) (handler-case (progn (setf *default-pathname-defaults* "${basedir}/contrib/asdf-install/") (asdf:operate 'asdf:compile-op :asdf-install)) (t (x) (progn (format t "~A: ~A~%" (type-of x) x) (exit :status -1))))" … … 509 509 <description>Invoke ABCL with JPDA listener on port 6789</description> 510 510 <java fork="true" 511 512 513 514 511 classpathref="abcl.classpath.dist" 512 classname="org.armedbear.lisp.Main"> 513 <jvmarg 514 value="-agentlib:jdwp=transport=dt_socket,address=6789,server=y"/> 515 515 </java> 516 516 <echo>JPDA listening on localhost:6789</echo> … … 520 520 <description>Invoke ABCL with JPDA listener on port 6789</description> 521 521 <java fork="true" 522 523 524 525 522 classpathref="abcl.classpath.build" 523 classname="org.armedbear.lisp.Main"> 524 <jvmarg 525 value="-agentlib:jdwp=transport=dt_socket,address=6789,server=y"/> 526 526 <jvmarg value="-Dabcl.home=${abcl.home.dir}${file.separator}"/> 527 527 </java> … … 531 531 <target name="abcl.run" depends="abcl.jar"> 532 532 <java fork="true" 533 534 533 classpathref="abcl.classpath.dist" 534 classname="org.armedbear.lisp.Main"> 535 535 </java> 536 536 </target> … … 545 545 <target name="abcl.dist" depends="abcl.jar"> 546 546 <copy file="${abcl.jar.path}" 547 547 toFile="${dist.dir}/abcl-${abcl.version}.jar"/> 548 548 </target> 549 549 … … 558 558 <apply executable="etags" parallel="true" verbose="true" maxparallel="300"> 559 559 <arg value="--append"/> 560 561 562 563 564 565 560 <arg value="--regex=|[ \t]+//[ \t]+###[ \t]+\([^ \t]+\)|\1|"/> 561 <arg value='--regex=|[ \t]*@DocString([ \t]*name=\"\([^\"]*\)|\1|'/> 562 <fileset dir="${src.dir}"> 563 <patternset refid="abcl.source.java"/> 564 <patternset refid="abcl.source.lisp"/> 565 </fileset> 566 566 </apply> 567 567 </target> 568 568 569 569 <patternset id="abcl.dist.misc" 570 570 description="Additional includes in the source distributions relative to basedir"> 571 571 <include name="build.xml"/> 572 572 <include name="abcl.properties.in"/> … … 606 606 <target name="abcl.source.prepare" depends="abcl.stamp.version"> 607 607 <property name="abcl.build.src.dir" 608 608 value="${build.dir}/abcl-src-${abcl.version}"/> 609 609 <mkdir dir="${abcl.build.src.dir}/src"/> 610 610 <copy todir="${abcl.build.src.dir}/src" … … 659 659 <mkdir dir="${dist.dir}"/> 660 660 <tar destfile="${dist.dir}/abcl-src-${abcl.version}.tar.gz" 661 662 663 664 661 compression="gzip"> 662 <tarfileset dir="${build.dir}"> 663 <include name="abcl-src-${abcl.version}/**"/> 664 </tarfileset> 665 665 </tar> 666 666 </target> … … 688 688 <mkdir dir="${dist.dir}"/> 689 689 <zip destfile="${dist.dir}/abcl-src-${abcl.version}.zip" 690 691 690 compress="true"> 691 <zipfileset dir="${abcl.build.src.dir}" prefix="abcl-src-${abcl.version}"/> 692 692 </zip> 693 693 </target> … … 787 787 788 788 <property name="abcl.test.classes.dir" 789 789 value="${build.dir}/classes-test"/> 790 790 791 791 <property name="abcl.test.src.dir" 792 792 value="${basedir}/test/src"/> 793 793 794 794 <patternset id="abcl.test.source.java"> … … 799 799 800 800 <property name="junit.path" 801 801 value="${abcl.ext.dir}/junit-4.8.1.jar"/> 802 802 803 803 … … 822 822 dest="${junit.path}"/> 823 823 </target> 824 824 825 825 <target name="abcl.test.compile" 826 826 depends="abcl.test.pre-compile"> 827 827 <mkdir dir="${abcl.test.classes.dir}"/> 828 828 <javac destdir="${abcl.test.classes.dir}" 829 830 831 832 833 829 classpathref="abcl.test.compile.classpath" 830 debug="true" 831 target="1.5"> 832 <src path="${abcl.test.src.dir}"/> 833 <patternset refid="abcl.test.source.java"/> 834 834 </javac> 835 835 </target> … … 841 841 842 842 <target name="abcl.test" 843 844 843 depends="abcl.test.java,abcl.test.lisp"/> 844 845 845 <target name="abcl.test.java" depends="abcl.test.compile"> 846 846 <java fork="true" 847 848 847 classpathref="abcl.test.run.classpath" 848 classname="org.junit.runner.JUnitCore"> 849 849 <arg value="org.armedbear.lisp.PathnameTest"/> 850 850 <arg value="org.armedbear.lisp.StreamTest"/> … … 854 854 855 855 <target name="abcl.test.lisp" 856 856 depends="test.ansi.compiled,test.abcl,test.cl-bench"/> 857 857 858 858 <target name="test.ansi.interpreted" depends="abcl.jar"> … … 860 860 <record name="${abcl.test.log.file}" emacsmode="true" action="start" append="yes"/> 861 861 <java fork="true" dir="${basedir}" 862 863 864 865 866 867 862 classpathref="abcl.classpath.dist" 863 classname="org.armedbear.lisp.Main"> 864 <arg value="--noinit"/> 865 <arg value="--eval"/><arg value="(require (quote asdf))"/> 866 <arg value="--eval"/><arg value="(asdf:operate (quote asdf:load-op) :abcl)"/> 867 <arg value="--eval"/><arg value="(asdf:operate (quote asdf:test-op) :ansi-interpreted)"/> 868 868 <arg value="--eval"/><arg value="(ext:exit)"/> 869 869 </java> … … 876 876 <record name="${abcl.test.log.file}" emacsmode="true" action="start" append="yes"/> 877 877 <java fork="true" dir="${basedir}" 878 879 880 881 882 883 878 classpathref="abcl.classpath.dist" 879 classname="org.armedbear.lisp.Main"> 880 <arg value="--noinit"/> 881 <arg value="--eval"/><arg value="(require (quote asdf))"/> 882 <arg value="--eval"/><arg value="(asdf:operate (quote asdf:load-op) :abcl)"/> 883 <arg value="--eval"/><arg value="(asdf:operate (quote asdf:test-op) :ansi-compiled)"/> 884 884 <arg value="--eval"/><arg value="(ext:exit)"/> 885 885 </java> … … 892 892 <record name="${abcl.test.log.file}" emacsmode="true" action="start" append="yes"/> 893 893 <java fork="true" dir="${basedir}" 894 895 896 897 898 899 894 classpathref="abcl.classpath.dist" 895 classname="org.armedbear.lisp.Main"> 896 <arg value="--noinit"/> 897 <arg value="--eval"/><arg value="(require (quote asdf))"/> 898 <arg value="--eval"/><arg value="(asdf:operate (quote asdf:load-op) :abcl)"/> 899 <arg value="--eval"/><arg value="(asdf:operate (quote asdf:test-op) :abcl-test-lisp)"/> 900 900 <arg value="--eval"/><arg value="(ext:exit)"/> 901 901 </java> … … 908 908 <record name="${abcl.test.log.file}" emacsmode="true" action="start" append="yes"/> 909 909 <java fork="true" dir="${basedir}" 910 911 912 913 914 915 910 classpathref="abcl.classpath.dist" 911 classname="org.armedbear.lisp.Main"> 912 <arg value="--noinit"/> 913 <arg value="--eval"/><arg value="(require (quote asdf))"/> 914 <arg value="--eval"/><arg value="(asdf:operate (quote asdf:load-op) :abcl)"/> 915 <arg value="--eval"/><arg value="(asdf:operate (quote asdf:test-op) :cl-bench)"/> 916 916 <arg value="--eval"/><arg value="(ext:exit)"/> 917 917 </java>
Note: See TracChangeset
for help on using the changeset viewer.