root/trunk/ProjectFortress/build.xml @ 3516

Revision 3516, 46.8 KB (checked in by dr2chase, 9 months ago)

Fixed the fixed copyrights, to turn them into actual comments

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