| 21 | | <description> |
| 22 | | The Fortress interpreter, implemented in Java. |
| 23 | | </description> |
| 24 | | |
| 25 | | <!-- test --> |
| 26 | | |
| 27 | | <!-- Set global properties for this build. --> |
| 28 | | <property name="packagePrefix" value="com/sun/fortress"/> |
| 29 | | <property name="package.prefix" value="com.sun.fortress"/> |
| 30 | | <property name="interpreterPrefix" value="com/sun/fortress/interpreter"/> |
| 31 | | <property name="interpreter.prefix" value="com.sun.fortress.interpreter"/> |
| 32 | | <!-- Directories in the ${basedir} directory --> |
| 33 | | <property name="cache0" location="${basedir}/../default_repository/caches"/> |
| 34 | | <property name="cache1" location="${basedir}/../.fortress_cache"/> |
| 35 | | <property name="cache2" location="${basedir}/../.interpreter_cache"/> |
| 36 | | <property name="cache3" location="${basedir}/.interpreter_cache"/> |
| 37 | | <property name="cache4" location="${basedir}/../.syntax_cache"/> |
| 38 | | <property name="cache5" location="${basedir}/.syntax_cache"/> |
| 39 | | <property name="cache6" location="${basedir}/../.analyzed_cache"/> |
| 40 | | <property name="cache7" location="${basedir}/.analyzed_cache"/> |
| 41 | | <property name="cache8" location="${basedir}/../.presyntax_cache"/> |
| 42 | | <property name="cache9" location="${basedir}/.presyntax_cache"/> |
| 43 | | <property name="cache10" location="${basedir}/../.bytecode_cache"/> |
| 44 | | <property name="cache11" location="${basedir}/.bytecode_cache"/> |
| 45 | | <property name="cache12" location="${basedir}/../local_repository/caches"/> |
| 46 | | <property name="astgen.src" location="${basedir}/astgen"/> |
| 47 | | <property name="build" location="${basedir}/build"/> |
| 48 | | <property name="docs" location="${basedir}/docs"/> |
| 49 | | <property name="src" location="${basedir}/src"/> |
| 50 | | <property name="library" location="${basedir}/../Library"/> |
| 51 | | <property name="astgen.generators.src" location="${src}/${packagePrefix}/astgen"/> |
| 52 | | <!-- Third party jar files --> |
| 53 | | <property name="asm" location="${basedir}/third_party/asm"/> |
| 54 | | <!-- property name="astgen.third" location="${basedir}/../../astgen/jar"/ --> |
| 55 | | <property name="astgen.third" location="${basedir}/third_party/astgen"/> |
| 56 | | <property name="jsr166y" location="${basedir}/third_party/jsr166y"/> |
| 57 | | <property name="junit" location="${basedir}/third_party/junit"/> |
| 58 | | <property name="plt" location="${basedir}/third_party/plt"/> |
| 59 | | <property name="unicode.third" location="${basedir}/third_party/unicode"/> |
| 60 | | <property name="xtc" location="${basedir}/third_party/xtc"/> |
| 61 | | <property name="unsigned" location="${basedir}/third_party/unsigned"/> |
| 62 | | <!-- astgen --> |
| 63 | | <property name="generate-sourcefile" value="${astgen.src}/Fortress.ast" /> |
| 64 | | <!-- nodes --> |
| 65 | | <property name="nodesPackage" value="${packagePrefix}/nodes"/> |
| 66 | | <property name="nodes" location="${src}/${nodesPackage}"/> |
| 67 | | <property name="nodesBuild" location="${build}/${nodesPackage}"/> |
| 68 | | <!-- nodes_util --> |
| 69 | | <property name="nodesUtil" location="${src}/${packagePrefix}/nodes_util"/> |
| 70 | | <!-- parser --> |
| 71 | | <property name="parser" location="${src}/${packagePrefix}/parser"/> |
| 72 | | <property name="preparser" location="${src}/${packagePrefix}/parser/preparser"/> |
| 73 | | <property name="templateparser" location="${src}/${packagePrefix}/parser/templateparser"/> |
| 74 | | <property name="parserUtil" location="${src}/${packagePrefix}/parser_util"/> |
| 75 | | <property name="precedence" location="${parserUtil}/precedence"/> |
| 76 | | <property name="precedenceResolver" location="${parserUtil}/precedence_resolver"/> |
| 77 | | <!-- unicode --> |
| 78 | | <property name="unicodePackage" value="${packagePrefix}/unicode"/> |
| 79 | | <property name="unicode" location="${src}/${packagePrefix}/unicode"/> |
| 80 | | <property name="unicodeBuild" location="${build}/${unicodePackage}"/> |
| 81 | | <!-- useful --> |
| 82 | | <property name="usefulPackage" value="${packagePrefix}/useful"/> |
| 83 | | <!-- for fortress installation --> |
| 84 | | <property name="testFortress" location=".TEST_FORTRESS"/> |
| 85 | | <property name="installerDir" location=".installer"/> |
| 86 | | <property name="protofortress" location="${basedir}/fortress/FORTRESS"/> |
| 87 | | <property name="protofortress.lib" location="${protofortress}/lib"/> |
| 88 | | <!-- for tests --> |
| 89 | | <property name="test.results" location="${basedir}/TEST-RESULTS"/> |
| 90 | | <!-- other setting --> |
| 91 | | <property name="junitMem" value="768m"/> |
| 92 | | <property name="junit.dir" value="junit-results"/> |
| 93 | | <property environment="env"/> |
| 94 | | |
| 95 | | <path id="astgen.path"> |
| 96 | | <pathelement location="${astgen.third}/astgen.jar" /> |
| 97 | | <pathelement location="${build}" /> |
| 98 | | </path> |
| 99 | | |
| 100 | | <path id="compile.classpath"> |
| 101 | | <pathelement location="${java.home}/../lib/tools.jar"/> |
| | 29 | <description> |
| | 30 | A reference implementation of the Fortress programming language. |
| | 31 | </description> |
| | 32 | |
| | 33 | |
| | 34 | <!-- |
| | 35 | Taskdefs |
| | 36 | --> |
| | 37 | <taskdef resource="scala/tools/ant/antlib.xml"> |
| | 38 | <classpath refid="scala.classpath"/> |
| | 39 | </taskdef> |
| | 40 | |
| | 41 | |
| | 42 | <!-- |
| | 43 | Properties |
| | 44 | --> |
| | 45 | |
| | 46 | <!-- Global properties for this build. --> |
| | 47 | <property name="packagePrefix" value="com/sun/fortress"/> |
| | 48 | <property name="package.prefix" value="com.sun.fortress"/> |
| | 49 | <property name="interpreterPrefix" value="com/sun/fortress/interpreter"/> |
| | 50 | <property name="interpreter.prefix" value="com.sun.fortress.interpreter"/> |
| | 51 | <property name="blahblahblah" value="com/sun/fortress"/> |
| | 52 | |
| | 53 | <!-- Directories in the ${basedir} directory --> |
| | 54 | <property name="cache0" location="${basedir}/../default_repository/caches"/> |
| | 55 | <property name="cache1" location="${basedir}/../.fortress_cache"/> |
| | 56 | <property name="cache2" location="${basedir}/../.interpreter_cache"/> |
| | 57 | <property name="cache3" location="${basedir}/.interpreter_cache"/> |
| | 58 | <property name="cache4" location="${basedir}/../.syntax_cache"/> |
| | 59 | <property name="cache5" location="${basedir}/.syntax_cache"/> |
| | 60 | <property name="cache6" location="${basedir}/../.analyzed_cache"/> |
| | 61 | <property name="cache7" location="${basedir}/.analyzed_cache"/> |
| | 62 | <property name="cache8" location="${basedir}/../.presyntax_cache"/> |
| | 63 | <property name="cache9" location="${basedir}/.presyntax_cache"/> |
| | 64 | <property name="cache10" location="${basedir}/../.bytecode_cache"/> |
| | 65 | <property name="cache11" location="${basedir}/.bytecode_cache"/> |
| | 66 | <property name="cache12" location="${basedir}/../local_repository/caches"/> |
| | 67 | <property name="astgen.src" location="${basedir}/astgen"/> |
| | 68 | <property name="build" location="${basedir}/build"/> |
| | 69 | <property name="docs" location="${basedir}/docs"/> |
| | 70 | <property name="src" location="${basedir}/src"/> |
| | 71 | <property name="library" location="${basedir}/../Library"/> |
| | 72 | <property name="astgen.generators.src" |
| | 73 | location="${src}/${packagePrefix}/astgen"/> |
| | 74 | |
| | 75 | <!-- Third party jar files --> |
| | 76 | <property name="asm" location="${basedir}/third_party/asm"/> |
| | 77 | <property name="astgen.third" location="${basedir}/third_party/astgen"/> |
| | 78 | <property name="jsr166y" location="${basedir}/third_party/jsr166y"/> |
| | 79 | <property name="junit" location="${basedir}/third_party/junit"/> |
| | 80 | <property name="plt" location="${basedir}/third_party/plt"/> |
| | 81 | <property name="unicode.third" location="${basedir}/third_party/unicode"/> |
| | 82 | <property name="xtc" location="${basedir}/third_party/xtc"/> |
| | 83 | <property name="unsigned" location="${basedir}/third_party/unsigned"/> |
| | 84 | |
| | 85 | <!-- Scala jar files --> |
| | 86 | <property name="scala-compiler.jar" |
| | 87 | value="${basedir}/third_party/scala/scala-compiler-2.7.1.jar"/> |
| | 88 | <property name="scala-library.jar" |
| | 89 | value="${basedir}/third_party/scala/scala-library-2.7.1.jar"/> |
| | 90 | |
| | 91 | <!-- ASTGen --> |
| | 92 | <property name="generate-sourcefile" value="${astgen.src}/Fortress.ast" /> |
| | 93 | |
| | 94 | <!-- Package nodes --> |
| | 95 | <property name="nodesPackage" value="${packagePrefix}/nodes"/> |
| | 96 | <property name="scala.nodes.package" value="${packagePrefix}/scalasrc/nodes"/> |
| | 97 | <property name="nodes" location="${src}/${nodesPackage}"/> |
| | 98 | <property name="scala.nodes" location="${src}/${scala.nodes.package}"/> |
| | 99 | <property name="nodesBuild" location="${build}/${nodesPackage}"/> |
| | 100 | |
| | 101 | <!-- Package nodes_util --> |
| | 102 | <property name="nodesUtil" location="${src}/${packagePrefix}/nodes_util"/> |
| | 103 | |
| | 104 | <!-- Parser packages --> |
| | 105 | <property name="parser" location="${src}/${packagePrefix}/parser"/> |
| | 106 | <property name="preparser" location="${src}/${packagePrefix}/parser/preparser"/> |
| | 107 | <property name="templateparser" |
| | 108 | location="${src}/${packagePrefix}/parser/templateparser"/> |
| | 109 | <property name="parserUtil" location="${src}/${packagePrefix}/parser_util"/> |
| | 110 | <property name="precedence" location="${parserUtil}/precedence"/> |
| | 111 | <property name="precedenceResolver" |
| | 112 | location="${parserUtil}/precedence_resolver"/> |
| | 113 | |
| | 114 | <!-- Unicode packages --> |
| | 115 | <property name="unicodePackage" value="${packagePrefix}/unicode"/> |
| | 116 | <property name="unicode" location="${src}/${packagePrefix}/unicode"/> |
| | 117 | <property name="unicodeBuild" location="${build}/${unicodePackage}"/> |
| | 118 | |
| | 119 | <!-- Package useful --> |
| | 120 | <property name="usefulPackage" value="${packagePrefix}/useful"/> |
| | 121 | |
| | 122 | <!-- For fortress installation --> |
| | 123 | <property name="testFortress" location=".TEST_FORTRESS"/> |
| | 124 | <property name="installerDir" location=".installer"/> |
| | 125 | <property name="protofortress" location="${basedir}/fortress/FORTRESS"/> |
| | 126 | <property name="protofortress.lib" location="${protofortress}/lib"/> |
| | 127 | |
| | 128 | <!-- Instrumentation --> |
| | 129 | <property name="instrumentation.package" |
| | 130 | value="${package.prefix}.parser_util.instrumentation"/> |
| | 131 | <property name="instrumentationPackage" |
| | 132 | value="${packagePrefix}/parser_util/instrumentation"/> |
| | 133 | <property name="instrumentation.outfile" |
| | 134 | location="${parserUtil}/instrumentation/coverage-report.txt"/> |
| | 135 | <property name="instrumentation.transient" |
| | 136 | location="${parserUtil}/instrumentation/transient.txt"/> |
| | 137 | |
| | 138 | <!-- For tests --> |
| | 139 | <property name="test.results" location="${basedir}/TEST-RESULTS"/> |
| | 140 | |
| | 141 | <!-- Other settings --> |
| | 142 | <property name="junitMem" value="768m"/> |
| | 143 | <property name="junit.dir" value="junit-results"/> |
| | 144 | <property environment="env"/> |
| | 145 | <condition property="correct.environment"> |
| | 146 | <and> |
| | 147 | <equals arg1="${ant.java.version}" arg2="1.5"/> |
| | 148 | <equals arg1="${env.ANT_CALLED_FROM_SCRIPT}" arg2='yes'/> |
| | 149 | </and> |
| | 150 | </condition> |
| | 151 | |
| | 152 | |
| | 153 | <!-- |
| | 154 | Paths |
| | 155 | --> |
| | 156 | <path id="scala.classpath"> |
| | 157 | <pathelement location="${scala-compiler.jar}"/> |
| | 158 | <pathelement location="${scala-library.jar}"/> |
| | 159 | </path> |
| | 160 | |
| | 161 | <path id="astgen.path"> |
| | 162 | <path refid="scala.classpath"/> |
| | 163 | <pathelement location="${astgen.third}/astgen.jar" /> |
| | 164 | <pathelement location="${build}" /> |
| | 165 | </path> |
| | 166 | |
| | 167 | <path id="astgen.classpath"> |
| | 168 | <path refid="scala.classpath"/> |
| | 169 | <pathelement location="${build}"/> |
| | 170 | <pathelement location="${astgen.third}/astgen.jar"/> |
| | 171 | </path> |
| | 172 | |
| | 173 | <path id="instrumentedparser.classpath"> |
| | 174 | <path refid="scala.classpath"/> |
| | 175 | <pathelement location="${build}"/> |
| | 176 | <pathelement location="${xtc}/xtc.jar"/> |
| | 177 | <pathelement location="${plt}/plt.jar"/> |
| | 178 | </path> |
| | 179 | |
| | 180 | <path id="compile.classpath"> |
| | 181 | <path refid="scala.classpath"/> |
| 111 | | </path> |
| 112 | | |
| 113 | | <path id="astgen.classpath"> |
| 114 | | <pathelement location="${build}"/> |
| 115 | | <pathelement location="${astgen.third}/astgen.jar"/> |
| 116 | | </path> |
| 117 | | |
| 118 | | <property name="instrumentation.package" |
| 119 | | value="${package.prefix}.parser_util.instrumentation"/> |
| 120 | | <property name="instrumentationPackage" |
| 121 | | value="${packagePrefix}/parser_util/instrumentation"/> |
| 122 | | <property name="instrumentation.outfile" |
| 123 | | location="${parserUtil}/instrumentation/coverage-report.txt"/> |
| 124 | | <property name="instrumentation.transient" |
| 125 | | location="${parserUtil}/instrumentation/transient.txt"/> |
| 126 | | |
| 127 | | <path id="instrumentedparser.classpath"> |
| 128 | | <pathelement location="${build}"/> |
| 129 | | <pathelement location="${xtc}/xtc.jar"/> |
| 130 | | <pathelement location="${plt}/plt.jar"/> |
| 131 | | </path> |
| 132 | | |
| 133 | | <property name="blahblahblah" value="com/sun/fortress"/> |
| 134 | | |
| 135 | | <target name="help"> |
| 136 | | <echo message="ant checkEnv, checkNodesUptodate, checkOperatorsUptodate, |
| 137 | | checkParserUptodate, clean, cleanCache, compile, compileCommon, compileCommonLint, |
| 138 | | compileLint, doc, grammarCoverage, help, init, interpreter-jar, makeAST, operatorsGen, |
| 139 | | fortressparser, preparser, parser, reportNotPassing, systemProperties, |
| 140 | | test, testAll, testDemos, testSystem, |
| 141 | | testOnly -DtestPattern='some pattern', testCruiseControl"/> |
| 142 | | <echo message="If you are building Fortress, you want ant compile or ant test."/> |
| 143 | | </target> |
| 144 | | |
| 145 | | <condition property="correct.environment"> |
| 146 | | <and> |
| 147 | | <equals arg1="${ant.java.version}" arg2="1.5"/> |
| 148 | | <equals arg1="${env.ANT_CALLED_FROM_SCRIPT}" arg2='yes'/> |
| 149 | | </and> |
| | 191 | </path> |
| | 192 | |
| | 193 | |
| | 194 | <!-- |
| | 195 | Targets |
| | 196 | --> |
| | 197 | <target name="help"> |
| | 198 | <echo message="ant checkEnv, checkNodesUptodate, checkOperatorsUptodate, |
| | 199 | checkParserUptodate, clean, cleanCache, compile, |
| | 200 | compileCommon, compileCommonLint, compileLint, doc, |
| | 201 | grammarCoverage, help, init, interpreter-jar, |
| | 202 | makeAST, operatorsGen, fortressparser, preparser, |
| | 203 | parser, reportNotPassing, systemProperties, test, |
| | 204 | testAll, testDemos, testSystem, testOnly |
| | 205 | -DtestPattern='some pattern', testCruiseControl"/> |
| | 206 | <echo message="If you are building Fortress, you want ant compile or ant test."/> |
| | 207 | </target> |
| | 208 | |
| | 209 | <target name="systemProperties"> |
| | 210 | <echo message="Environment variables set correctly? ${correct.environment}"/> |
| | 211 | <echo message="Ant Java version: ${ant.java.version}"/> |
| | 212 | <echo message="Ant called from script? ${env.ANT_CALLED_FROM_SCRIPT}"/> |
| | 213 | <echo message="ANT_ARGS: ${env.ANT_ARGS}"/> |
| | 214 | <echo message="ANT_OPTS: ${env.ANT_OPTS}"/> |
| | 215 | <echo message="Java Runtime Environment |
| | 216 | version: ${java.version}"/> |
| | 217 | <echo message="Java Runtime Environment |
| | 218 | vendor: ${java.vendor}"/> |
| | 219 | <echo message="Java Runtime Environment |
| | 220 | vendor URL: ${java.vendor.url}"/> |
| | 221 | <echo message="Java installation |
| | 222 | directory: ${java.home}"/> |
| | 223 | <echo message="Java Virtual Machine |
| | 224 | specification version: |
| | 225 | ${java.vm.specification.version}"/> |
| | 226 | <echo message="Java Virtual Machine |
| | 227 | specification vendor: |
| | 228 | ${java.vm.specification.vendor}"/> |
| | 229 | <echo message="Java Virtual Machine |
| | 230 | specification name: |
| | 231 | ${java.vm.specification.name}"/> |
| | 232 | <echo message="Java Virtual Machine |
| | 233 | implementation version: |
| | 234 | ${java.vm.version}"/> |
| | 235 | <echo message="Java Virtual Machine |
| | 236 | implementation vendor: |
| | 237 | ${java.vm.vendor}"/> |
| | 238 | <echo message="Java Virtual Machine |
| | 239 | implementation name: ${java.vm.name}"/> |
| | 240 | <echo message="Java Runtime Environment |
| | 241 | specification version: |
| | 242 | ${java.specification.version}"/> |
| | 243 | <echo message="Java Runtime Environment |
| | 244 | specification vendor: |
| | 245 | ${java.specification.vendor}"/> |
| | 246 | <echo message="Java Runtime Environment |
| | 247 | specification name: |
| | 248 | ${java.specification.name}"/> |
| | 249 | <echo message="Java class format version |
| | 250 | number: ${java.class.version}"/> |
| | 251 | <echo message="Java class path: |
| | 252 | ${java.class.path}"/> |
| | 253 | <echo message="List of paths to search when |
| | 254 | loading libraries: ${java.library.path}"/> |
| | 255 | <echo message="Path of extension directory |
| | 256 | or directories: ${java.ext.dirs}"/> |
| | 257 | <echo message="Default temp file path: |
| | 258 | ${java.io.tmpdir}"/> |
| | 259 | <echo message="Operating system name: |
| | 260 | ${os.name}"/> |
| | 261 | <echo message="Operating system |
| | 262 | architecture: ${os.arch}"/> |
| | 263 | <echo message="Operating system version: |
| | 264 | ${os.version}"/> |
| | 265 | </target> |
| | 266 | |
| | 267 | <target name="checkEnv"> |
| | 268 | <echo message="Environment variables set correctly? ${correct.environment}"/> |
| | 269 | <fail unless="correct.environment" |
| | 270 | message="ERROR: This build script requires specific command-line arguments to Ant. Please call it using the script provided at ${basedir}/ant."/> |
| | 271 | </target> |
| | 272 | |
| | 273 | <target name="init"> |
| | 274 | <echo message="basedir: ${basedir}"/> |
| | 275 | <!-- Create the time stamp. --> |
| | 276 | <tstamp/> |
| | 277 | <!-- Create the build directory structure used by compile. --> |
| | 278 | <mkdir dir="${build}"/> |
| | 279 | <mkdir dir="${junit.dir}"/> |
| | 280 | </target> |
| | 281 | |
| | 282 | <target name="clean" depends="cleanCache" |
| | 283 | description="Delete the ${build} directory tree and generated files."> |
| | 284 | <delete dir="${build}"/> |
| | 285 | <delete dir="${nodes}"/> |
| | 286 | <delete dir="${junit.dir}"/> |
| | 287 | |
| | 288 | <!-- No longer needed, but eases the upgrade--> |
| | 289 | <delete file="${nodesUtil}/BaseNodeMaker.java"/> |
| | 290 | <!-- No longer needed, but eases the upgrade--> |
| | 291 | <delete file="${nodesUtil}/InterfaceMaker.java"/> |
| | 292 | <delete file="${parser}/Fortress.java"/> |
| | 293 | <delete file="${parser}/FortressInstrumented.java"/> |
| | 294 | <delete file="${preparser}/PreFortress.java"/> |
| | 295 | <delete file="${templateparser}/TemplateParser.java"/> |
| | 296 | <delete file="${precedenceResolver}/Operators.java"/> |
| | 297 | <!-- No longer needed, but eases the upgrade--> |
| | 298 | <delete file="${src}/com/sun/fortress/parser/precedence/resolver/Operators.java"/> |
| | 299 | <delete file="${instrumentation.outfile}"/> |
| | 300 | <delete file="${library}/FortressAst.fsi" /> |
| | 301 | <delete file="${library}/FortressAst.fss" /> |
| | 302 | <delete file="${astgen.src}/FortressAst.scala" /> |
| | 303 | <delete file="FortressLibrary.ast"/> |
| | 304 | <delete file="FortressLibrary.tfs"/> |
| | 305 | <delete file="testFile.txt"/> |
| | 306 | <delete dir="${basedir}/test-tmp" /> |
| | 307 | <delete> |
| | 308 | <fileset dir="src" includes="**/*.class" /> |
| | 309 | </delete> |
| | 310 | </target> |
| | 311 | |
| | 312 | <target name="cleanCache" |
| | 313 | description="Delete any cached Fortress ASTs in the development tree"> |
| | 314 | <delete dir="${cache0}"/> |
| | 315 | <delete dir="${cache1}"/> |
| | 316 | <delete dir="${cache2}"/> |
| | 317 | <delete dir="${cache3}"/> |
| | 318 | <delete dir="${cache4}"/> |
| | 319 | <delete dir="${cache5}"/> |
| | 320 | <delete dir="${cache6}"/> |
| | 321 | <delete dir="${cache7}"/> |
| | 322 | <delete dir="${cache8}"/> |
| | 323 | <delete dir="${cache9}"/> |
| | 324 | <delete dir="${cache10}"/> |
| | 325 | <delete dir="${cache11}"/> |
| | 326 | <delete dir="${cache12}"/> |
| | 327 | </target> |
| | 328 | |
| | 329 | <!-- Generation of Operators.java depends only on the files listed below. |
| | 330 | Note that there are class files it depends on; if these class files are |
| | 331 | not up to date with respect to their sources, they are themselves |
| | 332 | recompiled by the compileCommon target.--> |
| | 333 | <target name="checkOperatorsUptodate" depends="init, compileCommon"> |
| | 334 | <condition property="operators.uptodate"> |
| | 335 | <and> |
| | 336 | <uptodate srcfile="${unicode.third}/UnicodeData.500.txt" |
| | 337 | targetfile="${precedenceResolver}/Operators.java"/> |
| | 338 | <uptodate srcfile="${precedenceResolver}/operators.txt" |
| | 339 | targetfile="${precedenceResolver}/Operators.java"/> |
| | 340 | <uptodate srcfile="${unicodeBuild}/OperatorStuffGenerator.class" |
| | 341 | targetfile="${precedenceResolver}/Operators.java"/> |
| | 342 | <uptodate srcfile="${unicodeBuild}/Element.class" |
| | 343 | targetfile="${precedenceResolver}/Operators.java"/> |
| | 344 | </and> |
| 151 | | |
| 152 | | <target name="systemProperties"> |
| 153 | | <echo message="Environment variables set correctly? ${correct.environment}"/> |
| 154 | | <echo message="Ant Java version: ${ant.java.version}"/> |
| 155 | | <echo message="Ant called from script? ${env.ANT_CALLED_FROM_SCRIPT}"/> |
| 156 | | <echo message="ANT_ARGS: ${env.ANT_ARGS}"/> |
| 157 | | <echo message="ANT_OPTS: ${env.ANT_OPTS}"/> |
| 158 | | <echo message="Java Runtime Environment |
| 159 | | version: ${java.version}"/> |
| 160 | | <echo message="Java Runtime Environment |
| 161 | | vendor: ${java.vendor}"/> |
| 162 | | <echo message="Java Runtime Environment |
| 163 | | vendor URL: ${java.vendor.url}"/> |
| 164 | | <echo message="Java installation |
| 165 | | directory: ${java.home}"/> |
| 166 | | <echo message="Java Virtual Machine |
| 167 | | specification version: |
| 168 | | ${java.vm.specification.version}"/> |
| 169 | | <echo message="Java Virtual Machine |
| 170 | | specification vendor: |
| 171 | | ${java.vm.specification.vendor}"/> |
| 172 | | <echo message="Java Virtual Machine |
| 173 | | specification name: |
| 174 | | ${java.vm.specification.name}"/> |
| 175 | | <echo message="Java Virtual Machine |
| 176 | | implementation version: |
| 177 | | ${java.vm.version}"/> |
| 178 | | <echo message="Java Virtual Machine |
| 179 | | implementation vendor: |
| 180 | | ${java.vm.vendor}"/> |
| 181 | | <echo message="Java Virtual Machine |
| 182 | | implementation name: ${java.vm.name}"/> |
| 183 | | <echo message="Java Runtime Environment |
| 184 | | specification version: |
| 185 | | ${java.specification.version}"/> |
| 186 | | <echo message="Java Runtime Environment |
| 187 | | specification vendor: |
| 188 | | ${java.specification.vendor}"/> |
| 189 | | <echo message="Java Runtime Environment |
| 190 | | specification name: |
| 191 | | ${java.specification.name}"/> |
| 192 | | <echo message="Java class format version |
| 193 | | number: ${java.class.version}"/> |
| 194 | | <echo message="Java class path: |
| 195 | | ${java.class.path}"/> |
| 196 | | <echo message="List of paths to search when |
| 197 | | loading libraries: ${java.library.path}"/> |
| 198 | | <echo message="Path of extension directory |
| 199 | | or directories: ${java.ext.dirs}"/> |
| 200 | | <echo message="Default temp file path: |
| 201 | | ${java.io.tmpdir}"/> |
| 202 | | <echo message="Operating system name: |
| 203 | | ${os.name}"/> |
| 204 | | <echo message="Operating system |
| 205 | | architecture: ${os.arch}"/> |
| 206 | | <echo message="Operating system version: |
| 207 | | ${os.version}"/> |
| 208 | | </target> |
| 209 | | |
| 210 | | <target name="checkEnv"> |
| 211 | | <echo message="Environment variables set correctly? ${correct.environment}"/> |
| 212 | | <fail unless="correct.environment" |
| 213 | | message='ERROR: This build script requires specific command-line arguments to Ant. Please call it using the script provided at ${basedir}/ant.'/> |
| 214 | | </target> |
| 215 | | |
| 216 | | <target name="init"> |
| 217 | | <echo message="basedir: ${basedir}"/> |
| 218 | | <!-- Create the time stamp. --> |
| 219 | | <tstamp/> |
| 220 | | <!-- Create the build directory structure used by compile. --> |
| 221 | | <mkdir dir="${build}"/> |
| 222 | | <mkdir dir="${junit.dir}"/> |
| 223 | | </target> |
| 224 | | |
| 225 | | <target name="clean" depends="cleanCache" |
| 226 | | description="Delete the ${build} directory tree and generated files."> |
| 227 | | <delete dir="${build}"/> |
| 228 | | <delete dir="${nodes}"/> |
| 229 | | <delete dir="${junit.dir}"/> |
| 230 | | |
| 231 | | <!-- No longer needed, but eases the upgrade--> |
| 232 | | <delete file="${nodesUtil}/BaseNodeMaker.java"/> |
| 233 | | <!-- No longer needed, but eases the upgrade--> |
| 234 | | <delete file="${nodesUtil}/InterfaceMaker.java"/> |
| 235 | | <delete file="${parser}/Fortress.java"/> |
| 236 | | <delete file="${parser}/FortressInstrumented.java"/> |
| 237 | | <delete file="${preparser}/PreFortress.java"/> |
| 238 | | <delete file="${templateparser}/TemplateParser.java"/> |
| 239 | | <delete file="${precedenceResolver}/Operators.java"/> |
| 240 | | <!-- No longer needed, but eases the upgrade--> |
| 241 | | <delete file="${src}/com/sun/fortress/parser/precedence/resolver/Operators.java"/> |
| 242 | | <delete file="${instrumentation.outfile}"/> |
| 243 | | <delete file="${library}/FortressAst.fsi" /> |
| 244 | | <delete file="${library}/FortressAst.fss" /> |
| 245 | | <delete file="${astgen.src}/FortressAst.scala" /> |
| 246 | | <delete file="FortressLibrary.ast"/> |
| 247 | | <delete file="FortressLibrary.tfs"/> |
| 248 | | <delete file="testFile.txt"/> |
| 249 | | <delete dir="${basedir}/test-tmp" /> |
| 250 | | <delete> |
| 251 | | <fileset dir="src" includes="**/*.class" /> |
| 252 | | </delete> |
| 253 | | </target> |
| 254 | | |
| 255 | | <target name="cleanCache" |
| 256 | | description="Delete any cached Fortress ASTs in the development tree"> |
| 257 | | <delete dir="${cache0}"/> |
| 258 | | <delete dir="${cache1}"/> |
| 259 | | <delete dir="${cache2}"/> |
| 260 | | <delete dir="${cache3}"/> |
| 261 | | <delete dir="${cache4}"/> |
| 262 | | <delete dir="${cache5}"/> |
| 263 | | <delete dir="${cache6}"/> |
| 264 | | <delete dir="${cache7}"/> |
| 265 | | <delete dir="${cache8}"/> |
| 266 | | <delete dir="${cache9}"/> |
| 267 | | <delete dir="${cache10}"/> |
| 268 | | <delete dir="${cache11}"/> |
| 269 | | <delete dir="${cache12}"/> |
| 270 | | </target> |
| 271 | | |
| 272 | | <!-- Generation of Operators.java depends only on the files listed below. |
| 273 | | Note that there are class files it depends on; if these class files are |
| 274 | | not up to date with respect to their sources, they are themselves |
| 275 | | recompiled by the compileCommon target.--> |
| 276 | | <target name="checkOperatorsUptodate" depends="init, compileCommon"> |
| 277 | | <condition property="operators.uptodate"> |
| 278 | | <and> |
| 279 | | <uptodate srcfile="${unicode.third}/UnicodeData.500.txt" |
| 280 | | targetfile="${precedenceResolver}/Operators.java"/> |
| 281 | | <uptodate srcfile="${precedenceResolver}/operators.txt" |
| 282 | | targetfile="${precedenceResolver}/Operators.java"/> |
| 283 | | <uptodate srcfile="${unicodeBuild}/OperatorStuffGenerator.class" |
| 284 | | targetfile="${precedenceResolver}/Operators.java"/> |
| 285 | | <uptodate srcfile="${unicodeBuild}/Element.class" |
| 286 | | targetfile="${precedenceResolver}/Operators.java"/> |
| 287 | | </and> |
| 288 | | </condition> |
| 289 | | <echo message="Operators up to date? ${operators.uptodate}"/> |
| 290 | | </target> |
| 291 | | |
| 292 | | <target name="operatorsGen" unless="operators.uptodate" |
| 293 | | depends="init, compileCommon, checkOperatorsUptodate" |
| 294 | | description="Automatically generate visitors for AST nodes."> |
| 295 | | <echo message="Regenerating operators"/> |
| 296 | | <java classname="${package.prefix}.unicode.OperatorStuffGenerator" |
| 297 | | fork="true"> |
| 298 | | <classpath> |
| 299 | | <pathelement location="${build}"/> |
| 300 | | <pathelement location="${basedir}/third_party/plt/plt.jar"/> |
| 301 | | </classpath> |
| 302 | | </java> |
| 303 | | </target> |
| 304 | | |
| 305 | | <target name="DumpProperties" |
| 306 | | description="Dump properties as seen by a Java program."> |
| 307 | | <java classname="${package.prefix}.repository.DumpProperties" |
| 308 | | fork="true"> |
| 309 | | <sysproperty key="DEBUG" value="true"/> |
| 310 | | <classpath> |
| 311 | | <pathelement location="${build}"/> |
| 312 | | </classpath> |
| 313 | | </java> |
| 314 | | </target> |
| 315 | | |
| 316 | | <target name="checkAstgen"> |
| 317 | | <condition property="astgenerators.uptodate"> |
| 318 | | <uptodate targetfile="${basedir}/build/com/sun/fortress/astgen/FortressAstGenerator.class"> |
| 319 | | <srcfiles dir="${basedir}/src/com/sun/fortress/astgen/" includes="*.java"/> |
| 320 | | </uptodate> |
| 321 | | </condition> |
| 322 | | </target> |
| 323 | | |
| 324 | | <target name="astGenerators" unless="astgenerators.uptodate" depends="init,checkAstgen" |
| 325 | | description="Compile all AstGen custom generators."> |
| 326 | | <depend srcdir="${astgen.generators.src}" |
| 327 | | destdir="${build}" |
| 328 | | closure="yes" |
| 329 | | cache="${basedir}/.dependencies"/> |
| 330 | | <javac |
| 331 | | srcdir="${astgen.generators.src}" |
| | 346 | <echo message="Operators up to date? ${operators.uptodate}"/> |
| | 347 | </target> |
| | 348 | |
| | 349 | <target name="operatorsGen" unless="operators.uptodate" |
| | 350 | depends="init, compileCommon, checkOperatorsUptodate" |
| | 351 | description="Automatically generate visitors for AST nodes."> |
| | 352 | <echo message="Regenerating operators"/> |
| | 353 | <java classname="${package.prefix}.unicode.OperatorStuffGenerator" |
| | 354 | fork="true"> |
| | 355 | <classpath> |
| | 356 | <pathelement location="${build}"/> |
| | 357 | <pathelement location="${basedir}/third_party/plt/plt.jar"/> |
| | 358 | </classpath> |
| | 359 | </java> |
| | 360 | </target> |
| | 361 | |
| | 362 | <target name="DumpProperties" |
| | 363 | description="Dump properties as seen by a Java program."> |
| | 364 | <java classname="${package.prefix}.repository.DumpProperties" |
| | 365 | fork="true"> |
| | 366 | <sysproperty key="DEBUG" value="true"/> |
| | 367 | <classpath> |
| | 368 | <pathelement location="${build}"/> |
| | 369 | </classpath> |
| | 370 | </java> |
| | 371 | </target> |
| | 372 | |
| | 373 | <target name="checkAstgen"> |
| | 374 | <condition property="astgenerators.uptodate"> |
| | 375 | <uptodate targetfile="${basedir}/build/com/sun/fortress/astgen/FortressAstGenerator.class"> |
| | 376 | <srcfiles dir="${basedir}/src/com/sun/fortress/astgen/" includes="*.java"/> |
| | 377 | </uptodate> |
| | 378 | </condition> |
| | 379 | </target> |
| | 380 | |
| | 381 | <target name="astGenerators" |
| | 382 | unless="astgenerators.uptodate" |
| | 383 | depends="init,checkAstgen" |
| | 384 | description="Compile all ASTGen custom generators."> |
| | 385 | <depend srcdir="${astgen.generators.src}" |
| 333 | | source="1.5" |
| 334 | | debug="true" |
| 335 | | includeantruntime="false" |
| 336 | | fork="true" |
| 337 | | memorymaximumsize="256M"> |
| 338 | | <!-- Uncomment the following line to print unchecked warnings |
| 339 | | (here and in the 'compileCommon' target. --> |
| 340 | | <!-- <compilerarg value="-Xlint:unchecked"/> --> |
| 341 | | <classpath refid="astgen.classpath"/> |
| 342 | | <include name="**/*.java"/> |
| 343 | | <exclude name="${usefulPackage}/*.java"/> |
| 344 | | <exclude name="${unicodePackage}/*.java"/> |
| 345 | | </javac> |
| 346 | | </target> |
| 347 | | |
| 348 | | <target name="checkNodesUptodate" depends="astGenerators"> |
| 349 | | <condition property="nodes.uptodate"> |
| | 387 | closure="yes" |
| | 388 | cache="${basedir}/.dependencies"/> |
| | 389 | <javac |
| | 390 | srcdir="${astgen.generators.src}" |
| | 391 | destdir="${build}" |
| | 392 | source="1.5" |
| | 393 | debug="true" |
| | 394 | includeantruntime="false" |
| | 395 | fork="true" |
| | 396 | memorymaximumsize="256M"> |
| | 397 | <!-- Uncomment the following line to print unchecked warnings |
| | 398 | (here and in the 'compileCommon' target. --> |
| | 399 | <!-- <compilerarg value="-Xlint:unchecked"/> --> |
| | 400 | <classpath refid="astgen.classpath"/> |
| | 401 | <include name="**/*.java"/> |
| | 402 | <exclude name="${usefulPackage}/*.java"/> |
| | 403 | <exclude name="${unicodePackage}/*.java"/> |
| | 404 | </javac> |
| | 405 | <scalac |
| | 406 | srcdir="${astgen.generators.src}" |
| | 407 | destdir="${build}" |
| | 408 | classpathref="astgen.classpath"> |
| | 409 | <include name="**/*.scala"/> |
| | 410 | <exclude name="${usefulPackage}/*.scala"/> |
| | 411 | <exclude name="${unicodePackage}/*.scala"/> |
| | 412 | </scalac> |
| | 413 | </target> |
| | 414 | |
| | 415 | <target name="checkNodesUptodate" depends="astGenerators"> |
| | 416 | <condition property="nodes.uptodate"> |
| | 417 | <and> |
| | 418 | <available file="${nodes}/AbstractNode.java"/> |
| | 419 | <uptodate srcfile="${astgen.src}/Fortress.ast" |
| | 420 | targetfile="${nodes}/AbstractNode.java"/> |
| | 421 | <available file="${library}/FortressAst.fsi" /> |
| | 422 | <uptodate srcfile="${astgen.src}/Fortress.ast" |
| | 423 | targetfile="${library}/FortressAst.fsi" /> |
| | 424 | <available file="${library}/FortressAst.fss" /> |
| | 425 | <uptodate srcfile="${astgen.src}/Fortress.ast" |
| | 426 | targetfile="${library}/FortressAst.fss" /> |
| | 427 | <uptodate targetfile="${library}/FortressAst.fsi"> |
| | 428 | <srcfiles dir="${basedir}/src/com/sun/fortress/astgen/" includes="**/*.java"/> |
| | 429 | </uptodate> |
| | 430 | </and> |
| | 431 | </condition> |
| | 432 | <echo message="Nodes up to date? ${nodes.uptodate}"/> |
| | 433 | </target> |
| | 434 | |
| | 435 | <taskdef name="astgen" classpath="${astgen.third}/astgen.jar;${build}" |
| | 436 | classname="edu.rice.cs.astgen.AntTask"/> |
| | 437 | |
| | 438 | <target name="makeAST" unless="nodes.uptodate" depends="checkNodesUptodate" |
| | 439 | description="Automatically generate AST nodes."> |
| | 440 | <echo message="Processing ${generate-sourcefile}" /> |
| | 441 | <astgen file="${generate-sourcefile}" /> |
| | 442 | <move todir="${nodes}"> |
| | 443 | <fileset dir="${astgen.src}"> |
| | 444 | <include name="**/*.java"/> |
| | 445 | <exclude name="**/Fortress.ast"/> |
| | 446 | </fileset> |
| | 447 | </move> |
| | 448 | <move todir="${library}"> |
| | 449 | <fileset dir="${astgen.src}"> |
| | 450 | <include name="FortressAst.fss" /> |
| | 451 | <include name="FortressAst.fsi" /> |
| | 452 | </fileset> |
| | 453 | </move> |
| | 454 | <move todir="${scala.nodes}"> |
| | 455 | <fileset dir="${astgen.src}"> |
| | 456 | <include name="FortressAst.scala" /> |
| | 457 | </fileset> |
| | 458 | </move> |
| | 459 | </target> |
| | 460 | |
| | 461 | <target name="compile" depends="compileCommon, makeAST, parser, operatorsGen" |
| | 462 | description="Compile all Fortress code."> |
| | 463 | <depend srcdir="${src}" |
| | 464 | destdir="${build}" |
| | 465 | closure="yes" |
| | 466 | cache="${basedir}/.dependencies"/> |
| | 467 | <javac |
| | 468 | srcdir="${src}" |
| | 469 | destdir="${build}" |
| | 470 | source="1.5" |
| | 471 | debug="true" |
| | 472 | includeantruntime="false" |
| | 473 | fork="true" |
| | 474 | memorymaximumsize="256M"> |
| | 475 | <!-- Uncomment the following line to print unchecked warnings |
| | 476 | (here and in the 'compileCommon' target. --> |
| | 477 | <!-- <compilerarg value="-Xlint:unchecked"/> --> |
| | 478 | <classpath refid="compile.classpath"/> |
| | 479 | <include name="**/*.java"/> |
| | 480 | <exclude name="${usefulPackage}/*.java"/> |
| | 481 | <exclude name="${unicodePackage}/*.java"/> |
| | 482 | </javac> |
| | 483 | <scalac |
| | 484 | srcdir="${src}" |
| | 485 | destdir="${build}" |
| | 486 | classpathref="compile.classpath"> |
| | 487 | <include name="**/*.scala"/> |
| | 488 | </scalac> |
| | 489 | </target> |
| | 490 | |
| | 491 | <target name="check.blas" depends="init"> |
| | 492 | <javac destdir="${build}" srcdir="${src}/com/sun/fortress/numerics"> |
| | 493 | <classpath refid="compile.classpath"/> |
| | 494 | </javac> |
| | 495 | <scalac |
| | 496 | srcdir="${src}/com/sun/fortress/numerics" |
| | 497 | destdir="${build}" |
| | 498 | classpathref="compile.classpath"> |
| | 499 | <include name="**/*.scala"/> |
| | 500 | </scalac> |
| | 501 | |
| | 502 | <java failonerror="true" |
| | 503 | classname="com.sun.fortress.numerics.CheckBlasEnvironment"> |
| | 504 | <classpath refid="compile.classpath"/> |
| | 505 | </java> |
| | 506 | </target> |
| | 507 | |
| | 508 | <target name="check.linux"> |
| | 509 | <condition property="blas.islinux"> |
| | 510 | <equals arg1="${os.name}" arg2="Linux" /> |
| | 511 | </condition> |
| | 512 | </target> |
| | 513 | |
| | 514 | <target name="blas.linux" depends="check.linux" if="blas.islinux"> |
| | 515 | <echo message="Generating C header and stub files." /> |
| | 516 | <javah class="com.sun.fortress.numerics.Blas" |
| | 517 | destdir="c" |
| | 518 | classpath="build" |
| | 519 | /> |
| | 520 | <echo message="Now compiling C stubs for blas on arch linux."/> |
| | 521 | <exec executable="gcc" failonerror="true"> |
| | 522 | <arg value="-fPIC" /> |
| | 523 | <arg value="-Ic" /> |
| | 524 | <arg value="-I${env.BLAS_INCLUDE}" /> |
| | 525 | <arg value="-L${env.BLAS_LIB}" /> |
| | 526 | <arg value="-I${env.JAVA_HOME}/include" /> |
| | 527 | <arg value="-I${env.JAVA_HOME}/include/linux" /> |
| | 528 | <arg value="c/blas.c" /> |
| | 529 | <arg value="-lcblas" /> |
| | 530 | <arg value="-lblas" /> |
| | 531 | <arg value="-shared" /> |
| | 532 | <arg value="-olibblas.so" /> |
| | 533 | </exec> |
| | 534 | </target> |
| | 535 | |
| | 536 | <target name="check.osx"> |
| | 537 | <condition property="blas.is.osx"> |
| | 538 | <equals arg1="${os.name}" arg2="Mac OS X" /> |
| | 539 | </condition> |
| | 540 | </target> |
| | 541 | |
| | 542 | <target name="blas.osx" depends="check.osx" if="blas.is.osx"> |
| | 543 | <echo message="Generating C header and stub files." /> |
| | 544 | <javah class="com.sun.fortress.numerics.Blas" |
| | 545 | destdir="c" |
| | 546 | classpath="build" |
| | 547 | /> |
| | 548 | <echo message="Now compiling C stubs for blas on arch OS X."/> |
| | 549 | <exec executable="gcc" failonerror="true"> |
| | 550 | <arg line="-D OSX" /> |
| | 551 | <arg value="-fPIC" /> |
| | 552 | <arg value="-Ic" /> |
| | 553 | <arg line="-framework Accelerate" /> |
| | 554 | <arg value="-I${env.JAVA_LIB}/Headers" /> |
| | 555 | <arg value="c/blas.c" /> |
| | 556 | <arg value="-lcblas" /> |
| | 557 | <arg value="-lblas" /> |
| | 558 | <arg value="-shared" /> |
| | 559 | <arg value="-bundle" /> |
| | 560 | <arg line="-o libblas.dylib" /> |
| | 561 | </exec> |
| | 562 | </target> |
| | 563 | |
| | 564 | <target name="check.sunos"> |
| | 565 | <condition property="blas.is.sunos"> |
| | 566 | <equals arg1="${os.name}" arg2="SunOS" /> |
| | 567 | </condition> |
| | 568 | </target> |
| | 569 | |
| | 570 | <target name="blas.sunos" depends="check.sunos" if="blas.is.sunos"> |
| | 571 | <echo message="Generating C header and stub files." /> |
| | 572 | <javah class="com.sun.fortress.numerics.Blas" |
| | 573 | destdir="c" |
| | 574 | classpath="build" |
| | 575 | /> |
| | 576 | <echo message="Now compiling C stubs for blas on arch SunOS."/> |
| | 577 | <exec executable="cc" failonerror="true"> |
| | 578 | <arg line="-D SUNOS" /> |
| | 579 | <arg value="-fPIC" /> |
| | 580 | <arg value="-Ic" /> |
| | 581 | <arg value="-I${env.JAVA_HOME}/include" /> |
| | 582 | <arg value="-I${env.JAVA_HOME}/include/solaris" /> |
| | 583 | <arg value="c/sunperf_blas.c" /> |
| | 584 | <arg value="-shared" /> |
| | 585 | <arg value="-dalign" /> |
| | 586 | <arg value="-xlic_lib=sunperf" /> |
| | 587 | <arg value="-olibblas.so" /> |
| | 588 | </exec> |
| | 589 | </target> |
| | 590 | |
| | 591 | <target name="blas" depends="check.blas,blas.linux,blas.osx,blas.sunos"></target> |
| | 592 | |
| | 593 | <target name="compileLint" |
| | 594 | depends="compileCommonLint, makeAST, parser, operatorsGen" |
| | 595 | description="Compile all interpreter code."> |
| | 596 | <depend srcdir="${src}" |
| | 597 | destdir="${build}" |
| | 598 | closure="yes" |
| | 599 | cache="${basedir}/.dependencies"/> |
| | 600 | <javac |
| | 601 | srcdir="${src}" |
| | 602 | destdir="${build}" |
| | 603 | source="1.5" |
| | 604 | debug="true" |
| | 605 | includeantruntime="false" |
| | 606 | fork="true" |
| | 607 | memorymaximumsize="256M"> |
| | 608 | <!-- Uncomment the following line to print unchecked warnings. --> |
| | 609 | <classpath refid="compile.classpath"/> |
| | 610 | <compilerarg value="-Xlint:unchecked"/> |
| | 611 | <include name="**/*.java"/> |
| | 612 | <exclude name="${usefulPackage}/*.java"/> |
| | 613 | <exclude name="${unicodePackage}/*.java"/> |
| | 614 | </javac> |
| | 615 | <scalac |
| | 616 | srcdir="${src}" |
| | 617 | destdir="${build}" |
| | 618 | classpathref="compile.classpath"> |
| | 619 | <include name="**/*.scala"/> |
| | 620 | <exclude name="${usefulPackage}/*.scala"/> |
| | 621 | <exclude name="${unicodePackage}/*.scala"/> |
| | 622 | </scalac> |
| | 623 | </target> |
| | 624 | |
| | 625 | <target name="compileCommon" depends="init" |
| | 626 | description="Compile interpreter-indepedent code."> |
| | 627 | <depend srcdir="${src}" |
| | 628 | destdir="${build}" |
| | 629 | closure="yes" |
| | 630 | cache="${basedir}/.dependencies"/> |
| | 631 | <javac |
| | 632 | srcdir="${src}" |
| | 633 | destdir="${build}" |
| | 634 | source="1.5" |
| | 635 | debug="true" |
| | 636 | includeantruntime="false" |
| | 637 | fork="true"> |
| | 638 | <!-- Uncomment the following line to print unchecked warnings. --> |
| | 639 | <!-- <compilerarg value="-Xlint:unchecked"/> --> |
| | 640 | <classpath refid="compile.classpath"/> |
| | 641 | <include name="${blahblahblah}/useful/*.java"/> |
| | 642 | <include name="${blahblahblah}/unicode/*.java"/> |
| | 643 | </javac> |
| | 644 | <scalac |
| | 645 | srcdir="${src}" |
| | 646 | destdir="${build}" |
| | 647 | classpathref="compile.classpath"> |
| | 648 | <include name="${blahblahblah}/useful/*.scala"/> |
| | 649 | <include name="${blahblahblah}/unicode/*.scala"/> |
| | 650 | </scalac> |
| | 651 | </target> |
| | 652 | |
| | 653 | <target name="compileCommonLint" 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="1.5" |
| | 663 | debug="true" |
| | 664 | includeantruntime="false" |
| | 665 | fork="true"> |
| | 666 | <classpath refid="compile.classpath"/> |
| | 667 | <!-- Uncomment the following line to print unchecked warnings. --> |
| | 668 | <compilerarg value="-Xlint:unchecked"/> |
| | 669 | <include name="${usefulPackage}/*.java"/> |
| | 670 | <include name="${unicodePackage}/*.java"/> |
| | 671 | </javac> |
| | 672 | <scalac |
| | 673 | srcdir="${src}" |
| | 674 | destdir="${build}" |
| | 675 | classpathref="compile.classpath"> |
| | 676 | <include name="${usefulPackage}/*.scala"/> |
| | 677 | <include name="${unicodePackage}/*.scala"/> |
| | 678 | </scalac> |
| | 679 | </target> |
| | 680 | |
| | 681 | |
| | 682 | <target name="interpreter-jar" depends="compile" |
| | 683 | description="Package up the interpreter in a jar."> |
| | 684 | <jar |
| | 685 | destfile="../bin/interpreter.jar" |
| | 686 | basedir="${build}" |
| | 687 | includes="**/*"/> |
| | 688 | </target> |
| | 689 | |
| | 690 | <target name="testOnly" depends="compile" |
| | 691 | description="Run specific tests (use -DtestPattern=...)."> |
| | 692 | <mkdir dir="${test.results}"/> |
| | 693 | <mkdir dir="${basedir}/test-tmp" /> |
| | 694 | <junit printsummary="off" |
| | 695 | haltonerror="off" |
| | 696 | haltonfailure="off" |
| | 697 | showoutput="yes" |
| | 698 | fork="true" |
| | 699 | maxmemory="${junitMem}" |
| | 700 | errorProperty="tests.failed" |
| | 701 | failureProperty="tests.failed"> |
| | 702 | <classpath refid="compile.classpath"/> |
| | 703 | <jvmarg value="-Djava.io.tmpdir=${basedir}/test-tmp" /> |
| | 704 | <formatter type="plain" usefile="false"/> |
| | 705 | <syspropertyset> |
| | 706 | <propertyref prefix="plt." /> |
| | 707 | </syspropertyset> |
| | 708 | <batchtest fork="true" todir="${test.results}"> |
| | 709 | <fileset dir="${build}"> |
| 364 | | </condition> |
| 365 | | <echo message="Nodes up to date? ${nodes.uptodate}"/> |
| 366 | | </target> |
| 367 | | |
| 368 | | <taskdef name="astgen" classpath="${astgen.third}/astgen.jar;${build}" |
| 369 | | classname="edu.rice.cs.astgen.AntTask"/> |
| 370 | | |
| 371 | | <target name="makeAST" unless="nodes.uptodate" depends="checkNodesUptodate" |
| 372 | | description="Automatically generate AST nodes."> |
| 373 | | <echo message="Processing ${generate-sourcefile}" /> |
| 374 | | <astgen file="${generate-sourcefile}" /> |
| 375 | | <move todir="${nodes}"> |
| 376 | | <fileset dir="${astgen.src}"> |
| 377 | | <include name="**/*.java"/> |
| 378 | | <exclude name="**/Fortress.ast"/> |
| 379 | | </fileset> |
| 380 | | </move> |
| 381 | | <move todir="${library}"> |
| 382 | | <fileset dir="${astgen.src}"> |
| 383 | | <include name="FortressAst.fss" /> |
| 384 | | <include name="FortressAst.fsi" /> |
| 385 | | </fileset> |
| 386 | | </move> |
| 387 | | <move todir="${astgen.src}"> |
| 388 | | <fileset dir="${astgen.src}"> |
| 389 | | <include name="FortressAst.scala" /> |
| 390 | | </fileset> |
| 391 | | </move> |
| 392 | | </target> |
| 393 | | |
| 394 | | <target name="compile" depends="compileCommon, makeAST, parser, operatorsGen" |
| 395 | | description="Compile all Fortress code."> |
| 396 | | <depend srcdir="${src}" |
| 397 | | destdir="${build}" |
| 398 | | closure="yes" |
| 399 | | cache="${basedir}/.dependencies"/> |
| 400 | | <javac |
| 401 | | srcdir="${src}" |
| 402 | | destdir="${build}" |
| 403 | | source="1.5" |
| 404 | | debug="true" |
| 405 | | includeantruntime="false" |
| 406 | | fork="true" |
| 407 | | memorymaximumsize="256M"> |
| 408 | | <!-- Uncomment the following line to print unchecked warnings |
| 409 | | (here and in the 'compileCommon' target. --> |
| 410 | | <!-- <compilerarg value="-Xlint:unchecked"/> --> |
| 411 | | <classpath refid="compile.classpath"/> |
| 412 | | <include name="**/*.java"/> |
| 413 | | <exclude name="${usefulPackage}/*.java"/> |
| 414 | | <exclude name="${unicodePackage}/*.java"/> |
| 415 | | </javac> |
| 416 | | </target> |
| 417 | | |
| 418 | | <target name="check.blas" depends="init"> |
| 419 | | <javac destdir="${build}" srcdir="${src}/com/sun/fortress/numerics"> |
| 420 | | <classpath refid="compile.classpath"/> |
| 421 | | </javac> |
| 422 | | <java failonerror="true" classname="com.sun.fortress.numerics.CheckBlasEnvironment"> |
| 423 | | <classpath refid="compile.classpath"/> |
| 424 | | </java> |
| 425 | | </target> |
| 426 | | |
| 427 | | <target name="check.linux"> |
| 428 | | <condition property="blas.islinux"> |
| 429 | | <equals arg1="${os.name}" arg2="Linux" /> |
| 430 | | </condition> |
| 431 | | </target> |
| 432 | | |
| 433 | | <target name="blas.linux" depends="check.linux" if="blas.islinux"> |
| 434 | | <echo message="Generating C header and stub files." /> |
| 435 | | <javah class="com.sun.fortress.numerics.Blas" |
| 436 | | destdir="c" |
| 437 | | classpath="build" |
| 438 | | /> |
| 439 | | <echo message="Now compiling C stubs for blas on arch linux."/> |
| 440 | | <exec executable="gcc" failonerror="true"> |
| 441 | | <arg value="-fPIC" /> |
| 442 | | <arg value="-Ic" /> |
| 443 | | <arg value="-I${env.BLAS_INCLUDE}" /> |
| 444 | | <arg value="-L${env.BLAS_LIB}" /> |
| 445 | | <arg value="-I${env.JAVA_HOME}/include" /> |
| 446 | | <arg value="-I${env.JAVA_HOME}/include/linux" /> |
| 447 | | <arg value="c/blas.c" /> |
| 448 | | <arg value="-lcblas" /> |
| 449 | | <arg value="-lblas" /> |
| 450 | | <arg value="-shared" /> |
| 451 | | <arg value="-olibblas.so" /> |
| 452 | | </exec> |
| 453 | | </target> |
| 454 | | |
| 455 | | <target name="check.osx"> |
| 456 | | <condition property="blas.is.osx"> |
| 457 | | <equals arg1="${os.name}" arg2="Mac OS X" /> |
| 458 | | </condition> |
| 459 | | </target> |
| 460 | | |
| 461 | | <target name="blas.osx" depends="check.osx" if="blas.is.osx"> |
| 462 | | <echo message="Generating C header and stub files." /> |
| 463 | | <javah class="com.sun.fortress.numerics.Blas" |
| 464 | | destdir="c" |
| 465 | | classpath="build" |
| 466 | | /> |
| 467 | | <echo message="Now compiling C stubs for blas on arch OS X."/> |
| 468 | | <exec executable="gcc" failonerror="true"> |
| 469 | | <arg line="-D OSX" /> |
| 470 | | <arg value="-fPIC" /> |
| 471 | | <arg value="-Ic" /> |
| 472 | | <arg line="-framework Accelerate" /> |
| 473 | | <arg value="-I${env.JAVA_LIB}/Headers" /> |
| 474 | | <arg value="c/blas.c" /> |
| 475 | | <arg value="-lcblas" /> |
| 476 | | <arg value="-lblas" /> |
| 477 | | <arg value="-shared" /> |
| 478 | | <arg value="-bundle" /> |
| 479 | | <arg line="-o libblas.dylib" /> |
| 480 | | </exec> |
| 481 | | </target> |
| 482 | | |
| 483 | | <target name="check.sunos"> |
| 484 | | <condition property="blas.is.sunos"> |
| 485 | | <equals arg1="${os.name}" arg2="SunOS" /> |
| 486 | | </condition> |
| 487 | | </target> |
| 488 | | |
| 489 | | <target name="blas.sunos" depends="check.sunos" if="blas.is.sunos"> |
| 490 | | <echo message="Generating C header and stub files." /> |
| 491 | | <javah class="com.sun.fortress.numerics.Blas" |
| 492 | | destdir="c" |
| 493 | | classpath="build" |
| 494 | | /> |
| 495 | | <echo message="Now compiling C stubs for blas on arch SunOS."/> |
| 496 | | <exec executable="cc" failonerror="true"> |
| 497 | | <arg line="-D SUNOS" /> |
| 498 | | <arg value="-fPIC" /> |
| 499 | | <arg value="-Ic" /> |
| 500 | | <arg value="-I${env.JAVA_HOME}/include" /> |
| 501 | | <arg value="-I${env.JAVA_HOME}/include/solaris" /> |
| 502 | | <arg value="c/sunperf_blas.c" /> |
| 503 | | <arg value="-shared" /> |
| 504 | | <arg value="-dalign" /> |
| 505 | | <arg value="-xlic_lib=sunperf" /> |
| 506 | | <arg value="-olibblas.so" /> |
| 507 | | </exec> |
| 508 | | </target> |
| 509 | | |
| 510 | | <target name="blas" depends="check.blas,blas.linux,blas.osx,blas.sunos"></target> |
| 511 | | |
| 512 | | <target name="compileLint" depends="compileCommonLint, makeAST, parser, operatorsGen" |
| 513 | | description="Compile all interpreter code."> |
| 514 | | <depend srcdir="${src}" |
| 515 | | destdir="${build}" |
| 516 | | closure="yes" |
| 517 | | cache="${basedir}/.dependencies"/> |
| 518 | | <javac |
| 519 | | srcdir="${src}" |
| 520 | | destdir="${build}" |
| 521 | | source="1.5" |
| 522 | | debug="true" |
| 523 | | includeantruntime="false" |
| 524 | | fork="true" |
| 525 | | memorymaximumsize="256M"> |
| 526 | | <!-- Uncomment the following line to print unchecked warnings |
| 527 | | (here and in the 'compileCommon' target. --> |
| 528 | | <classpath refid="compile.classpath"/> |
| 529 | | <compilerarg value="-Xlint:unchecked"/> |
| 530 | | <include name="**/*.java"/> |
| 531 | | <exclude name="${usefulPackage}/*.java"/> |
| 532 | | <exclude name="${unicodePackage}/*.java"/> |
| 533 | | </javac> |
| 534 | | </target> |
| 535 | | |
| 536 | | <target name="compileCommon" depends="init" |
| 537 | | description="Compile interpreter-indepedent code."> |
| 538 | | <depend srcdir="${src}" |
| 539 | | destdir="${build}" |
| 540 | | closure="yes" |
| 541 | | cache="${basedir}/.dependencies"/> |
| 542 | | <javac |
| 543 | | srcdir="${src}" |
| 544 | | destdir="${build}" |
| 545 | | source="1.5" |
| 546 | | debug="true" |
| 547 | | includeantruntime="false" |
| 548 | | fork="true"> |
| 549 | | |
| 550 | | <!-- Uncomment the following line to print unchecked warnings |
| 551 | | (here and in the 'compile' target. --> |
| 552 | | <!-- <compilerarg value="-Xlint:unchecked"/> --> |
| 553 | | <classpath refid="compile.classpath"/> |
| 554 | | <!-- |
| 555 | | <include name="${usefulPackage}/*.java"/> |
| 556 | | <include name="${unicodePackage}/*.java"/> |
| 557 | | --> |
| 558 | | <include name="${blahblahblah}/useful/*.java"/> |
| 559 | | <!-- <include name="${blahblahblah}/astgen/*.java"/> --> |
| 560 | | <include name="${blahblahblah}/unicode/*.java"/> |
| 561 | | </javac> |
| 562 | | </target> |
| 563 | | |
| 564 | | <target name="compileCommonLint" depends="init" |
| 565 | | description="Compile interpreter-indepedent code."> |
| 566 | | <depend srcdir="${src}" |
| 567 | | destdir="${build}" |
| 568 | | closure="yes" |
| 569 | | cache="${basedir}/.dependencies"/> |
| 570 | | <javac |
| 571 | | srcdir="${src}" |
| 572 | | destdir="${build}" |
| 573 | | source="1.5" |
| 574 | | debug="true" |
| 575 | | includeantruntime="false" |
| 576 | | fork="true"> |
| 577 | | |
| 578 | | <!-- Uncomment the following line to print unchecked warnings |
| 579 | | (here and in the 'compile' target. --> |
| 580 | | <classpath refid="compile.classpath"/> |
| 581 | | <compilerarg value="-Xlint:unchecked"/> |
| 582 | | <include name="${usefulPackage}/*.java"/> |
| 583 | | <include name="${unicodePackage}/*.java"/> |
| 584 | | </javac> |
| 585 | | </target> |
| 586 | | |
| 587 | | <target name="interpreter-jar" depends="compile" |
| 588 | | description="Package up the interpreter in a jar."> |
| 589 | | <jar |
| 590 | | destfile="../bin/interpreter.jar" |
| 591 | | basedir="${build}" |
| 592 | | includes="**/*"/> |
| 593 | | </target> |
| 594 | | |
| 595 | | |
| 596 | | <target name="testOnly" depends="compile" |
| 597 | | description="Run specific tests (use -DtestPattern=...)."> |
| 598 | | <mkdir dir="${test.results}"/> |
| 599 | | <mkdir dir="${basedir}/test-tmp" /> |
| 600 | | <junit printsummary="off" |
| 601 | | haltonerror="off" |
| 602 | | haltonfailure="off" |
| 603 | | showoutput="yes" |
| 604 | | fork="true" |
| 605 | | maxmemory="${junitMem}" |
| 606 | | errorProperty="tests.failed" |
| 607 | | failureProperty="tests.failed"> |
| 608 | | <classpath refid="compile.classpath"/> |
| 609 | | <jvmarg value="-Djava.io.tmpdir=${basedir}/test-tmp" /> |
| 610 | | <formatter type="plain" usefile="false"/> |
| 611 | | <syspropertyset> |
| 612 | | <propertyref prefix="plt." /> |
| 613 | | </syspropertyset> |
| 614 | | <batchtest fork="true" todir="${test.results}"> |
| 615 | | <fileset dir="${build}"> |
| 616 | | <and> |
| 617 | | <filename name="**/*${testPattern}*/**" /> |
| 618 | | <or> |
| 619 | | <filename name="**/*JUTest.class" /> |
| 620 | | <filename name="**/*JxTest.class" /> |
| 621 | | </or> |
| 622 | | </and> |
| 623 | | <exclude name="**/*$*.class"/> |
| 624 | | </fileset> |
| 625 | | </batchtest> |
| 626 | | </junit> |
| 627 | | <delete dir="${basedir}/test-tmp" /> |
| 628 | | <fail message="Tests expected to pass are failing!" if="tests.failed"/> |
| 629 | | </target> |
| 630 | | |
| 631 | | <target name="test" depends="compile" |
| 632 | | description="Run all unit and system tests expected to pass."> |
| 633 | | <mkdir dir="${test.results}"/> |
| 634 | | <mkdir dir="${basedir}/test-tmp" /> |
| 635 | | <junit printsummary="on" |
| 636 | | haltonerror="off" |
| 637 | | haltonfailure="off" |
| 638 | | showoutput="yes" |
| 639 | | fork="true" |
| 640 | | maxmemory="${junitMem}" |
| 641 | | errorProperty="tests.failed" |
| 642 | | failureProperty="tests.failed"> |
| 643 | | <classpath refid="compile.classpath"/> |
| 644 | | <jvmarg value="-Djava.io.tmpdir=${basedir}/test-tmp" /> |
| 645 | | <formatter type="plain" usefile="true"/> |
| 646 | | <batchtest fork="true" todir="${test.results}"> |
| 647 | | <fileset dir="${build}"> |
| 648 | | <include name="**/*JUTest.class"/> |
| 649 | | <include name="**/*JUTests.class"/> |
| 650 | | <exclude name="**/*$*.class"/> |
| 651 | | <exclude name="**/SyntaxAbstractionJUTestAll.class"/> |
| 652 | | <exclude name="**/tools/AstJUTest.class"/> |
| 653 | | </fileset> |
| 654 | | </batchtest> |
| 655 | | </junit> |
| 656 | | <delete dir="${basedir}/test-tmp" /> |
| 657 | | <fail message="Tests expected to pass are failing!" if="tests.failed"/> |
| 658 | | </target> |
| 659 | | |
| 660 | | <target name="testCruiseControl" depends="compile" |
| 661 | | description="Run all unit and system tests expected to pass."> |
| 662 | | <mkdir dir="${test.results}"/> |
| 663 | | <mkdir dir="${basedir}/test-tmp" /> |
| 664 | | <junit printsummary="on" |
| 665 | | haltonerror="off" |
| 666 | | haltonfailure="off" |
| 667 | | showoutput="yes" |
| 668 | | fork="true" |
| 669 | | maxmemory="${junitMem}" |
| 670 | | errorProperty="tests.failed" |
| 671 | | failureProperty="tests.failed"> |
| 672 | | <classpath refid="compile.classpath"/> |
| 673 | | <jvmarg value="-Djava.io.tmpdir=${basedir}/test-tmp" /> |
| 674 | | <formatter type="plain" usefile="true"/> |
| 675 | | <batchtest fork="true" todir="${junit.dir}"> |
| 676 | | <formatter type="brief" usefile="false" /> |
| 677 | | <formatter type="xml" /> |
| 678 | | <fileset dir="${build}"> |
| 679 | | <include name="**/*JUTest.class"/> |
| 680 | | <include name="**/*JUTests.class"/> |
| 681 | | <exclude name="**/*$*.class"/> |
| 682 | | <exclude name="**/SyntaxAbstractionJUTestAll.class"/> |
| 683 | | <exclude name="**/tools/AstJUTest.class"/> |
| 684 | | </fileset> |
| 685 | | </batchtest> |
| 686 | | </junit> |
| 687 | | <delete dir="${basedir}/test-tmp" /> |
| 688 | | <fail message="Tests expected to pass are failing!" if="tests.failed"/> |
| 689 | | </target> |
| 690 | | |
| 691 | | <target name="testNotPassing" depends="compile" |
| 692 | | description="Run system tests that aren't passing yet."> |
| 693 | | <mkdir dir="${test.results}"/> |
| 694 | | <mkdir dir="${basedir}/test-tmp" /> |
| 695 | | <junit printsummary="on" |
| 696 | | haltonerror="off" |
| 697 | | haltonfailure="off" |
| 698 | | showoutput="yes" |
| 699 | | fork="true" |
| 700 | | maxmemory="${junitMem}" |
| 701 | | errorProperty="tests.failed" |
| 702 | | failureProperty="tests.failed"> |
| 703 | | <classpath refid="compile.classpath"/> |
| 704 | | <jvmarg value="-Djava.io.tmpdir=${basedir}/test-tmp" /> |
| 705 | | <formatter type="brief" usefile="true"/> |
| 706 | | <batchtest fork="true" todir="${test.results}"> |
| 707 | | <fileset dir="${build}"> |
| 708 | | <include name="**/*NotPassingYet.class"/> |
| 709 | | </fileset> |
| 710 | | </batchtest> |
| 711 | | </junit> |
| 712 | | <delete dir="${basedir}/test-tmp" /> |
| 713 | | <fail message="Tests expected to fail are failing!" if="tests.failed"/> |
| 714 | | </target> |
| 715 | | |
| 716 | | <target name="testSpecData" depends="compile" |
| 717 | | description="Run SpecDataJUTests."> |
| 718 | | <mkdir dir="${test.results}"/> |
| 719 | | <mkdir dir="${basedir}/test-tmp" /> |
| 720 | | <junit printsummary="on" |
| 721 | | haltonerror="off" |
| 722 | | haltonfailure="off" |
| 723 | | showoutput="yes" |
| 724 | | fork="true" |
| 725 | | maxmemory="${junitMem}" |
| 726 | | errorProperty="tests.failed" |
| 727 | | failureProperty="tests.failed"> |
| 728 | | <classpath refid="compile.classpath"/> |
| 729 | | <jvmarg value="-Djava.io.tmpdir=${basedir}/test-tmp" /> |
| 730 | | <formatter type="plain" usefile="true"/> |
| 731 | | <batchtest fork="true" todir="${test.results}"> |
| 732 | | <fileset dir="${build}"> |
| 733 | | <include name="**/SpecDataJUTest.class"/> |
| 734 | | </fileset> |
| 735 | | </batchtest> |
| 736 | | </junit> |
| 737 | | <delete dir="${basedir}/test-tmp" /> |
| 738 | | <fail message="Tests expected to pass are failing!" if="tests.failed"/> |
| 739 | | </target> |
| 740 | | |
| 741 | | <target name="testSystem" depends="compile" |
| 742 | | description="Run SystemJUTests."> |
| 743 | | <mkdir dir="${test.results}"/> |
| 744 | | <mkdir dir="${basedir}/test-tmp" /> |
| 745 | | <junit printsummary="on" |
| 746 | | haltonerror="off" |
| 747 | | haltonfailure="off" |
| 748 | | showoutput="yes" |
| 749 | | fork="true" |
| 750 | | maxmemory="${junitMem}" |
| 751 | | errorProperty="tests.failed" |
| 752 | | failureProperty="tests.failed"> |
| 753 | | <classpath refid="compile.classpath"/> |
| 754 | | <jvmarg value="-Djava.io.tmpdir=${basedir}/test-tmp" /> |
| 755 | | <formatter type="plain" usefile="true"/> |
| 756 | | <batchtest fork="true" todir="${test.results}"> |
| 757 | | <fileset dir="${build}"> |
| 758 | | <include name="**/SystemJUTest.class"/> |
| 759 | | </fileset> |
| 760 | | </batchtest> |
| 761 | | </junit> |
| 762 | | <delete dir="${basedir}/test-tmp" /> |
| 763 | | <fail message="Tests expected to pass are failing!" if="tests.failed"/> |
| 764 | | </target> |
| 765 | | |
| 766 | | <target name="testblas" depends="compile,blas" description="Test blas"> |
| 767 | | <mkdir dir="${basedir}/test-tmp" /> |
| 768 | | <junit printsummary="on" |
| 769 | | haltonerror="off" |
| 770 | | haltonfailure="off" |
| 771 | | showoutput="yes" |
| 772 | | fork="true" |
| 773 | | maxmemory="${junitMem}" |
| 774 | | errorProperty="tests.failed" |
| 775 | | failureProperty="tests.failed"> |
| 776 | | <classpath refid="compile.classpath"/> |
| 777 | | <jvmarg value="-Djava.io.tmpdir=${basedir}/test-tmp" /> |
| 778 | | <formatter type="plain" usefile="true"/> |
| 779 | | <batchtest fork="true" todir="${test.results}"> |
| 780 | | <fileset dir="${build}"> |
| 781 | | <include name="**/BlasJxTest.class"/> |
| 782 | | </fileset> |
| 783 | | </batchtest> |
| 784 | | </junit> |
| 785 | | <delete dir="${basedir}/test-tmp" /> |
| 786 | | <fail message="Tests expected to pass are failing!" if="tests.failed"/> |
| 787 | | </target> |
| 788 | | |
| 789 | | <target name="testsyntax" depends="compile" |
| 790 | | description="Run SyntaxAbstractionJUTests."> |
| 791 | | <mkdir dir="${test.results}"/> |
| 792 | | <mkdir dir="${basedir}/test-tmp" /> |
| 793 | | <junit printsummary="on" |
| 794 | | haltonerror="off" |
| 795 | | haltonfailure="off" |
| 796 | | showoutput="yes" |
| 797 | | fork="true" |
| 798 | | maxmemory="${junitMem}" |
| 799 | | errorProperty="tests.failed" |
| 800 | | failureProperty="tests.failed"> |
| 801 | | <classpath refid="compile.classpath"/> |
| 802 | | <jvmarg value="-Djava.io.tmpdir=${basedir}/test-tmp" /> |
| 803 | | <formatter type="plain" usefile="true"/> |
| 804 | | <batchtest fork="true" todir="${test.results}"> |
| 805 | | <fileset dir="${build}"> |
| 806 | | <include name="**/SyntaxAbstractionJUTest.class"/> |
| 807 | | <!-- |
| 808 | | <include name="**/SyntaxAbstractionJUTestAll.class"/> |
| 809 | | --> |
| 810 | | </fileset> |
| 811 | | </batchtest> |
| 812 | | </junit> |
| 813 | | <delete dir="${basedir}/test-tmp" /> |
| 814 | | <fail message="Tests expected to pass are failing!" if="tests.failed"/> |
| 815 | | </target> |
| 816 | | |
| 817 | | <target name="testDemos" depends="compile" |
| 818 | | description="Run demos in a test harness."> |
| 819 | | <mkdir dir="${test.results}"/> |
| 820 | | <mkdir dir="${basedir}/test-tmp" /> |
| 821 | | <junit printsummary="on" |
| 822 | | haltonerror="off" |
| 823 | | haltonfailure="off" |
| 824 | | showoutput="yes" |
| 825 | | fork="true" |
| 826 | | maxmemory="${junitMem}" |
| 827 | | errorProperty="tests.failed" |
| 828 | | failureProperty="tests.failed"> |
| 829 | | <classpath refid="compile.classpath"/> |
| 830 | | <jvmarg value="-Djava.io.tmpdir=${basedir}/test-tmp" /> |
| 831 | | <formatter type="brief" usefile="true"/> |
| 832 | | <batchtest fork="true" todir="${test.results}"> |
| 833 | | <fileset dir="${build}"> |
| 834 | | <include name="**/DemoTests.class"/> |
| 835 | | </fileset> |
| 836 | | </batchtest> |
| 837 | | </junit> |
| 838 | | <delete dir="${basedir}/test-tmp" /> |
| 839 | | <fail message="Tests expected to pass are failing!" if="tests.failed"/> |
| 840 | | </target> |
| 841 | | |
| 842 | | <target name="testAll" depends="test, testNotPassing, testDemos, reportNotPassing" |
| 843 | | description="Run all tests, including those known not to pass yet."> |
| 844 | | </target> |
| 845 | | |
| 846 | | <target name="testNightly" depends="test, testDemos, testsyntax" |
| 847 | | description="Run tests, demos, and syntax abstraction tests."> |
| 848 | | </target> |
| 849 | | |
| 850 | | <target name="reportNotPassing" |
| 851 | | if="not.passing.yet" |
| 852 | | depends="test,testNotPassing"> |
| 853 | | <echo message="Some tests expected to fail still aren't passing."/> |
| 854 | | </target> |
| 855 | | |
| 856 | | <!-- If the generated file Fortress.java is no older than all rats files |
| | 717 | <exclude name="**/*$*.class"/> |
| | 718 | </fileset> |
| | 719 | </batchtest> |
| | 720 | </junit> |
| | 721 | <delete dir="${basedir}/test-tmp" /> |
| | 722 | <fail message="Tests expected to pass are failing!" if="tests.failed"/> |
| | 723 | </target> |
| | 724 | |
| | 725 | <target name="test" depends="compile" |
| | 726 | description="Run all unit and system tests expected to pass."> |
| | 727 | <mkdir dir="${test.results}"/> |
| | 728 | <mkdir dir="${basedir}/test-tmp" /> |
| | 729 | <junit printsummary="on" |
| | 730 | haltonerror="off" |
| | 731 | haltonfailure="off" |
| | 732 | showoutput="yes" |
| | 733 | fork="true" |
| | 734 | maxmemory="${junitMem}" |
| | 735 | errorProperty="tests.failed" |
| | 736 | failureProperty="tests.failed"> |
| | 737 | <classpath refid="compile.classpath"/> |
| | 738 | <jvmarg value="-Djava.io.tmpdir=${basedir}/test-tmp" /> |
| | 739 | <formatter type="plain" usefile="true"/> |
| | 740 | <batchtest fork="true" todir="${test.results}"> |
| | 741 | <fileset dir="${build}"> |
| | 742 | <include name="**/*JUTest.class"/> |
| | 743 | <include name="**/*JUTests.class"/> |
| | 744 | <exclude name="**/*$*.class"/> |
| | 745 | <exclude name="**/SyntaxAbstractionJUTestAll.class"/> |
| | 746 | <exclude name="**/tools/AstJUTest.class"/> |
| | 747 | </fileset> |
| | 748 | </batchtest> |
| | 749 | </junit> |
| | 750 | <delete dir="${basedir}/test-tmp" /> |
| | 751 | <fail message="Tests expected to pass are failing!" if="tests.failed"/> |
| | 752 | </target> |
| | 753 | |
| | 754 | <target name="testCruiseControl" depends="compile" |
| | 755 | description="Run all unit and system tests expected to pass."> |
| | 756 | <mkdir dir="${test.results}"/> |
| | 757 | <mkdir dir="${basedir}/test-tmp" /> |
| | 758 | <junit printsummary="on" |
| | 759 | haltonerror="off" |
| | 760 | haltonfailure="off" |
| | 761 | showoutput="yes" |
| | 762 | fork="true" |
| | 763 | maxmemory="${junitMem}" |
| | 764 | errorProperty="tests.failed" |
| | 765 | failureProperty="tests.failed"> |
| | 766 | <classpath refid="compile.classpath"/> |
| | 767 | <jvmarg value="-Djava.io.tmpdir=${basedir}/test-tmp" /> |
| | 768 | <formatter type="plain" usefile="true"/> |
| | 769 | <batchtest fork="true" todir="${junit.dir}"> |
| | 770 | <formatter type="brief" usefile="false" /> |
| | 771 | <formatter type="xml" /> |
| | 772 | <fileset dir="${build}"> |
| | 773 | <include name="**/*JUTest.class"/> |
| | 774 | <include name="**/*JUTests.class"/> |
| | 775 | <exclude name="**/*$*.class"/> |
| | 776 | <exclude name="**/SyntaxAbstractionJUTestAll.class"/> |
| | 777 | <exclude name="**/tools/AstJUTest.class"/> |
| | 778 | </fileset> |
| | 779 | </batchtest> |
| | 780 | </junit> |
| | 781 | <delete dir="${basedir}/test-tmp" /> |
| | 782 | <fail message="Tests expected to pass are failing!" if="tests.failed"/> |
| | 783 | </target> |
| | 784 | |
| | 785 | <target name="testNotPassing" depends="compile" |
| | 786 | description="Run system tests that aren't passing yet."> |
| | 787 | <mkdir dir="${test.results}"/> |
| | 788 | <mkdir dir="${basedir}/test-tmp" /> |
| | 789 | <junit printsummary="on" |
| | 790 | haltonerror="off" |
| | 791 | haltonfailure="off" |
| | 792 | showoutput="yes" |
| | 793 | fork="true" |
| | 794 | maxmemory="${junitMem}" |
| | 795 | errorProperty="tests.failed" |
| | 796 | failureProperty="tests.failed"> |
| | 797 | <classpath refid="compile.classpath"/> |
| | 798 | <jvmarg value="-Djava.io.tmpdir=${basedir}/test-tmp" /> |
| | 799 | <formatter type="brief" usefile="true"/> |
| | 800 | <batchtest fork="true" todir="${test.results}"> |
| | 801 | <fileset dir="${build}"> |
| | 802 | <include name="**/*NotPassingYet.class"/> |
| | 803 | </fileset> |
| | 804 | </batchtest> |
| | 805 | </junit> |
| | 806 | <delete dir="${basedir}/test-tmp" /> |
| | 807 | <fail message="Tests expected to fail are failing!" if="tests.failed"/> |
| | 808 | </target> |
| | 809 | |
| | 810 | <target name="testSpecData" depends="compile" |
| | 811 | description="Run SpecDataJUTests."> |
| | 812 | <mkdir dir="${test.results}"/> |
| | 813 | <mkdir dir="${basedir}/test-tmp" /> |
| | 814 | <junit printsummary="on" |
| | 815 | haltonerror="off" |
| | 816 | haltonfailure="off" |
| | 817 | showoutput="yes" |
| | 818 | fork="true" |
| | 819 | maxmemory="${junitMem}" |
| | 820 | errorProperty="tests.failed" |
| | 821 | failureProperty="tests.failed"> |
| | 822 | <classpath refid="compile.classpath"/> |
| | 823 | <jvmarg value="-Djava.io.tmpdir=${basedir}/test-tmp" /> |
| | 824 | <formatter type="plain" usefile="true"/> |
| | 825 | <batchtest fork="true" todir="${test.results}"> |
| | 826 | <fileset dir="${build}"> |
| | 827 | <include name="**/SpecDataJUTest.class"/> |
| | 828 | </fileset> |
| | 829 | </batchtest> |
| | 830 | </junit> |
| | 831 | <delete dir="${basedir}/test-tmp" /> |
| | 832 | <fail message="Tests expected to pass are failing!" if="tests.failed"/> |
| | 833 | </target> |
| | 834 | |
| | 835 | <target name="testSystem" depends="compile" |
| | 836 | description="Run SystemJUTests."> |
| | 837 | <mkdir dir="${test.results}"/> |
| | 838 | <mkdir dir="${basedir}/test-tmp" /> |
| | 839 | <junit printsummary="on" |
| | 840 | haltonerror="off" |
| | 841 | haltonfailure="off" |
| | 842 | showoutput="yes" |
| | 843 | fork="true" |
| | 844 | maxmemory="${junitMem}" |
| | 845 | errorProperty="tests.failed" |
| | 846 | failureProperty="tests.failed"> |
| | 847 | <classpath refid="compile.classpath"/> |
| | 848 | <jvmarg value="-Djava.io.tmpdir=${basedir}/test-tmp" /> |
| | 849 | <formatter type="plain" usefile="true"/> |
| | 850 | <batchtest fork="true" todir="${test.results}"> |
| | 851 | <fileset dir="${build}"> |
| | 852 | <include name="**/SystemJUTest.class"/> |
| | 853 | </fileset> |
| | 854 | </batchtest> |
| | 855 | </junit> |
| | 856 | <delete dir="${basedir}/test-tmp" /> |
| | 857 | <fail message="Tests expected to pass are failing!" if="tests.failed"/> |
| | 858 | </target> |
| | 859 | |
| | 860 | <target name="testblas" depends="compile,blas" description="Test blas"> |
| | 861 | <mkdir dir="${basedir}/test-tmp" /> |
| | 862 | <junit printsummary="on" |
| | 863 | haltonerror="off" |
| | 864 | haltonfailure="off" |
| | 865 | showoutput="yes" |
| | 866 | fork="true" |
| | 867 | maxmemory="${junitMem}" |
| | 868 | errorProperty="tests.failed" |
| | 869 | failureProperty="tests.failed"> |
| | 870 | <classpath refid="compile.classpath"/> |
| | 871 | <jvmarg value="-Djava.io.tmpdir=${basedir}/test-tmp" /> |
| | 872 | <formatter type="plain" usefile="true"/> |
| | 873 | <batchtest fork="true" todir="${test.results}"> |
| | 874 | <fileset dir="${build}"> |
| | 875 | <include name="**/BlasJxTest.class"/> |
| | 876 | </fileset> |
| | 877 | </batchtest> |
| | 878 | </junit> |
| | 879 | <delete dir="${basedir}/test-tmp" /> |
| | 880 | <fail message="Tests expected to pass are failing!" if="tests.failed"/> |
| | 881 | </target> |
| | 882 | |
| | 883 | <target name="testsyntax" depends="compile" |
| | 884 | description="Run SyntaxAbstractionJUTests."> |
| | 885 | <mkdir dir="${test.results}"/> |
| | 886 | <mkdir dir="${basedir}/test-tmp" /> |
| | 887 | <junit printsummary="on" |
| | 888 | haltonerror="off" |
| | 889 | haltonfailure="off" |
| | 890 | showoutput="yes" |
| | 891 | fork="true" |
| | 892 | maxmemory="${junitMem}" |
| | 893 | errorProperty="tests.failed" |
| | 894 | failureProperty="tests.failed"> |
| | 895 | <classpath refid="compile.classpath"/> |
| | 896 | <jvmarg value="-Djava.io.tmpdir=${basedir}/test-tmp" /> |
| | 897 | <formatter type="plain" usefile="true"/> |
| | 898 | <batchtest fork="true" todir="${test.results}"> |
| | 899 | <fileset dir="${build}"> |
| | 900 | <include name="**/SyntaxAbstractionJUTest.class"/> |
| | 901 | <!-- |
| | 902 | <include name="**/SyntaxAbstractionJUTestAll.class"/> |
| | 903 | --> |
| | 904 | </fileset> |
| | 905 | </batchtest> |
| | 906 | </junit> |
| | 907 | <delete dir="${basedir}/test-tmp" /> |
| | 908 | <fail message="Tests expected to pass are failing!" if="tests.failed"/> |
| | 909 | </target> |
| | 910 | |
| | 911 | <target name="testDemos" depends="compile" |
| | 912 | description="Run demos in a test harness."> |
| | 913 | <mkdir dir="${test.results}"/> |
| | 914 | <mkdir dir="${basedir}/test-tmp" /> |
| | 915 | <junit printsummary="on" |
| | 916 | haltonerror="off" |
| | 917 | haltonfailure="off" |
| | 918 | showoutput="yes" |
| | 919 | fork="true" |
| | 920 | maxmemory="${junitMem}" |
| | 921 | errorProperty="tests.failed" |
| | 922 | failureProperty="tests.failed"> |
| | 923 | <classpath refid="compile.classpath"/> |
| | 924 | <jvmarg value="-Djava.io.tmpdir=${basedir}/test-tmp" /> |
| | 925 | <formatter type="brief" usefile="true"/> |
| | 926 | <batchtest fork="true" todir="${test.results}"> |
| | 927 | <fileset dir="${build}"> |
| | 928 | <include name="**/DemoTests.class"/> |
| | 929 | </fileset> |
| | 930 | </batchtest> |
| | 931 | </junit> |
| | 932 | <delete dir="${basedir}/test-tmp" /> |
| | 933 | <fail message="Tests expected to pass are failing!" if="tests.failed"/> |
| | 934 | </target> |
| | 935 | |
| | 936 | <target name="testAll" |
| | 937 | depends="test, testNotPassing, testDemos, reportNotPassing" |
| | 938 | description="Run all tests, including those known not to pass yet."> |
| | 939 | </target> |
| | 940 | |
| | 941 | <target name="testNightly" depends="test, testDemos, testsyntax" |
| | 942 | description="Run tests, demos, and syntax abstraction tests."> |
| | 943 | </target> |
| | 944 | |
| | 945 | <target name="reportNotPassing" |
| | 946 | if="not.passing.yet" |
| | 947 | depends="test,testNotPassing"> |
| | 948 | <echo message="Some tests expected to fail still aren't passing."/> |
| | 949 | </target> |
| | 950 | |
| | 951 | <!-- If the generated file Fortress.java is no older than all rats files |
| 899 | | <echo>Templateparser up to date? ${templateparser.uptodate}</echo> |
| 900 | | </target> |
| 901 | | |
| 902 | | <target name="checkInstrumentedParserUptodate" depends="init"> |
| 903 | | <uptodate property="instrumentedparser.uptodate" |
| 904 | | targetfile="${parser}/FortressInstrumented.java"> |
| 905 | | <srcfiles dir="${parser}" includes="**/*.rats"/> |
| 906 | | <srcfiles dir="${src}/${instrumentationPackage}" |
| 907 | | includes="*.java"/> |
| 908 | | </uptodate> |
| 909 | | <echo>Fortress parser up to date? ${parser.uptodate}</echo> |
| 910 | | </target> |
| 911 | | |
| 912 | | <macrodef name="buildparser"> |
| 913 | | <attribute name="name" /> |
| 914 | | <attribute name="file" /> |
| 915 | | <attribute name="dir" /> |
| 916 | | <sequential> |
| 917 | | <echo message="Rebuilding @{name}..."/> |
| 918 | | <java fork="yes" |
| 919 | | failonerror="yes" |
| 920 | | dir="@{dir}" |
| 921 | | classname="xtc.parser.Rats" |
| 922 | | classpath="${xtc}/xtc.jar"> |
| 923 | | <arg value="-in"/> |
| 924 | | <arg value="${src}"/> |
| 925 | | <arg value="@{file}"/> |
| 926 | | </java> |
| 927 | | </sequential> |
| 928 | | </macrodef> |
| 929 | | |
| 930 | | <target name="fortressparser" unless="fortressparser.uptodate" |
| 931 | | depends="checkFortressParserUptodate" |
| 932 | | description="Fortress Parser"> |
| 933 | | <buildparser name="Fortress" dir="${parser}" file="Fortress.rats" /> |
| 934 | | </target> |
| 935 | | |
| 936 | | <!-- |
| 937 | | <target name="fortressparser" unless="fortreeparser.uptodate" |
| 938 | | depends="checkFortressParserUptodate" |
| 939 | | description="Fortress Parser"> |
| 940 | | <echo message="Rebuilding parser..."/> |
| 941 | | <java fork="yes" |
| 942 | | failonerror="yes" |
| 943 | | dir="${parser}" |
| 944 | | classname="xtc.parser.Rats" |
| 945 | | classpath="${xtc}/xtc.jar"> |
| 946 | | <arg value="-in"/> |
| 947 | | <arg value="${src}"/> |
| 948 | | <arg value="Fortress.rats"/> |
| 949 | | </java> |
| 950 | | </target> |
| 951 | | --> |
| 952 | | |
| 953 | | <target name="preparser" unless="preparser.uptodate" |
| 954 | | depends="checkPreparserUptodate" |
| 955 | | description="Preparser"> |
| 956 | | <buildparser name="preparser" dir="${preparser}" file="PreFortress.rats" /> |
| 957 | | </target> |
| 958 | | |
| 959 | | <!-- |
| 960 | | <target name="preparser" unless="preparser.uptodate" |
| 961 | | depends="checkPreparserUptodate" |
| 962 | | description="Preparser"> |
| 963 | | <echo message="Rebuilding preparser..."/> |
| 964 | | <java fork="yes" |
| 965 | | failonerror="yes" |
| 966 | | dir="${preparser}" |
| 967 | | classname="xtc.parser.Rats" |
| 968 | | classpath="${xtc}/xtc.jar"> |
| 969 | | <arg value="-in"/> |
| 970 | | <arg value="${src}"/> |
| 971 | | <arg value="PreFortress.rats"/> |
| 972 | | </java> |
| 973 | | </target> |
| 974 | | --> |
| 975 | | |
| 976 | | <target name="templateparser" unless="templateparser.uptodate" |
| 977 | | depends="checkTemplateparserUptodate" |
| 978 | | description="Templateparser"> |
| 979 | | <buildparser name="template parser" dir="${templateparser}" |
| 980 | | file="TemplateParser.rats" /> |
| 981 | | </target> |
| 982 | | <!-- |
| 983 | | <target name="templateparser" unless="templateparser.uptodate" |
| 984 | | depends="checkTemplateparserUptodate" |
| 985 | | description="Templateparser"> |
| 986 | | <echo message="Rebuilding template parser..."/> |
| 987 | | <java fork="yes" |
| 988 | | failonerror="yes" |
| 989 | | dir="${templateparser}" |
| 990 | | classname="xtc.parser.Rats" |
| 991 | | classpath="${xtc}/xtc.jar"> |
| 992 | | <arg value="-in"/> |
| 993 | | <arg value="${src}"/> |
| 994 | | <arg value="TemplateParser.rats"/> |
| 995 | | </java> |
| 996 | | </target> |
| 997 | | --> |
| 998 | | |
| 999 | | <target name="instrumentedparser" unless="instrumentedparser.uptodate" |
| 1000 | | depends="compile, checkInstrumentedParserUptodate" |
| 1001 | | description="Instrumented Parser"> |
| 1002 | | <java fork="yes" |
| 1003 | | maxmemory="256m" |
| 1004 | | failonerror="yes" |
| 1005 | | classname="${instrumentation.package}.InstrumentedParserGenerator"> |
| 1006 | | <classpath refid="instrumentedparser.classpath"/> |
| 1007 | | <arg value="${parser}"/> <!-- input dir --> |
| 1008 | | <arg value="${parser}"/> <!-- output dir for FortressInstrumented.java --> |
| 1009 | | </java> |
| 1010 | | </target> |
| 1011 | | |
| 1012 | | <target name="optimizeParser" |
| 1013 | | depends="compile" |
| 1014 | | description="Optimized Parser"> |
| 1015 | | <java fork="yes" |
| 1016 | | maxmemory="256m" |
| 1017 | | failonerror="yes" |
| 1018 | | classname="${instrumentation.package}.OptimizedParserGenerator"> |
| 1019 | | <classpath refid="instrumentedparser.classpath"/> |
| 1020 | | <arg value="${parser}"/> <!-- input dir --> |
| 1021 | | <arg value="${parser}"/> <!-- output dir for Fortress.java --> |
| 1022 | | <arg value="${instrumentation.transient}"/> |
| 1023 | | </java> |
| 1024 | | <ant target="compile"/> |
| 1025 | | </target> |
| 1026 | | |
| 1027 | | <target name="parser" unless="parser.uptodate" |
| 1028 | | depends="checkParserUptodate, operatorsGen" |
| 1029 | | description="Fortress Parser"> |
| 1030 | | |
| 1031 | | <ant target="fortressparser" /> |
| 1032 | | <ant target="preparser" /> |
| 1033 | | <ant target="templateparser" /> |
| 1034 | | |
| 1035 | | <!-- |
| 1036 | | <echo message="Rebuilding parser..."/> |
| 1037 | | <java fork="yes" |
| 1038 | | failonerror="yes" |
| 1039 | | dir="${parser}" |
| 1040 | | classname="xtc.parser.Rats" |
| 1041 | | classpath="${xtc}/xtc.jar"> |
| 1042 | | <arg value="-in"/> |
| 1043 | | <arg value="${src}"/> |
| 1044 | | <arg value="Fortress.rats"/> |
| 1045 | | </java> |
| 1046 | | <echo message="Rebuilding the preparser..."/> |
| 1047 | | <java fork="yes" |
| | 969 | </and> |
| | 970 | </condition> |
| | 971 | <echo>Parser up to date? ${parser.uptodate}</echo> |
| | 972 | </target> |
| | 973 | |
| | 974 | <target name="checkFortressParserUptodate" depends="init"> |
| | 975 | <uptodate property="fortressparser.uptodate" |
| | 976 | targetfile="${parser}/Fortress.java"> |
| | 977 | <srcfiles dir="${parser}" includes="**/*.rats"/> |
| | 978 | </uptodate> |
| | 979 | <echo>Fortress parser up to date? ${parser.uptodate}</echo> |
| | 980 | </target> |
| | 981 | |
| | 982 | <target name="checkPreparserUptodate" depends="init"> |
| | 983 | <uptodate property="preparser.uptodate" |
| | 984 | targetfile="${preparser}/PreFortress.java"> |
| | 985 | <srcfiles dir="${parser}" includes="**/*.rats"/> |
| | 986 | <srcfiles dir="${preparser}" includes="**/*.rats"/> |
| | 987 | </uptodate> |
| | 988 | <echo>Preparser up to date? ${preparser.uptodate}</echo> |
| | 989 | </target> |
| | 990 | |
| | 991 | <target name="checkTemplateparserUptodate" depends="init"> |
| | 992 | <uptodate property="templateparser.uptodate" |
| | 993 | targetfile="${templateparser}/TemplateParser.java"> |
| | 994 | <srcfiles dir="${parser}" includes="**/*.rats"/> |
| | 995 | <srcfiles dir="${templateparser}" includes="**/*.rats"/> |
| | 996 | </uptodate> |
| | 997 | <echo>Templateparser up to date? ${templateparser.uptodate}</echo> |
| | 998 | </target> |
| | 999 | |
| | 1000 | <target name="checkInstrumentedParserUptodate" depends="init"> |
| | 1001 | <uptodate property="instrumentedparser.uptodate" |
| | 1002 | targetfile="${parser}/FortressInstrumented.java"> |
| | 1003 | <srcfiles dir="${parser}" includes="**/*.rats"/> |
| | 1004 | <srcfiles dir="${src}/${instrumentationPackage}" |
| | 1005 | includes="*.java"/> |
| | 1006 | </uptodate> |
| | 1007 | <echo>Fortress parser up to date? ${parser.uptodate}</echo> |
| | 1008 | </target> |
| | 1009 | |
| | 1010 | <macrodef name="buildparser"> |
| | 1011 | <attribute name="name" /> |
| | 1012 | <attribute name="file" /> |
| | 1013 | <attribute name="dir" /> |
| | 1014 | <sequential> |
| | 1015 | <echo message="Rebuilding @{name}..."/> |
| | 1016 | <java fork="yes" |