root/trunk/ProjectFortress/build.xml @ 3372

Revision 3372, 45.4 KB (checked in by jmaessen, 10 months ago)

Reintroduce astgen-based serialization (which does not completely work
even with a patched version of astgen; astgen fixes are in progress
and may require re-working astgen's serialization and deserialization
support).

Line 
1<?xml version="1.0" ?>
2
3<!--
4Copyright 2009 Sun Microsystems, Inc.,
54150 Network Circle, Santa Clara, California 95054, U.S.A.
6All rights reserved.
7
8U.S. Government Rights - Commercial software.
9Government users are subject to the Sun Microsystems, Inc. standard
10license agreement and applicable provisions of the FAR and its supplements.
11
12Use is subject to license terms.
13
14This distribution may include materials developed by third parties.
15
16Sun, Sun Microsystems, the Sun logo and Java are trademarks or registered
17trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
18-->
19
20<!--
21This is the main Ant build file for the Fortress reference
22implementation. Declarations are separated by type (e.g., taskdefs,
23properties, targets, etc.). To add a new declaration, please find the
24appropriate place in the file. For the sake of readability, please
25maintain proper indentation.
26-->
27
28<project name="Fortress" default="help">
29  <description>
30    A reference implementation of the Fortress programming language.
31  </description>
32
33
34  <!--
35       Properties
36  -->
37
38  <!-- Global properties for this build. -->
39  <property name="packagePrefix" value="com/sun/fortress"/>
40  <property name="package.prefix" value="com.sun.fortress"/>
41  <property name="interpreterPrefix" value="com/sun/fortress/interpreter"/>
42  <property name="interpreter.prefix" value="com.sun.fortress.interpreter"/>
43  <property name="blahblahblah" value="com/sun/fortress"/>
44
45  <!-- Directories in the ${basedir} directory -->
46  <property name="cache0" location="${basedir}/../default_repository/caches"/>
47  <property name="cache1" location="${basedir}/../.fortress_cache"/>
48  <property name="cache2" location="${basedir}/../.interpreter_cache"/>
49  <property name="cache3" location="${basedir}/.interpreter_cache"/>
50  <property name="cache4" location="${basedir}/../.syntax_cache"/>
51  <property name="cache5" location="${basedir}/.syntax_cache"/>
52  <property name="cache6" location="${basedir}/../.analyzed_cache"/>
53  <property name="cache7" location="${basedir}/.analyzed_cache"/>
54  <property name="cache8" location="${basedir}/../.presyntax_cache"/>
55  <property name="cache9" location="${basedir}/.presyntax_cache"/>
56  <property name="cache10" location="${basedir}/../.bytecode_cache"/>
57  <property name="cache11" location="${basedir}/.bytecode_cache"/>
58  <property name="cache12" location="${basedir}/../local_repository/caches"/>
59  <property name="astgen.src" location="${basedir}/astgen"/>
60  <property name="build" location="${basedir}/build"/>
61  <property name="docs" location="${basedir}/docs"/>
62  <property name="src" location="${basedir}/src"/>
63  <property name="library" location="${basedir}/../Library"/>
64  <property name="astgen.generators.src"
65            location="${src}/${packagePrefix}/astgen"/>
66
67  <!-- Third party jar files -->
68  <property name="asm" location="${basedir}/third_party/asm"/>
69  <property name="astgen.third" location="${basedir}/third_party/astgen"/>
70  <property name="jsr166y" location="${basedir}/third_party/jsr166y"/>
71  <property name="junit" location="${basedir}/third_party/junit"/>
72  <property name="plt" location="${basedir}/third_party/plt"/>
73  <property name="unicode.third" location="${basedir}/third_party/unicode"/>
74  <property name="xtc" location="${basedir}/third_party/xtc"/>
75  <property name="unsigned" location="${basedir}/third_party/unsigned"/>
76
77  <!-- Scala jar files -->
78  <property name="scala-compiler.jar"
79            value="${basedir}/third_party/scala/scala-compiler-2.7.2.jar"/>
80  <property name="scala-library.jar"
81            value="${basedir}/third_party/scala/scala-library-2.7.2.jar"/>
82
83  <!-- ASTGen -->
84  <property name="generate-sourcefile" value="${astgen.src}/Fortress.ast" />
85
86  <!-- Package nodes -->
87  <property name="nodesPackage" value="${packagePrefix}/nodes"/>
88  <property name="scala.nodes.package" value="${packagePrefix}/scala_src/nodes"/>
89  <property name="nodes"  location="${src}/${nodesPackage}"/>
90  <property name="scala.nodes"  location="${src}/${scala.nodes.package}"/>
91  <property name="nodesBuild" location="${build}/${nodesPackage}"/>
92
93  <!-- Package nodes_util -->
94  <property name="nodesUtil"  location="${src}/${packagePrefix}/nodes_util"/>
95
96  <!-- Parser packages -->
97  <property name="parser"  location="${src}/${packagePrefix}/parser"/>
98  <property name="preparser" location="${src}/${packagePrefix}/parser/preparser"/>
99  <property name="templateparser"
100            location="${src}/${packagePrefix}/parser/templateparser"/>
101  <property name="parserUtil"  location="${src}/${packagePrefix}/parser_util"/>
102  <property name="precedence" location="${parserUtil}/precedence"/>
103  <property name="precedenceResolver"
104            location="${parserUtil}/precedence_resolver"/>
105
106  <!-- Unicode packages -->
107  <property name="unicodePackage" value="${packagePrefix}/unicode"/>
108  <property name="unicode" location="${src}/${packagePrefix}/unicode"/>
109  <property name="unicodeBuild" location="${build}/${unicodePackage}"/>
110
111  <!-- Package useful -->
112  <property name="usefulPackage" value="${packagePrefix}/useful"/>
113
114  <!-- For fortress installation -->
115  <property name="testFortress" location=".TEST_FORTRESS"/>
116  <property name="installerDir" location=".installer"/>
117  <property name="protofortress" location="${basedir}/fortress/FORTRESS"/>
118  <property name="protofortress.lib" location="${protofortress}/lib"/>
119
120  <!-- Instrumentation -->
121  <property name="instrumentation.package"
122            value="${package.prefix}.parser_util.instrumentation"/>
123  <property name="instrumentationPackage"
124            value="${packagePrefix}/parser_util/instrumentation"/>
125  <property name="instrumentation.outfile"
126            location="${parserUtil}/instrumentation/coverage-report.txt"/>
127  <property name="instrumentation.transient"
128            location="${parserUtil}/instrumentation/transient.txt"/>
129
130  <!-- For tests -->
131  <property name="test.results" location="${basedir}/TEST-RESULTS"/>
132
133  <!-- Other settings -->
134  <property name="junitMem" value="768m"/>
135  <property name="junit.dir" value="junit-results"/>
136  <property environment="env"/>
137  <condition property="correct.environment">
138    <and>
139      <equals arg1="${ant.java.version}" arg2="1.6"/>
140      <equals arg1="${env.ANT_CALLED_FROM_SCRIPT}" arg2='yes'/>
141    </and>
142  </condition>
143
144
145  <!--
146       Paths
147  -->
148  <path id="scala.classpath">
149    <pathelement location="${scala-compiler.jar}"/>
150    <pathelement location="${scala-library.jar}"/>
151  </path>
152
153  <path id="astgen.path">
154    <path refid="scala.classpath"/>
155    <pathelement location="${astgen.third}/astgen.jar" />
156    <pathelement location="${build}" />
157  </path>
158
159  <path id="astgen.classpath">
160    <path refid="scala.classpath"/>
161    <pathelement location="${build}"/>
162    <pathelement location="${astgen.third}/astgen.jar"/>
163  </path>
164
165  <path id="instrumentedparser.classpath">
166    <path refid="scala.classpath"/>
167    <pathelement location="${build}"/>
168    <pathelement location="${xtc}/xtc.jar"/>
169    <pathelement location="${plt}/plt.jar"/>
170  </path>
171
172  <path id="compile.classpath">
173    <path refid="scala.classpath"/>
174    <pathelement location="${build}"/>
175    <pathelement location="${asm}/asm-3.1.jar"/>
176    <pathelement location="${asm}/asm-tree-3.1.jar"/>
177    <pathelement location="${xtc}/xtc.jar"/>
178    <pathelement location ="${unsigned}/unsigned.jar"/>
179    <pathelement location="${jsr166y}/jsr166y.jar"/>
180    <pathelement location="${plt}/plt.jar"/>
181    <pathelement location="${astgen.third}/astgen.jar" />
182    <pathelement location="${junit}/junit.jar"/>
183    <pathelement location="${ant.home}/lib/ant.jar"/>
184    <pathelement location="${java.home}/../lib/tools.jar"/>
185  </path>
186
187  <!--
188       Taskdefs
189  -->
190  <taskdef resource="scala/tools/ant/antlib.xml">
191    <classpath refid="scala.classpath"/>
192  </taskdef>
193
194
195  <!--
196       Targets
197  -->
198  <target name="help">
199    <echo message="ant checkEnv, checkNodesUptodate, checkOperatorsUptodate,
200                   checkParserUptodate, clean, cleanCache, compile, compileAll,
201                   compileCommon, compileCommonLint, compileLint, doc,
202                   grammarCoverage, help, init, interpreter-jar,
203                   makeAST, operatorsGen, fortressparser, preparser,
204                   parser, reportNotPassing, systemProperties, test,
205                   testAll, testDemos, testSystem, testOnly
206                   -DtestPattern='some pattern', testCruiseControl"/>
207    <echo message="If you are building Fortress, you want ant compile or ant test."/>
208  </target>
209
210  <target name="systemProperties">
211    <echo message="Environment variables set correctly? ${correct.environment}"/>
212    <echo message="basedir: ${basedir}"/>
213    <echo message="Ant Java version: ${ant.java.version}"/>
214    <echo message="Ant called from script? ${env.ANT_CALLED_FROM_SCRIPT}"/>
215    <echo message="ANT_ARGS: ${env.ANT_ARGS}"/>
216    <echo message="ANT_OPTS: ${env.ANT_OPTS}"/>
217    <echo message="Scala version: ${scalac.version}" />
218    <echo message="Java Runtime Environment
219                   version: ${java.version}"/>
220    <echo message="Java Runtime Environment
221                   vendor: ${java.vendor}"/>
222    <echo message="Java Runtime Environment
223                   vendor URL: ${java.vendor.url}"/>
224    <echo message="Java installation
225                   directory: ${java.home}"/>
226    <echo message="Java Virtual Machine
227                   specification version:
228                   ${java.vm.specification.version}"/>
229    <echo message="Java Virtual Machine
230                   specification vendor:
231                   ${java.vm.specification.vendor}"/>
232    <echo message="Java Virtual Machine
233                   specification name:
234                   ${java.vm.specification.name}"/>
235    <echo message="Java Virtual Machine
236                   implementation version:
237                   ${java.vm.version}"/>
238    <echo message="Java Virtual Machine
239                   implementation vendor:
240                   ${java.vm.vendor}"/>
241    <echo message="Java Virtual Machine
242                   implementation name: ${java.vm.name}"/>
243    <echo message="Java Runtime Environment
244                   specification version:
245                   ${java.specification.version}"/>
246    <echo message="Java Runtime Environment
247                   specification vendor:
248                   ${java.specification.vendor}"/>
249    <echo message="Java Runtime Environment
250                   specification name:
251                   ${java.specification.name}"/>
252    <echo message="Java class format version
253                   number: ${java.class.version}"/>
254    <echo message="Java class path:
255                   ${java.class.path}"/>
256    <echo message="List of paths to search when
257                   loading libraries: ${java.library.path}"/>
258    <echo message="Path of extension directory
259                   or directories: ${java.ext.dirs}"/>
260    <echo message="Default temp file path:
261                   ${java.io.tmpdir}"/>
262    <echo message="Operating system name:
263                   ${os.name}"/>
264    <echo message="Operating system
265                   architecture: ${os.arch}"/>
266    <echo message="Operating system version:
267                   ${os.version}"/>
268  </target>
269
270  <target name="checkEnv">
271    <echo message="Environment variables set correctly? ${correct.environment}"/>
272    <fail unless="correct.environment"
273          message="ERROR: This build script requires specific command-line arguments to Ant. Please call it using the script provided at ${basedir}/ant."/>
274  </target>
275
276  <target name="init">
277    <echo message="basedir: ${basedir}"/>
278    <!-- Create the time stamp. -->
279    <tstamp/>
280    <!-- Create the build directory structure used by compile. -->
281    <mkdir dir="${build}"/>
282    <mkdir dir="${junit.dir}"/>
283  </target>
284
285  <target name="cleanAst" depends="cleanCache"
286          description="Delete the ${nodes} directory tree and cached asts.">
287    <delete dir="${nodes}"/>
288  </target>
289
290  <target name="clean" depends="cleanAst"
291          description="Delete the ${build} directory tree and generated files.">
292    <delete dir="${build}"/>
293    <delete dir="${nodes}"/>
294    <delete dir="${junit.dir}"/>
295
296    <!-- No longer needed, but eases the upgrade-->
297    <delete file="${nodesUtil}/BaseNodeMaker.java"/>
298    <!-- No longer needed, but eases the upgrade-->
299    <delete file="${nodesUtil}/InterfaceMaker.java"/>
300    <delete file="${parser}/Fortress.java"/>
301    <delete file="${parser}/FortressInstrumented.java"/>
302    <delete file="${preparser}/PreFortress.java"/>
303    <delete file="${templateparser}/TemplateParser.java"/>
304    <delete file="${precedenceResolver}/Operators.java"/>
305    <!-- No longer needed, but eases the upgrade-->
306    <delete file="${src}/com/sun/fortress/parser/precedence/resolver/Operators.java"/>
307    <delete file="${instrumentation.outfile}"/>
308    <delete file="${library}/FortressAst.fsi" />
309    <delete file="${library}/FortressAst.fss" />
310    <delete file="${astgen.src}/FortressAst.scala" />
311    <delete file="FortressLibrary.ast"/>
312    <delete file="FortressLibrary.tfs"/>
313    <delete file="${basedir}/tests/printing/test_output.txt" />
314    <delete file="testFile.txt"/>
315    <delete file="${src}/com/sun/fortress/scala_src/nodes/FortressAst.scala" />
316    <delete dir="${src}/com/sun/fortress/scalasrc" />
317    <delete dir="${basedir}/test-tmp" />
318    <delete>
319      <fileset dir="src" includes="**/*.class" />
320    </delete>
321  </target>
322
323  <target name="cleanCache"
324          description="Delete any cached Fortress ASTs in the development tree">
325    <delete dir="${cache0}"/>
326    <delete dir="${cache1}"/>
327    <delete dir="${cache2}"/>
328    <delete dir="${cache3}"/>
329    <delete dir="${cache4}"/>
330    <delete dir="${cache5}"/>
331    <delete dir="${cache6}"/>
332    <delete dir="${cache7}"/>
333    <delete dir="${cache8}"/>
334    <delete dir="${cache9}"/>
335    <delete dir="${cache10}"/>
336    <delete dir="${cache11}"/>
337    <delete dir="${cache12}"/>
338  </target>
339
340  <!-- Generation of Operators.java depends only on the files listed below.
341       Note that there are class files it depends on; if these class files are
342       not up to date with respect to their sources, they are themselves
343       recompiled by the compileCommon target.-->
344  <target name="checkOperatorsUptodate" depends="init, compileCommon">
345    <condition property="operators.uptodate">
346      <and>
347        <uptodate srcfile="${unicode.third}/UnicodeData.500.txt"
348                  targetfile="${precedenceResolver}/Operators.java"/>
349        <uptodate srcfile="${precedenceResolver}/operators.txt"
350                  targetfile="${precedenceResolver}/Operators.java"/>
351        <uptodate srcfile="${unicodeBuild}/OperatorStuffGenerator.class"
352                  targetfile="${precedenceResolver}/Operators.java"/>
353        <uptodate srcfile="${unicodeBuild}/Element.class"
354                  targetfile="${precedenceResolver}/Operators.java"/>
355      </and>
356    </condition>
357    <echo message="Operators up to date? ${operators.uptodate}"/>
358  </target>
359
360  <target name="operatorsGen"  unless="operators.uptodate"
361          depends="init, compileCommon, checkOperatorsUptodate"
362          description="Automatically generate visitors for AST nodes.">
363    <echo message="Regenerating operators"/>
364    <java classname="${package.prefix}.unicode.OperatorStuffGenerator"
365          fork="true">
366      <classpath>
367        <pathelement location="${build}"/>
368        <pathelement location="${basedir}/third_party/plt/plt.jar"/>
369      </classpath>
370    </java>
371  </target>
372
373  <target name="DumpProperties"
374          description="Dump properties as seen by a Java program.">
375    <java classname="${package.prefix}.repository.DumpProperties"
376          fork="true">
377      <sysproperty key="DEBUG" value="true"/>
378      <classpath>
379        <pathelement location="${build}"/>
380      </classpath>
381    </java>
382  </target>
383
384  <target name="checkAstgen">
385    <condition property="astgenerators.uptodate">
386      <uptodate targetfile="${basedir}/build/com/sun/fortress/astgen/FortressAstGenerator.class">
387        <srcfiles dir="${basedir}/src/com/sun/fortress/astgen/" includes="*.java"/>
388      </uptodate>
389    </condition>
390  </target>
391
392  <target name="astGenerators"
393          unless="astgenerators.uptodate"
394          depends="init,checkAstgen"
395          description="Compile all ASTGen custom generators.">
396    <depend srcdir="${astgen.generators.src}"
397            destdir="${build}"
398            closure="yes"
399            cache="${basedir}/.dependencies"/>
400    <javac
401        srcdir="${astgen.generators.src}"
402        destdir="${build}"
403        source="1.5"
404        debug="true"
405        includeantruntime="false"
406        fork="true"
407        memorymaximumsize="${junitMem}">
408      <!-- Uncomment the following line to print unchecked warnings
409           (here and in the 'compileCommon' target. -->
410      <!-- <compilerarg value="-Xlint:unchecked"/> -->
411      <classpath refid="astgen.classpath"/>
412      <include name="**/*.java"/>
413      <exclude name="${usefulPackage}/*.java"/>
414      <exclude name="${unicodePackage}/*.java"/>
415    </javac>
416    <scalac
417        srcdir="${astgen.generators.src}"
418        destdir="${build}"
419        classpathref="astgen.classpath"
420        addparams="">
421      <include name="**/*.scala"/>
422      <exclude name="${usefulPackage}/*.scala"/>
423      <exclude name="${unicodePackage}/*.scala"/>
424    </scalac>
425  </target>
426
427  <target name="checkNodesUptodate" depends="astGenerators">
428    <condition property="nodes.uptodate">
429      <and>
430        <available file="${nodes}/AbstractNode.java"/>
431        <uptodate srcfile="${astgen.src}/Fortress.ast"
432                  targetfile="${nodes}/AbstractNode.java"/>
433        <available file="${library}/FortressAst.fsi" />
434        <uptodate srcfile="${astgen.src}/Fortress.ast"
435                  targetfile="${library}/FortressAst.fsi" />
436        <available file="${library}/FortressAst.fss" />
437        <uptodate srcfile="${astgen.src}/Fortress.ast"
438                  targetfile="${library}/FortressAst.fss" />
439        <uptodate targetfile="${library}/FortressAst.fsi">
440          <srcfiles dir="${basedir}/src/com/sun/fortress/astgen/" includes="**/*.java"/>
441        </uptodate>
442      </and>
443    </condition>
444    <echo message="Nodes up to date? ${nodes.uptodate}"/>
445  </target>
446
447  <taskdef name="astgen" classpath="${astgen.third}/astgen.jar;${build}"
448           classname="edu.rice.cs.astgen.AntTask"/>
449
450  <target name="makeAST" unless="nodes.uptodate" depends="checkNodesUptodate"
451          description="Automatically generate AST nodes.">
452    <echo message="Processing ${generate-sourcefile}" />
453    <astgen file="${generate-sourcefile}" />
454    <move todir="${nodes}">
455      <fileset dir="${astgen.src}">
456        <include name="**/*.java"/>
457        <exclude name="**/Fortress.ast"/>
458      </fileset>
459    </move>
460    <move todir="${library}">
461      <fileset dir="${astgen.src}">
462        <include name="FortressAst.fss" />
463        <include name="FortressAst.fsi" />
464      </fileset>
465    </move>
466    <move todir="${scala.nodes}">
467      <fileset dir="${astgen.src}">
468        <include name="FortressAst.scala" />
469      </fileset>
470    </move>
471  </target>
472
473  <target name="compile" depends="compileCommon, makeAST, parser, operatorsGen"
474          description="Compile all Fortress code written in Java (Scala code is ignored).">
475    <depend srcdir="${src}"
476            destdir="${build}"
477            closure="yes"
478            cache="${basedir}/.dependencies"/>
479    <javac
480        srcdir="${src}"
481        destdir="${build}"
482        debug="true"
483        includeantruntime="false"
484        fork="true"
485        memorymaximumsize="${junitMem}">
486      <!-- Uncomment the following line to print unchecked warnings
487           (here and in the 'compileCommon' target. -->
488      <!-- <compilerarg value="-Xlint:unchecked"/> -->
489      <classpath refid="compile.classpath"/>
490      <include name="**/*.java"/>
491      <exclude name="${usefulPackage}/*.java"/>
492      <exclude name="${unicodePackage}/*.java"/>
493    </javac>
494  </target>
495
496  <target name="compileAll" depends="compileCommon, makeAST, parser, operatorsGen"
497          description="Compile all Fortress code.">
498    <scalac
499        srcdir="${src}"
500        destdir="${build}"
501        classpathref="compile.classpath">
502      <include name="**/*.java"/>
503      <include name="**/*.scala"/>
504      <exclude name="${usefulPackage}/*.java"/>
505      <exclude name="${unicodePackage}/*.java"/>
506    </scalac>
507    <javac
508        srcdir="${src}"
509        destdir="${build}"
510        debug="true"
511        includeantruntime="false"
512        fork="true"
513        memorymaximumsize="${junitMem}">
514      <!-- Uncomment the following line to print unchecked warnings
515           (here and in the 'compileCommon' target. -->
516      <!-- <compilerarg value="-Xlint:unchecked"/> -->
517      <classpath refid="compile.classpath"/>
518      <include name="**/*.java"/>
519      <exclude name="${usefulPackage}/*.java"/>
520      <exclude name="${unicodePackage}/*.java"/>
521    </javac>
522  </target>
523
524  <target name="check.blas" depends="init">
525    <javac destdir="${build}" srcdir="${src}/com/sun/fortress/numerics">
526      <classpath refid="compile.classpath"/>
527    </javac>
528
529    <java failonerror="true"
530          classname="com.sun.fortress.numerics.CheckBlasEnvironment">
531      <classpath refid="compile.classpath"/>
532    </java>
533  </target>
534
535  <target name="check.linux">
536    <condition property="blas.islinux">
537      <equals arg1="${os.name}" arg2="Linux" />
538    </condition>
539  </target>
540
541  <target name="blas.linux" depends="check.linux" if="blas.islinux">
542    <echo message="Generating C header and stub files." />
543    <javah class="com.sun.fortress.numerics.Blas"
544           destdir="c"
545           classpath="build"
546           />
547    <echo message="Now compiling C stubs for blas on arch linux."/>
548    <exec executable="gcc" failonerror="true">
549      <arg value="-fPIC" />
550      <arg value="-Ic" />
551      <arg value="-I${env.BLAS_INCLUDE}" />
552      <arg value="-L${env.BLAS_LIB}" />
553      <arg value="-I${env.JAVA_HOME}/include" />
554      <arg value="-I${env.JAVA_HOME}/include/linux" />
555      <arg value="c/blas.c" />
556      <arg value="-lcblas" />
557      <arg value="-lblas" />
558      <arg value="-shared" />
559      <arg value="-olibblas.so" />
560    </exec>
561  </target>
562
563  <target name="check.osx">
564    <condition property="blas.is.osx">
565      <equals arg1="${os.name}" arg2="Mac OS X" />
566    </condition>
567  </target>
568
569  <target name="blas.osx" depends="check.osx" if="blas.is.osx">
570    <echo message="Generating C header and stub files." />
571    <javah class="com.sun.fortress.numerics.Blas"
572           destdir="c"
573           classpath="build"
574           />
575    <echo message="Now compiling C stubs for blas on arch OS X."/>
576    <exec executable="gcc" failonerror="true">
577      <arg line="-D OSX" />
578      <arg value="-fPIC" />
579      <arg value="-Ic" />
580      <arg line="-framework Accelerate" />
581      <arg value="-I${env.JAVA_LIB}/Headers" />
582      <arg value="c/blas.c" />
583      <arg value="-lcblas" />
584      <arg value="-lblas" />
585      <arg value="-shared" />
586      <arg value="-bundle" />
587      <arg line="-o libblas.dylib" />
588    </exec>
589  </target>
590
591  <target name="check.sunos">
592    <condition property="blas.is.sunos">
593      <equals arg1="${os.name}" arg2="SunOS" />
594    </condition>
595  </target>
596
597  <target name="blas.sunos" depends="check.sunos" if="blas.is.sunos">
598    <echo message="Generating C header and stub files." />
599    <javah class="com.sun.fortress.numerics.Blas"
600           destdir="c"
601           classpath="build"
602           />
603    <echo message="Now compiling C stubs for blas on arch SunOS."/>
604    <exec executable="cc" failonerror="true">
605      <arg line="-D SUNOS" />
606      <arg value="-fPIC" />
607      <arg value="-Ic" />
608      <arg value="-I${env.JAVA_HOME}/include" />
609      <arg value="-I${env.JAVA_HOME}/include/solaris" />
610      <arg value="c/sunperf_blas.c" />
611      <arg value="-shared" />
612      <arg value="-dalign" />
613      <arg value="-xlic_lib=sunperf" />
614      <arg value="-olibblas.so" />
615    </exec>
616  </target>
617
618  <target name="blas" depends="check.blas,blas.linux,blas.osx,blas.sunos"></target>
619
620  <target name="compileLint"
621          depends="compileCommonLint, makeAST, parser, operatorsGen"
622          description="Compile all interpreter code.">
623    <depend srcdir="${src}"
624            destdir="${build}"
625            closure="yes"
626            cache="${basedir}/.dependencies"/>
627    <javac
628        srcdir="${src}"
629        destdir="${build}"
630        source="1.5"
631        debug="true"
632        includeantruntime="false"
633        fork="true"
634        memorymaximumsize="${junitMem}">
635      <!-- Uncomment the following line to print unchecked warnings. -->
636      <classpath refid="compile.classpath"/>
637      <compilerarg value="-Xlint:unchecked"/>
638      <include name="**/*.java"/>
639      <exclude name="${usefulPackage}/*.java"/>
640      <exclude name="${unicodePackage}/*.java"/>
641    </javac>
642  </target>
643
644  <target name="compileCommon" depends="init"
645          description="Compile interpreter-indepedent code.">
646    <depend srcdir="${src}"
647            destdir="${build}"
648            closure="yes"
649            cache="${basedir}/.dependencies"/>
650    <javac
651        srcdir="${src}"
652        destdir="${build}"
653        source="1.5"
654        debug="true"
655        includeantruntime="false"
656        fork="true">
657      <!-- Uncomment the following line to print unchecked warnings. -->
658      <!-- <compilerarg value="-Xlint:unchecked"/>  -->
659      <classpath refid="compile.classpath"/>
660      <include name="${blahblahblah}/useful/*.java"/>
661      <include name="${blahblahblah}/unicode/*.java"/>
662    </javac>
663  </target>
664
665  <target name="compileCommonLint" depends="init"
666          description="Compile interpreter-indepedent code.">
667    <depend srcdir="${src}"
668            destdir="${build}"
669            closure="yes"
670            cache="${basedir}/.dependencies"/>
671    <javac
672        srcdir="${src}"
673        destdir="${build}"
674        source="1.5"
675        debug="true"
676        includeantruntime="false"
677        fork="true">
678      <classpath refid="compile.classpath"/>
679      <!-- Uncomment the following line to print unchecked warnings. -->
680      <compilerarg value="-Xlint:unchecked"/>
681      <include name="${usefulPackage}/*.java"/>
682      <include name="${unicodePackage}/*.java"/>
683    </javac>
684  </target>
685
686
687  <target name="interpreter-jar" depends="compileAll"
688          description="Package up the interpreter in a jar.">
689    <jar
690        destfile="../bin/interpreter.jar"
691        basedir="${build}"
692        includes="**/*"/>
693  </target>
694
695  <target name="testOnly" depends="compileAll"
696          description="Run specific tests (use -DtestPattern=...).">
697    <mkdir dir="${test.results}"/>
698    <mkdir dir="${basedir}/test-tmp" />
699    <junit printsummary="off"
700           haltonerror="off"
701           haltonfailure="off"
702           showoutput="yes"
703           fork="true"
704           maxmemory="${junitMem}"
705           errorProperty="tests.failed"
706           failureProperty="tests.failed">
707      <classpath refid="compile.classpath"/>
708      <jvmarg value="-Djava.io.tmpdir=${basedir}/test-tmp" />
709      <formatter type="plain" usefile="false"/>
710      <syspropertyset>
711        <propertyref prefix="plt." />
712      </syspropertyset>
713      <batchtest fork="true" todir="${test.results}">
714        <fileset dir="${build}">
715          <and>
716            <filename name="**/*${testPattern}*/**" />
717            <or>
718              <filename name="**/*JUTest.class" />
719              <filename name="**/*JxTest.class" />
720            </or>
721          </and>
722          <exclude name="**/*$*.class"/>
723        </fileset>
724      </batchtest>
725    </junit>
726    <delete dir="${basedir}/test-tmp" />
727    <fail message="Tests expected to pass are failing!" if="tests.failed"/>
728  </target>
729
730  <target name="test" depends="compileAll, testFast"
731          description="Clean, compile everything, and run all unit and system tests.">
732  </target>
733
734  <target name="testFast"
735          description="Run all unit and system tests expected to pass.">
736    <mkdir dir="${test.results}"/>
737    <mkdir dir="${basedir}/test-tmp" />
738    <junit printsummary="on"
739           haltonerror="off"
740           haltonfailure="off"
741           showoutput="yes"
742           fork="true"
743           maxmemory="${junitMem}"
744           errorProperty="tests.failed"
745           failureProperty="tests.failed">
746      <classpath refid="compile.classpath"/>
747      <jvmarg value="-Djava.io.tmpdir=${basedir}/test-tmp" />
748      <formatter type="plain" usefile="true"/>
749      <batchtest fork="true" todir="${test.results}">
750        <fileset dir="${build}">
751          <include name="**/*JUTest.class"/>
752          <include name="**/*JUTests.class"/>
753          <exclude name="**/*$*.class"/>
754          <exclude name="**/SyntaxAbstractionJUTestAll.class"/>
755          <exclude name="**/tools/AstJUTest.class"/>
756        </fileset>
757      </batchtest>
758    </junit>
759    <delete dir="${basedir}/test-tmp" />
760    <fail message="Tests expected to pass are failing!" if="tests.failed"/>
761  </target>
762
763  <target name="testCruiseControl" depends="compileAll"
764          description="Run all unit and system tests expected to pass.">
765    <mkdir dir="${test.results}"/>
766    <mkdir dir="${basedir}/test-tmp" />
767    <junit printsummary="on"
768           haltonerror="off"
769           haltonfailure="off"
770           showoutput="yes"
771           fork="true"
772           maxmemory="${junitMem}"
773           errorProperty="tests.failed"
774           failureProperty="tests.failed">
775      <classpath refid="compile.classpath"/>
776      <jvmarg value="-Djava.io.tmpdir=${basedir}/test-tmp" />
777      <formatter type="plain" usefile="true"/>
778      <batchtest fork="true" todir="${junit.dir}">
779        <formatter type="brief" usefile="false" />
780        <formatter type="xml" />
781        <fileset dir="${build}">
782          <include name="**/*JUTest.class"/>
783          <include name="**/*JUTests.class"/>
784          <exclude name="**/*$*.class"/>
785          <exclude name="**/SyntaxAbstractionJUTestAll.class"/>
786          <exclude name="**/tools/AstJUTest.class"/>
787        </fileset>
788      </batchtest>
789    </junit>
790    <delete dir="${basedir}/test-tmp" />
791    <fail message="Tests expected to pass are failing!" if="tests.failed"/>
792  </target>
793
794  <target name="testNotPassing" depends="compileAll"
795          description="Run system tests that aren't passing yet.">
796    <mkdir dir="${test.results}"/>
797    <mkdir dir="${basedir}/test-tmp" />
798    <junit printsummary="on"
799           haltonerror="off"
800           haltonfailure="off"
801           showoutput="yes"
802           fork="true"
803           maxmemory="${junitMem}"
804           errorProperty="tests.failed"
805           failureProperty="tests.failed">
806      <classpath refid="compile.classpath"/>
807      <jvmarg value="-Djava.io.tmpdir=${basedir}/test-tmp" />
808      <formatter type="brief" usefile="true"/>
809      <batchtest fork="true" todir="${test.results}">
810        <fileset dir="${build}">
811          <include name="**/*NotPassingYet.class"/>
812        </fileset>
813      </batchtest>
814    </junit>
815    <delete dir="${basedir}/test-tmp" />
816    <fail message="Tests expected to fail are failing!" if="tests.failed"/>
817  </target>
818
819  <target name="testSpecData" depends="compileAll"
820          description="Run SpecDataJUTests.">
821    <mkdir dir="${test.results}"/>
822    <mkdir dir="${basedir}/test-tmp" />
823    <junit printsummary="on"
824           haltonerror="off"
825           haltonfailure="off"
826           showoutput="yes"
827           fork="true"
828           maxmemory="${junitMem}"
829           errorProperty="tests.failed"
830           failureProperty="tests.failed">
831      <classpath refid="compile.classpath"/>
832      <jvmarg value="-Djava.io.tmpdir=${basedir}/test-tmp" />
833      <formatter type="plain" usefile="true"/>
834      <batchtest fork="true" todir="${test.results}">
835        <fileset dir="${build}">
836          <include name="**/SpecDataJUTest.class"/>
837        </fileset>
838      </batchtest>
839    </junit>
840    <delete dir="${basedir}/test-tmp" />
841    <fail message="Tests expected to pass are failing!" if="tests.failed"/>
842  </target>
843
844  <target name="testSystem" depends="compileAll"
845          description="Run SystemJUTests.">
846    <mkdir dir="${test.results}"/>
847    <mkdir dir="${basedir}/test-tmp" />
848    <junit printsummary="on"
849           haltonerror="off"
850           haltonfailure="off"
851           showoutput="yes"
852           fork="true"
853           maxmemory="${junitMem}"
854           errorProperty="tests.failed"
855           failureProperty="tests.failed">
856      <classpath refid="compile.classpath"/>
857      <jvmarg value="-Djava.io.tmpdir=${basedir}/test-tmp" />
858      <formatter type="plain" usefile="true"/>
859      <batchtest fork="true" todir="${test.results}">
860        <fileset dir="${build}">
861          <include name="**/SystemJUTest.class"/>
862        </fileset>
863      </batchtest>
864    </junit>
865    <delete dir="${basedir}/test-tmp" />
866    <fail message="Tests expected to pass are failing!" if="tests.failed"/>
867  </target>
868
869  <target name="testblas" depends="compile,blas" description="Test blas">
870    <mkdir dir="${basedir}/test-tmp" />
871    <junit printsummary="on"
872           haltonerror="off"
873           haltonfailure="off"
874           showoutput="yes"
875           fork="true"
876           maxmemory="${junitMem}"
877           errorProperty="tests.failed"
878           failureProperty="tests.failed">
879      <classpath refid="compile.classpath"/>
880      <jvmarg value="-Djava.io.tmpdir=${basedir}/test-tmp" />
881      <formatter type="plain" usefile="true"/>
882      <batchtest fork="true" todir="${test.results}">
883        <fileset dir="${build}">
884          <include name="**/BlasJxTest.class"/>
885        </fileset>
886      </batchtest>
887    </junit>
888    <delete dir="${basedir}/test-tmp" />
889    <fail message="Tests expected to pass are failing!" if="tests.failed"/>
890  </target>
891
892  <target name="testsyntax" depends="compileAll"
893          description="Run SyntaxAbstractionJUTests.">
894    <mkdir dir="${test.results}"/>
895    <mkdir dir="${basedir}/test-tmp" />
896    <junit printsummary="on"
897           haltonerror="off"
898           haltonfailure="off"
899           showoutput="yes"
900           fork="true"
901           maxmemory="${junitMem}"
902           errorProperty="tests.failed"
903           failureProperty="tests.failed">
904      <classpath refid="compile.classpath"/>
905      <jvmarg value="-Djava.io.tmpdir=${basedir}/test-tmp" />
906      <formatter type="plain" usefile="true"/>
907      <batchtest fork="true" todir="${test.results}">
908        <fileset dir="${build}">
909          <include name="**/SyntaxAbstractionJUTest.class"/>
910          <include name="**/SyntaxAbstractionJUTestAll.class"/>
911        </fileset>
912      </batchtest>
913    </junit>
914    <delete dir="${basedir}/test-tmp" />
915    <fail message="Tests expected to pass are failing!" if="tests.failed"/>
916  </target>
917
918  <target name="testDemos" depends="compileAll"
919          description="Run demos in a test harness.">
920    <mkdir dir="${test.results}"/>
921    <mkdir dir="${basedir}/test-tmp" />
922    <junit printsummary="on"
923           haltonerror="off"
924           haltonfailure="off"
925           showoutput="yes"
926           fork="true"
927           maxmemory="${junitMem}"
928           errorProperty="tests.failed"
929           failureProperty="tests.failed">
930      <classpath refid="compile.classpath"/>
931      <jvmarg value="-Djava.io.tmpdir=${basedir}/test-tmp" />
932      <formatter type="brief" usefile="true"/>
933      <batchtest fork="true" todir="${test.results}">
934        <fileset dir="${build}">
935          <include name="**/DemoTests.class"/>
936        </fileset>
937      </batchtest>
938    </junit>
939    <delete dir="${basedir}/test-tmp" />
940    <fail message="Tests expected to pass are failing!" if="tests.failed"/>
941  </target>
942
943  <target name="testAll"
944          depends="test, testNotPassing, testDemos, reportNotPassing"
945          description="Run all tests, including those known not to pass yet.">
946  </target>
947
948  <target name="testNightly" depends="test, testDemos, testsyntax"
949          description="Run tests, demos, and syntax abstraction tests.">
950  </target>
951
952  <target name="reportNotPassing"
953          if="not.passing.yet"
954          depends="test,testNotPassing">
955    <echo message="Some tests expected to fail still aren't passing."/>
956  </target>
957
958  <!-- If the generated file Fortress.java is no older than all rats files
959       in the parser directory, then the parser must be up to date.
960       This is a conservative test; a more precise test would perform a
961       dependency analysis over Rats! code.-->
962  <target name="checkParserUptodate" depends="init">
963    <condition property="parser.uptodate">
964      <and>
965        <uptodate targetfile="${parser}/Fortress.java">
966          <srcfiles dir="${parser}" includes="**/*.rats"/>
967        </uptodate>
968        <uptodate targetfile="${preparser}/PreFortress.java">
969          <srcfiles dir="${parser}" includes="**/*.rats"/>
970          <srcfiles dir="${preparser}" includes="**/*.rats"/>
971        </uptodate>
972        <uptodate targetfile="${templateparser}/TemplateParser.java">
973          <srcfiles dir="${parser}" includes="**/*.rats"/>
974          <srcfiles dir="${templateparser}" includes="**/*.rats"/>
975        </uptodate>
976      </and>
977    </condition>
978    <echo>Parser up to date? ${parser.uptodate}</echo>
979  </target>
980
981  <target name="checkFortressParserUptodate" depends="init">
982    <uptodate property="fortressparser.uptodate"
983              targetfile="${parser}/Fortress.java">
984      <srcfiles dir="${parser}" includes="**/*.rats"/>
985    </uptodate>
986    <echo>Fortress parser up to date? ${parser.uptodate}</echo>
987  </target>
988
989  <target name="checkPreparserUptodate" depends="init">
990    <uptodate property="preparser.uptodate"
991              targetfile="${preparser}/PreFortress.java">
992      <srcfiles dir="${parser}" includes="**/*.rats"/>
993      <srcfiles dir="${preparser}" includes="**/*.rats"/>
994    </uptodate>
995    <echo>Preparser up to date? ${preparser.uptodate}</echo>
996  </target>
997
998  <target name="checkTemplateparserUptodate" depends="init">
999    <uptodate property="templateparser.uptodate"
1000              targetfile="${templateparser}/TemplateParser.java">
1001      <srcfiles dir="${parser}" includes="**/*.rats"/>
1002      <srcfiles dir="${templateparser}" includes="**/*.rats"/>
1003    </uptodate>
1004    <echo>Templateparser up to date? ${templateparser.uptodate}</echo>
1005  </target>
1006
1007  <target name="checkInstrumentedParserUptodate" depends="init">
1008    <uptodate property="instrumentedparser.uptodate"
1009              targetfile="${parser}/FortressInstrumented.java">
1010      <srcfiles dir="${parser}" includes="**/*.rats"/>
1011      <srcfiles dir="${src}/${instrumentationPackage}"
1012                includes="*.java"/>
1013    </uptodate>
1014    <echo>Fortress parser up to date? ${parser.uptodate}</echo>
1015  </target>
1016
1017  <macrodef name="buildparser">
1018    <attribute name="name" />
1019    <attribute name="file" />
1020    <attribute name="dir" />
1021    <sequential>
1022      <echo message="Rebuilding @{name}..."/>
1023      <java fork="yes"
1024            failonerror="yes"
1025            dir="@{dir}"
1026            classname="xtc.parser.Rats"
1027            classpath="${xtc}/xtc.jar">
1028        <arg value="-in"/>
1029        <arg value="${src}"/>
1030        <arg value="@{file}"/>
1031      </java>
1032    </sequential>
1033  </macrodef>
1034
1035  <target name="fortressparser" unless="fortressparser.uptodate"
1036          depends="checkFortressParserUptodate"
1037          description="Fortress Parser">
1038    <buildparser name="Fortress" dir="${parser}" file="Fortress.rats" />
1039  </target>
1040
1041  <target name="preparser" unless="preparser.uptodate"
1042          depends="checkPreparserUptodate"
1043          description="Preparser">
1044    <buildparser name="preparser" dir="${preparser}" file="PreFortress.rats" />
1045  </target>
1046
1047  <target name="templateparser" unless="templateparser.uptodate"
1048          depends="checkTemplateparserUptodate"
1049          description="Templateparser">
1050    <buildparser name="template parser" dir="${templateparser}"
1051                 file="TemplateParser.rats" />
1052  </target>
1053
1054  <target name="instrumentedparser" unless="instrumentedparser.uptodate"
1055          depends="compile, checkInstrumentedParserUptodate"
1056          description="Instrumented Parser">
1057    <java fork="yes"
1058          maxmemory="512m"
1059          failonerror="yes"
1060          classname="${instrumentation.package}.InstrumentedParserGenerator">
1061      <classpath refid="instrumentedparser.classpath"/>
1062      <arg value="${parser}"/> <!-- input dir -->
1063      <arg value="${parser}"/> <!-- output dir for FortressInstrumented.java -->
1064    </java>
1065  </target>
1066
1067  <target name="optimizeParser"
1068          depends="compile"
1069          description="Optimized Parser">
1070    <java fork="yes"
1071          maxmemory="512m"
1072          failonerror="yes"
1073          classname="${instrumentation.package}.OptimizedParserGenerator">
1074      <classpath refid="instrumentedparser.classpath"/>
1075      <arg value="${parser}"/> <!-- input dir -->
1076      <arg value="${parser}"/> <!-- output dir for Fortress.java -->
1077      <arg value="${instrumentation.transient}"/>
1078    </java>
1079    <ant target="compile"/>
1080  </target>
1081
1082  <target name="parser" unless="parser.uptodate"
1083          depends="checkParserUptodate, operatorsGen"
1084          description="Fortress Parser">
1085    <ant target="fortressparser" />
1086    <ant target="preparser" />
1087    <ant target="templateparser" />
1088  </target>
1089
1090  <target name="compileGrammarCoverage" depends="compile, instrumentedparser">
1091    <depend srcdir="${src}"
1092            destdir="${build}"
1093            closure="yes"
1094            cache="${basedir}/.dependencies"/>
1095    <javac
1096        srcdir="${src}"
1097        destdir="${build}"
1098        source="1.5"
1099        debug="true"
1100        includeantruntime="false"
1101        fork="true"
1102        memorymaximumsize="${junitMem}">
1103      <!-- Uncomment the following line to print unchecked warnings
1104           (here and in the 'compileCommon' target. -->
1105      <!-- <compilerarg value="-Xlint:unchecked"/> -->
1106      <classpath refid="compile.classpath"/>
1107      <include name="${packagePrefix}/parser/FortressInstrumented.java"/>
1108    </javac>
1109  </target>
1110
1111  <target name="grammarCoverage" depends="compileGrammarCoverage">
1112    <java fork="yes"
1113          failonerror="yes"
1114          classname="${instrumentation.package}.Coverage"
1115          output="${instrumentation.outfile}">
1116      <classpath refid="compile.classpath"/>
1117    </java>
1118    <echo message="Wrote grammar coverage report to ${instrumentation.outfile}"/>
1119  </target>
1120
1121  <target name="doc" depends="compileAll">
1122    <javadoc overview="${src}/overview.html" destdir="${docs}" maxmemory="${junitMem}">
1123      <classpath refid="compile.classpath"/>
1124      <packageset dir="${src}">
1125        <include name="**/*"/>
1126      </packageset>
1127      <header><![CDATA[Fortress Interpreter]]></header>
1128      <doctitle><![CDATA[<h1>Fortress Interpreter Source Code</h1>]]></doctitle>
1129      <group title="Evaluator Packages"
1130             packages="com.sun.fortress.interpreter.evaluator.*"/>
1131      <link href="http://junit.org/junit/javadoc/3.8.1/"/>
1132      <link href="http://java.sun.com/j2se/1.5/docs/api/"/>
1133      <link href="http://drjava.org/javadoc/plt/"/>
1134    </javadoc>
1135  </target>
1136
1137  <target name="jar"
1138          depends="compileAll"
1139          description="Package up a Fortress distribution as a self-extracting jar.">
1140    <tstamp>
1141      <format
1142          property="jar.DSTAMP"
1143          timezone="GMT"
1144          pattern="yyyy_MMdd_hhmm"/>
1145    </tstamp>
1146
1147    <!-- Extract Ant jars into build directory to be packaged up.-->
1148    <unjar src="${protofortress}/lib/ant.jar" dest="${build}"/>
1149    <unjar src="${protofortress}/lib/ant-launcher.jar" dest="${build}"/>
1150
1151    <!-- Place anthooks.jar in the protofortress. -->
1152    <copy file="${src}/com/sun/fortress/shell/anthooks.xml"
1153          todir="${protofortress}/bin"/>
1154
1155    <!-- Package up class files as a new shell.jar,
1156         and place them in the protofortress. -->
1157    <jar
1158        destfile="fortress/FORTRESS/lib/shell.jar"
1159        basedir="${build}"
1160        includes="**/*"/>
1161
1162    <!-- Then package up the protofortress and place it
1163         in the build directory (so it can be extracted later). -->
1164    <jar
1165        destfile="${build}/com/sun/fortress/shell/fortress.jar"
1166        basedir="fortress"
1167        includes="**/*" />
1168
1169    <!-- Write timestamp of jar creation to a file for retrieval during
1170         extraction. -->
1171    <echo message="${jar.DSTAMP}" file="${build}/TIMESTAMP"/>
1172
1173    <!-- Finally, package up the build directory into a jar that
1174         extracts the protofortress at a destination site. -->
1175    <jar
1176        destfile="Fortress_${jar.DSTAMP}.jar"
1177        basedir="${build}"
1178        includes="**/*" >
1179      <manifest>
1180        <attribute name="Manifest-Version" value="${jar.DSTAMP}"/>
1181        <attribute name="Created-By" value="Sun Microsystems, Inc."/>
1182        <attribute name="Main-Class" value="com.sun.fortress.shell.Extractor"/>
1183        <section name="common/class1.class">
1184          <attribute name="Sealed" value="false"/>
1185        </section>
1186      </manifest>
1187    </jar>
1188  </target>
1189
1190  <target name="copy.anthooks" depends="init" unless="anthooks.uptodate">
1191    <copy file="${src}/com/sun/fortress/shell/anthooks.xml"
1192          todir="${build}/com/sun/fortress/shell"
1193          overwrite="false"/>
1194  </target>
1195
1196  <target name="installer" depends="compileAll"
1197          description="build a new installer as a jar">
1198    <delete dir="${installerDir}"/>
1199    <mkdir dir="${installerDir}/fortress"/>
1200    <copy todir="${installerDir}/fortress/FORTRESS">
1201      <fileset dir="FORTRESS"/>
1202    </copy>
1203    <copy todir="${installerDir}/fortress/bin">
1204      <fileset dir="bin"/>
1205    </copy>
1206    <copy file="docs/installer/README.txt" todir="${installerDir}/fortress"/>
1207    <tar
1208        destfile="fortress.tar.gz"
1209        basedir="${installerDir}"
1210        longfile="fail"
1211        compression="gzip"
1212        />
1213    <delete dir="${installerDir}"/>
1214  </target>
1215
1216  <target name="createNestedJarUpgrade"
1217          description="wrap up a jar for inclusion in a mock upgrade">
1218    <jar
1219        destfile="jars/fortress_mock_upgrade/java/mock_upgrade.jar"
1220        basedir="jars/nested_jar_upgrade"
1221        includes="**/*"
1222        />
1223  </target>
1224
1225  <target name="createMockUpgrade" depends="createNestedJarUpgrade"
1226          description="build a mock upgrade file for testing selfupgrade">
1227    <jar
1228        destfile="FORTRESS/test/fortress_mock_upgrade.jar"
1229        basedir="jars/fortress_mock_upgrade"
1230        includes="**/*"
1231        />
1232  </target>
1233</project>
Note: See TracBrowser for help on using the browser.