| 7 |
Usage: ant [target] |
Usage: ant [target] |
| 8 |
|
|
| 9 |
User-specific settings are read from user.properties. |
User-specific settings are read from user.properties. |
| 10 |
See user.properties.sample for examples. |
See user.properties.sample for an explanation of some useful settings. |
| 11 |
------------------------------------------------------------------------------ |
------------------------------------------------------------------------------ |
| 12 |
</description> |
</description> |
| 13 |
|
|
| 22 |
|
|
| 23 |
<!-- Compilation options --> |
<!-- Compilation options --> |
| 24 |
<property name="build.sourcelevel" value="1.5"/> |
<property name="build.sourcelevel" value="1.5"/> |
|
<property name="build.docsourcelevel" value="1.4"/> |
|
| 25 |
<property name="build.debug" value="true"/> |
<property name="build.debug" value="true"/> |
| 26 |
<property name="build.debuglevel" value="source,lines,vars"/> |
<property name="build.debuglevel" value="source,lines,vars"/> |
| 27 |
<property name="build.deprecation" value="false"/> |
<property name="build.deprecation" value="false"/> |
|
<property name="build.novariance.arg" value=""/> |
|
| 28 |
|
|
| 29 |
<!-- Build locations --> |
<!-- Build locations --> |
| 30 |
<property name="build.dir" location="build"/> |
<property name="build.dir" location="build"/> |
| 31 |
<property name="build.classes.dir" location="${build.dir}/classes"/> |
<property name="build.classes.dir" location="${build.dir}/classes"/> |
|
<property name="build.emulation.dir" location="${build.dir}/emulation"/> |
|
| 32 |
<property name="build.testcases.dir" location="${build.dir}/testcases"/> |
<property name="build.testcases.dir" location="${build.dir}/testcases"/> |
| 33 |
|
<property name="build.j1.dir" location="${build.dir}/j1"/> |
| 34 |
|
<property name="build.loops.dir" location="${build.dir}/loops"/> |
| 35 |
<property name="build.lib.dir" location="${build.dir}/lib"/> |
<property name="build.lib.dir" location="${build.dir}/lib"/> |
| 36 |
<property name="build.ant.dir" location="${build.dir}/ant"/> |
<property name="build.ant.dir" location="${build.dir}/ant"/> |
| 37 |
<property name="build.javadocs.dir" location="${build.dir}/javadocs"/> |
<property name="build.javadocs.dir" location="${build.dir}/javadocs"/> |
|
<property name="build.stripped.dir" location="${build.dir}/stripped"/> |
|
| 38 |
<property name="build.reports.dir" location="${build.dir}/reports"/> |
<property name="build.reports.dir" location="${build.dir}/reports"/> |
| 39 |
|
<property name="build.checkstyle.dir" location="${build.dir}/checkstyle"/> |
| 40 |
<property name="build.doccheck.dir" location="${build.dir}/doccheck"/> |
<property name="build.doccheck.dir" location="${build.dir}/doccheck"/> |
| 41 |
<property name="build.filter.src.dir" location="${build.dir}/filtersrc"/> |
<property name="build.filter.src.dir" location="${build.dir}/filtersrc"/> |
| 42 |
|
<property name="build.dc-filter.dir" location="${build.dir}/filterdocchk"/> |
| 43 |
|
|
| 44 |
<!-- Source locations --> |
<!-- Source locations --> |
| 45 |
<property name="src.dir" location="${basedir}/src/main"/> |
<property name="src.dir" location="${basedir}/src/main"/> |
|
<property name="emulation.src.dir" location="${basedir}/src/emulation"/> |
|
| 46 |
<property name="test.src.dir" location="${basedir}/src/test"/> |
<property name="test.src.dir" location="${basedir}/src/test"/> |
| 47 |
|
<property name="j1.src.dir" location="${basedir}/src/javaone"/> |
| 48 |
|
<property name="loops.src.dir" location="${basedir}/src/loops"/> |
| 49 |
|
<property name="tck.src.dir" location="${test.src.dir}/tck"/> |
| 50 |
|
<property name="jtreg.src.dir" location="${test.src.dir}/jtreg"/> |
| 51 |
<property name="ant.src.dir" location="${basedir}/etc/ant"/> |
<property name="ant.src.dir" location="${basedir}/etc/ant"/> |
| 52 |
<property name="stylesheet.dir" location="${basedir}/etc/xsl"/> |
<property name="stylesheet.dir" location="${basedir}/etc/xsl"/> |
| 53 |
<property name="lib.dir" location="${basedir}/lib"/> |
<property name="lib.dir" location="${basedir}/lib"/> |
| 58 |
|
|
| 59 |
<!-- Jar locations --> |
<!-- Jar locations --> |
| 60 |
<property name="product.jar" location="${build.lib.dir}/jsr166.jar"/> |
<property name="product.jar" location="${build.lib.dir}/jsr166.jar"/> |
|
<property name="javac.jar" location="${lib.dir}/javac.jar"/> |
|
|
<property name="collect.jar" location="${lib.dir}/collect.jar"/> |
|
| 61 |
<property name="junit.jar" location="${lib.dir}/junit.jar"/> |
<property name="junit.jar" location="${lib.dir}/junit.jar"/> |
| 62 |
<property name="rt.jar" location="${java.home}/lib/rt.jar"/> |
<property name="concurrent.jar" location="${lib.dir}/concurrent.jar"/> |
| 63 |
|
|
| 64 |
|
<!-- Bootclasspath argument --> |
| 65 |
|
<property name="bootclasspath.args" value="-Xbootclasspath/p:${product.jar}"/> |
| 66 |
|
|
| 67 |
|
<!-- Test classpath --> |
|
<!-- |
|
|
! Bootclasspath munging for source compilation. |
|
|
--> |
|
|
|
|
|
<path id="javac.bootclasspath.prefix"> |
|
|
<!-- <pathelement location="${src.dir}"/> --> |
|
|
<pathelement location="${javac.jar}"/> |
|
|
</path> |
|
|
|
|
|
<path id="javac.bootclasspath"> |
|
|
<!-- <pathelement location="${src.dir}"/> --> |
|
|
<pathelement location="${collect.jar}"/> |
|
|
<pathelement location="${rt.jar}"/> |
|
|
</path> |
|
|
|
|
|
<!-- Flatten bootclasspath prefix into a platform-appropriate string --> |
|
|
<property name="javac.bootclasspath.prefix" |
|
|
refid="javac.bootclasspath.prefix"/> |
|
|
|
|
|
<!-- Turn the flattened bootclasspath prefix into a javac argument --> |
|
|
<property name="build.bootclasspath.arg" |
|
|
value='-J-Xbootclasspath/p:${javac.bootclasspath.prefix}'/> |
|
|
|
|
|
|
|
|
<!-- |
|
|
! Bootclasspath munging for testing, so JUnit can test our local |
|
|
! modifications to java.*. |
|
|
--> |
|
|
|
|
| 68 |
<path id="test.classpath"> |
<path id="test.classpath"> |
|
<pathelement location="${product.jar}"/> |
|
| 69 |
<pathelement location="${build.testcases.dir}"/> |
<pathelement location="${build.testcases.dir}"/> |
| 70 |
<pathelement location="${junit.jar}"/> |
<pathelement location="${junit.jar}"/> |
| 71 |
</path> |
</path> |
| 72 |
|
|
| 73 |
<!-- Flatten test classpath into a platform-appropriate string --> |
<!-- ALoops classpath --> |
| 74 |
<property name="test.classpath" refid="test.classpath"/> |
<path id="loops.classpath"> |
| 75 |
|
<pathelement location="${build.loops.dir}"/> |
| 76 |
<!-- Turn the flattened test classpath into a javac argument --> |
</path> |
|
<property name="test.bootclasspath.arg" |
|
|
value='-Xbootclasspath/p:${test.classpath}'/> |
|
|
|
|
|
|
|
|
|
|
|
<!-- Files excluded from emulation and dist-docs --> |
|
|
<patternset id="emulation.excludes"> |
|
|
<exclude name="java/util/Random.*"/> |
|
|
<exclude name="sun/misc/Unsafe.*"/> |
|
|
</patternset> |
|
| 77 |
|
|
| 78 |
|
<!-- J1 classpath --> |
| 79 |
|
<path id="j1.classpath"> |
| 80 |
|
<pathelement location="${build.j1.dir}"/> |
| 81 |
|
<pathelement location="${junit.jar}"/> |
| 82 |
|
<pathelement location="${concurrent.jar}"/> |
| 83 |
|
</path> |
| 84 |
|
|
| 85 |
|
|
| 86 |
<!-- Main targets --> |
<!-- Main targets --> |
| 87 |
|
|
| 88 |
|
|
| 89 |
<target name="compile" |
<target name="compile" |
| 90 |
depends="init" |
depends="init, configure-compiler" |
| 91 |
description="Compiles main sources to build folder"> |
description="Compiles main sources to build folder"> |
| 92 |
|
|
| 93 |
<mkdir dir="${build.classes.dir}"/> |
<mkdir dir="${build.classes.dir}"/> |
| 100 |
source="${build.sourcelevel}" |
source="${build.sourcelevel}" |
| 101 |
fork="true"> |
fork="true"> |
| 102 |
|
|
| 103 |
<bootclasspath refid="javac.bootclasspath"/> |
<include name="**/*.java"/> |
| 104 |
<compilerarg line="${build.javac.args}"/> |
<exclude name="java/lang/**"/> |
| 105 |
|
<compilerarg line="${build.args}"/> |
| 106 |
|
|
| 107 |
</javac> |
</javac> |
| 108 |
|
|
| 109 |
</target> |
</target> |
| 110 |
|
|
| 111 |
|
|
| 112 |
|
|
| 113 |
<target name="jar" |
<target name="jar" |
| 114 |
depends="check-emulation, init-jar, native-jar, emulation-jar" |
depends="compile" |
| 115 |
description="Builds library jar from compiled sources"/> |
description="Builds library jar from compiled sources"> |
| 116 |
|
|
| 117 |
|
<mkdir dir="${build.lib.dir}"/> |
| 118 |
|
|
| 119 |
|
<jar destfile="${product.jar}"> |
| 120 |
|
<fileset dir="${build.classes.dir}"/> |
| 121 |
|
</jar> |
| 122 |
|
|
| 123 |
|
</target> |
| 124 |
|
|
| 125 |
|
|
| 126 |
|
|
| 127 |
<target name="test" |
<target name="test" |
| 128 |
depends="init, check-junit, report-tests" |
depends="init, configure-tests, report-tests" |
| 129 |
description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" /> |
description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" /> |
| 130 |
|
|
| 131 |
|
|
|
<target name="checkstyle" |
|
|
depends="filter-src" |
|
|
description="Reports on style errors in Java source (verbose, mostly chaff)"> |
|
| 132 |
|
|
| 133 |
<taskdef resource="checkstyletask.properties" |
<target name="docs" |
| 134 |
classpath="${lib.dir}/checkstyle-all-2.4.jar"/> |
description="Builds javadocs with custom tags to build folder"> |
| 135 |
|
|
| 136 |
<checkstyle> |
<delete dir="${build.javadocs.dir}"/> |
| 137 |
<formatter type="plain"/> <!-- also available: type="xml" --> |
<mkdir dir="${build.javadocs.dir}"/> |
| 138 |
<fileset dir="${build.filter.src.dir}" includes="**/*.java"/> |
|
| 139 |
</checkstyle> |
<javadoc destdir="${build.javadocs.dir}" |
| 140 |
|
link="http://java.sun.com/j2se/1.4.1/docs/api" |
| 141 |
|
overview="${src.dir}/intro.html" |
| 142 |
|
source="${build.sourcelevel}"> |
| 143 |
|
|
| 144 |
|
<tag name="revised" description="Last revised:"/> |
| 145 |
|
<tag name="spec" description="Specified by:"/> |
| 146 |
|
|
| 147 |
|
<packageset dir="${src.dir}"/> |
| 148 |
|
|
| 149 |
|
</javadoc> |
| 150 |
|
|
| 151 |
</target> |
</target> |
| 152 |
|
|
| 153 |
|
|
| 154 |
|
|
| 155 |
<target name="doccheck" |
<target name="doccheck" |
| 156 |
depends="filter-src" |
depends="filter-doccheck" |
| 157 |
description="Reports on javadoc style errors (not working yet)"> |
description="Reports on javadoc style errors"> |
| 158 |
|
|
| 159 |
<delete dir="${build.doccheck.dir}"/> |
<delete dir="${build.doccheck.dir}"/> |
| 160 |
<mkdir dir="${build.doccheck.dir}"/> |
<mkdir dir="${build.doccheck.dir}"/> |
| 162 |
<javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck" |
<javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck" |
| 163 |
docletpath="${lib.dir}/doccheck.jar" |
docletpath="${lib.dir}/doccheck.jar" |
| 164 |
destdir="${build.doccheck.dir}"> |
destdir="${build.doccheck.dir}"> |
| 165 |
<packageset dir="${build.filter.src.dir}"/> |
<packageset dir="${build.dc-filter.dir}"/> |
| 166 |
</javadoc> |
</javadoc> |
| 167 |
|
|
| 168 |
|
<echo>DocCheck output is in ${build.doccheck.dir}</echo> |
| 169 |
|
|
| 170 |
</target> |
</target> |
| 171 |
|
|
| 172 |
|
|
|
<target name="docs" |
|
|
depends="filter-src" |
|
|
description="Builds javadocs with custom tags to build folder"> |
|
| 173 |
|
|
| 174 |
<delete dir="${build.javadocs.dir}"/> |
<target name="checkstyle" |
| 175 |
<mkdir dir="${build.javadocs.dir}"/> |
depends="filter-src" |
| 176 |
|
description="Reports on style errors in Java source (verbose, mostly chaff)"> |
| 177 |
|
|
| 178 |
<javadoc destdir="${build.javadocs.dir}" |
<taskdef resource="checkstyletask.properties" |
| 179 |
link="http://java.sun.com/j2se/1.4.1/docs/api" |
classpath="${lib.dir}/checkstyle-all-3.1.jar"/> |
|
overview="${src.dir}/intro.html" |
|
|
source="${build.docsourcelevel}"> |
|
| 180 |
|
|
| 181 |
<tag name="revised" description="Last revised:"/> |
<mkdir dir="${build.checkstyle.dir}"/> |
|
<tag name="spec" description="Specified by:"/> |
|
|
<tag name="editor" description="Last edited by:"/> |
|
|
<tag name="fixme" description="FIX ME:"/> |
|
| 182 |
|
|
| 183 |
<packageset dir="${build.filter.src.dir}"/> |
<checkstyle config="etc/checkstyle/sun_checks.xml" |
| 184 |
|
failOnViolation="false"> |
| 185 |
|
<formatter type="xml" toFile="${build.checkstyle.dir}/checkstyle-report.xml"/> |
| 186 |
|
<fileset dir="${build.filter.src.dir}" includes="**/*.java"/> |
| 187 |
|
</checkstyle> |
| 188 |
|
|
| 189 |
</javadoc> |
<style in="${build.checkstyle.dir}/checkstyle-report.xml" |
| 190 |
|
out="${build.checkstyle.dir}/checkstyle-report.html" |
| 191 |
|
style="${stylesheet.dir}/checkstyle-frames.xsl"/> |
| 192 |
|
|
| 193 |
</target> |
</target> |
| 194 |
|
|
| 195 |
|
|
|
<target name="strip" |
|
|
depends="init" |
|
|
description="Strip generics from java source (not working yet)"> |
|
| 196 |
|
|
| 197 |
<mkdir dir="${build.stripped.dir}"/> |
<target name="dist" |
| 198 |
|
depends="init, dist-clean, dist-jar, dist-docs" |
| 199 |
|
description="Puts all distributable products in single hierarchy"/> |
| 200 |
|
|
|
<!-- |
|
|
# javac -s doesn't reliably generate compilable code. It generates |
|
|
# bridge methods (marked as "synthetic") that can have identical |
|
|
# signatures to existing methods except for the return value. |
|
|
--> |
|
|
<javac srcdir="${src.dir}" |
|
|
destdir="${build.stripped.dir}" |
|
|
debug="${build.debug}" |
|
|
debuglevel="${build.debuglevel}" |
|
|
deprecation="${build.deprecation}" |
|
|
source="${build.sourcelevel}" |
|
|
fork="true"> |
|
| 201 |
|
|
|
<bootclasspath refid="javac.bootclasspath"/> |
|
|
<compilerarg line="${build.javac.args} -s"/> |
|
| 202 |
|
|
| 203 |
</javac> |
<target name="release" |
| 204 |
|
depends="dist" |
| 205 |
|
description="Puts entire CVS tree, plus distribution productions, in a jar"> |
| 206 |
|
|
| 207 |
|
<property name="release.jar" value="dist/jsr166-${version}-dist.jar"/> |
| 208 |
|
|
| 209 |
|
<jar basedir="${basedir}" destfile="${release.jar}"> |
| 210 |
|
<!-- <exclude name="build/**"/> --> |
| 211 |
|
<exclude name="${release.jar}"/> |
| 212 |
|
<exclude name="user.properties"/> |
| 213 |
|
<exclude name="etc/notes/**"/> |
| 214 |
|
<exclude name="src/emulation/**"/> |
| 215 |
|
<exclude name="**/SyntaxTest.java"/> |
| 216 |
|
<exclude name="**/SuperfluousAbstract.java"/> |
| 217 |
|
</jar> |
| 218 |
|
|
| 219 |
</target> |
</target> |
| 220 |
|
|
| 221 |
|
|
|
<target name="dist" |
|
|
depends="init, dist-clean, dist-jar, dist-docs" |
|
|
description="Puts all distributable products in single hierarchy"/> |
|
|
|
|
| 222 |
|
|
| 223 |
<target name="clean" |
<target name="clean" |
| 224 |
description="Removes all build products"> |
description="Removes all build products"> |
| 230 |
</target> |
</target> |
| 231 |
|
|
| 232 |
|
|
| 233 |
|
|
| 234 |
<target name="dist-clean" |
<target name="dist-clean" |
| 235 |
description="Removes all build and distribution products"> |
description="Removes all build and distribution products"> |
| 236 |
|
|
| 239 |
</target> |
</target> |
| 240 |
|
|
| 241 |
|
|
| 242 |
|
|
| 243 |
<target name="dist-docs" |
<target name="dist-docs" |
|
depends="filter-src" |
|
| 244 |
description="Builds javadocs without custom tags to dist folder"> |
description="Builds javadocs without custom tags to dist folder"> |
| 245 |
|
|
| 246 |
<delete dir="${dist.javadocs.dir}"/> |
<delete dir="${dist.javadocs.dir}"/> |
| 247 |
<mkdir dir="${dist.javadocs.dir}"/> |
<mkdir dir="${dist.javadocs.dir}"/> |
| 248 |
|
|
| 249 |
<javadoc destdir="${dist.javadocs.dir}" |
<javadoc destdir="${dist.javadocs.dir}" |
| 250 |
link="http://java.sun.com/j2se/1.4.1/docs/api" |
link="http://java.sun.com/j2se/1.4.2/docs/api" |
| 251 |
overview="${src.dir}/intro.html" |
overview="${src.dir}/intro.html" |
| 252 |
source="${build.docsourcelevel}"> |
source="${build.sourcelevel}"> |
| 253 |
|
|
| 254 |
<packageset dir="${build.filter.src.dir}"/> |
<packageset dir="${src.dir}"/> |
| 255 |
|
|
| 256 |
</javadoc> |
</javadoc> |
| 257 |
|
|
| 261 |
|
|
| 262 |
<!-- Internal targets --> |
<!-- Internal targets --> |
| 263 |
|
|
|
<target name="set-warnings-if" if="build.warnings"> |
|
|
|
|
|
<property name="build.warnings.arg" value="-warnunchecked"/> |
|
|
|
|
|
</target> |
|
|
|
|
| 264 |
|
|
| 265 |
<target name="set-warnings-unless" unless="build.warnings"> |
<target name="init"> |
|
|
|
|
<property name="build.warnings.arg" value=""/> |
|
|
|
|
|
</target> |
|
|
|
|
|
|
|
|
<target name="init" |
|
|
depends="set-warnings-if, set-warnings-unless"> |
|
| 266 |
|
|
| 267 |
<!-- Version is kept in a separate file --> |
<!-- Version is kept in a separate file --> |
| 268 |
<loadfile property="version" srcFile="version.properties"/> |
<loadfile property="version" srcFile="version.properties"/> |
| 269 |
<echo>Building JSR-166 version ${version}</echo> |
<echo>Building JSR-166 version ${version}</echo> |
| 270 |
|
<echo>java.home is ${java.home}</echo> |
|
<!-- Common options in javac invocations --> |
|
|
<property name="build.javac.args" |
|
|
value="${build.bootclasspath.arg} ${build.warnings.arg} ${build.novariance.arg}"/> |
|
|
|
|
|
</target> |
|
|
|
|
|
|
|
|
<target name="init-jar"> |
|
|
|
|
|
<mkdir dir="${build.lib.dir}"/> |
|
|
|
|
|
</target> |
|
|
|
|
|
|
|
|
<target name="native-jar" |
|
|
depends="compile" |
|
|
unless="build.emulation.true"> |
|
|
|
|
|
<jar destfile="${product.jar}"> |
|
|
<fileset dir="${build.classes.dir}"/> |
|
|
</jar> |
|
|
|
|
|
</target> |
|
|
|
|
|
|
|
|
<target name="compile-emulation" |
|
|
depends="init" |
|
|
if="build.emulation.true"> |
|
|
|
|
|
<mkdir dir="${build.emulation.dir}"/> |
|
|
|
|
|
<javac srcdir="${emulation.src.dir}" |
|
|
destdir="${build.emulation.dir}" |
|
|
debug="${build.debug}" |
|
|
debuglevel="${build.debuglevel}" |
|
|
deprecation="${build.deprecation}" |
|
|
source="${build.sourcelevel}" |
|
|
fork="true"> |
|
|
|
|
|
<bootclasspath refid="javac.bootclasspath"/> |
|
|
<compilerarg line="${build.javac.args}"/> |
|
|
|
|
|
</javac> |
|
|
|
|
|
</target> |
|
|
|
|
|
|
|
|
<target name="emulation-jar" |
|
|
depends="compile-emulation" |
|
|
if="build.emulation.true"> |
|
|
|
|
|
|
|
|
<jar destfile="${product.jar}" duplicate="add"> |
|
|
<fileset dir="${build.classes.dir}"> |
|
|
<patternset refid="emulation.excludes"/> |
|
|
</fileset> |
|
|
<fileset dir="${build.emulation.dir}"/> |
|
|
</jar> |
|
| 271 |
|
|
| 272 |
</target> |
</target> |
| 273 |
|
|
| 287 |
|
|
| 288 |
<javac srcdir="${ant.src.dir}" |
<javac srcdir="${ant.src.dir}" |
| 289 |
destdir="${build.ant.dir}" |
destdir="${build.ant.dir}" |
| 290 |
source="1.4" |
source="1.4"/> |
|
/> |
|
| 291 |
|
|
| 292 |
</target> |
</target> |
| 293 |
|
|
| 306 |
<copy todir="${build.filter.src.dir}"> |
<copy todir="${build.filter.src.dir}"> |
| 307 |
<fileset dir="${src.dir}"> |
<fileset dir="${src.dir}"> |
| 308 |
<exclude name="**/*.html"/> |
<exclude name="**/*.html"/> |
| 309 |
<patternset refid="emulation.excludes"/> |
<!-- Files excluded from dist-docs --> |
| 310 |
|
<exclude name="java/util/Random.*"/> |
| 311 |
|
<exclude name="sun/misc/Unsafe.*"/> |
| 312 |
</fileset> |
</fileset> |
| 313 |
|
<!-- |
| 314 |
<filterchain> |
<filterchain> |
| 315 |
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
--> |
| 316 |
classpath="${build.ant.dir}"> |
|
| 317 |
<!-- |
<!-- |
| 318 |
# These arguments are to get rid of angle-bracketed type |
# This filter gets rid of angle-bracketed type parameters |
| 319 |
# parameters so that javadoc can run on the result. The |
# so that javadoc can run on the result. The following |
| 320 |
# following heuristic that seems to work: |
# heuristic seems to work: |
| 321 |
# |
# |
| 322 |
# For all lines not starting with space(s)-asterisk-space(s), |
# For all lines not starting with space(s)-asterisk-space(s), |
| 323 |
# replace <something> with a space, where there may be more |
# replace <something> with a space, where there may be more |
| 325 |
# must not contain parens or pipes. (This may need some |
# must not contain parens or pipes. (This may need some |
| 326 |
# tweaking.) |
# tweaking.) |
| 327 |
--> |
--> |
| 328 |
|
|
| 329 |
|
<!-- |
| 330 |
|
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
| 331 |
|
classpath="${build.ant.dir}"> |
| 332 |
<param name="notmatching" value="^\s+\*\s.*$"/> |
<param name="notmatching" value="^\s+\*\s.*$"/> |
| 333 |
<param name="pattern" value="<[^|>()]+?>+"/> |
<param name="pattern" value="<[^|>()]+?>+"/> |
| 334 |
<param name="replacement" value=" "/> |
<param name="replacement" value=" "/> |
| 335 |
</filterreader> |
</filterreader> |
| 336 |
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
--> |
| 337 |
classpath="${build.ant.dir}"> |
|
| 338 |
<!-- |
<!-- |
| 339 |
# These arguments are to uncomment lines beginning with |
</filterchain> |
|
# "//@" so that javadoc can see imports that are needed |
|
|
# to resolve links but that shouldn't be in the compiled |
|
|
# code. |
|
| 340 |
--> |
--> |
| 341 |
<param name="matching" value="^//@.*$"/> |
</copy> |
| 342 |
<param name="pattern" value="^//@"/> |
|
| 343 |
<param name="replacement" value=""/> |
</target> |
| 344 |
|
|
| 345 |
|
|
| 346 |
|
<target name="filter-doccheck" |
| 347 |
|
depends="filter-src"> |
| 348 |
|
|
| 349 |
|
<mkdir dir="${build.dc-filter.dir}"/> |
| 350 |
|
|
| 351 |
|
<copy todir="${build.dc-filter.dir}"> |
| 352 |
|
<fileset dir="${build.filter.src.dir}"> |
| 353 |
|
<include name="**/*.html"/> |
| 354 |
|
</fileset> |
| 355 |
|
</copy> |
| 356 |
|
|
| 357 |
|
<property name="generic.declarations" |
| 358 |
|
value="/** Fake type parameter. */ public interface E {} /** Fake type parameter. */ public interface T {} /** Fake type parameter. */ public interface K {} /** Fake type parameter. */ public interface V {}" |
| 359 |
|
/> |
| 360 |
|
|
| 361 |
|
<copy todir="${build.dc-filter.dir}"> |
| 362 |
|
<fileset dir="${build.filter.src.dir}"> |
| 363 |
|
<exclude name="**/*.html"/> |
| 364 |
|
</fileset> |
| 365 |
|
<filterchain> |
| 366 |
|
<!-- |
| 367 |
|
# These two filters try to make the source look like |
| 368 |
|
# something that doccheck can process. The first removes |
| 369 |
|
# -source 1.4 assertions and the second adds in a bunch |
| 370 |
|
# of single letter public nested marker interfaces so that |
| 371 |
|
# the generic type parameters are recognized. |
| 372 |
|
--> |
| 373 |
|
|
| 374 |
|
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
| 375 |
|
classpath="${build.ant.dir}"> |
| 376 |
|
<param name="matching" value="^\s*assert[\s ].*$"/> |
| 377 |
|
<param name="pattern" value="assert"/> |
| 378 |
|
<param name="replacement" value="//assert"/> |
| 379 |
</filterreader> |
</filterreader> |
| 380 |
|
|
| 381 |
|
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
| 382 |
|
classpath="${build.ant.dir}"> |
| 383 |
|
<param name="matching" value="^([^*]*(class|interface|implements) .*|)\{.*$"/> |
| 384 |
|
<param name="pattern" value="$"/> |
| 385 |
|
<param name="replacement" value=" ${generic.declarations}"/> |
| 386 |
|
</filterreader> |
| 387 |
|
|
| 388 |
</filterchain> |
</filterchain> |
| 389 |
</copy> |
</copy> |
| 390 |
|
|
| 396 |
|
|
| 397 |
<mkdir dir="${build.testcases.dir}"/> |
<mkdir dir="${build.testcases.dir}"/> |
| 398 |
|
|
| 399 |
|
<javac srcdir="${tck.src.dir}" |
| 400 |
|
destdir="${build.testcases.dir}" |
| 401 |
|
debug="${build.debug}" |
| 402 |
|
debuglevel="${build.debuglevel}" |
| 403 |
|
deprecation="${build.deprecation}" |
| 404 |
|
source="${build.sourcelevel}" |
| 405 |
|
fork="true"> |
| 406 |
|
|
| 407 |
|
<compilerarg value="${bootclasspath.args}"/> |
| 408 |
|
<compilerarg line="${build.args}"/> |
| 409 |
|
|
| 410 |
|
<classpath refid="test.classpath"/> |
| 411 |
|
|
| 412 |
|
</javac> |
| 413 |
|
|
| 414 |
<javac srcdir="${test.src.dir}" |
<javac srcdir="${test.src.dir}" |
| 415 |
destdir="${build.testcases.dir}" |
destdir="${build.testcases.dir}" |
| 416 |
debug="${build.debug}" |
debug="${build.debug}" |
| 419 |
source="${build.sourcelevel}" |
source="${build.sourcelevel}" |
| 420 |
fork="true"> |
fork="true"> |
| 421 |
|
|
| 422 |
|
<include name="jsr166/test/**"/> |
| 423 |
|
|
| 424 |
|
<compilerarg value="${bootclasspath.args}"/> |
| 425 |
|
<compilerarg line="${build.args}"/> |
| 426 |
|
|
| 427 |
<classpath refid="test.classpath"/> |
<classpath refid="test.classpath"/> |
|
<bootclasspath refid="javac.bootclasspath"/> |
|
|
<compilerarg line="${build.javac.args}"/> |
|
| 428 |
|
|
| 429 |
</javac> |
</javac> |
| 430 |
|
|
| 431 |
|
<!-- |
| 432 |
|
<javac srcdir="${jtreg.src.dir}" |
| 433 |
|
destdir="${build.testcases.dir}" |
| 434 |
|
debug="${build.debug}" |
| 435 |
|
debuglevel="${build.debuglevel}" |
| 436 |
|
deprecation="${build.deprecation}" |
| 437 |
|
source="${build.sourcelevel}" |
| 438 |
|
fork="true"> |
| 439 |
|
|
| 440 |
|
<compilerarg value="${bootclasspath.args}"/> |
| 441 |
|
<compilerarg line="${build.args}"/> |
| 442 |
|
|
| 443 |
|
<classpath refid="test.classpath"/> |
| 444 |
|
|
| 445 |
|
</javac> |
| 446 |
|
--> |
| 447 |
|
|
| 448 |
</target> |
</target> |
| 449 |
|
|
| 450 |
|
|
| 463 |
dir="${build.reports.dir}" |
dir="${build.reports.dir}" |
| 464 |
fork="true"> |
fork="true"> |
| 465 |
|
|
| 466 |
<jvmarg value="${test.bootclasspath.arg}"/> |
<jvmarg value="${bootclasspath.args}"/> |
| 467 |
|
<jvmarg value="-server"/> |
| 468 |
|
<jvmarg value="-showversion"/> |
| 469 |
|
|
| 470 |
|
<classpath refid="test.classpath"/> |
| 471 |
|
|
| 472 |
<formatter type="xml"/> |
<formatter type="xml"/> |
| 473 |
|
|
| 474 |
<batchtest todir="${build.reports.dir}"> |
<batchtest todir="${build.reports.dir}" unless="no.test.tck"> |
| 475 |
|
<fileset dir="${tck.src.dir}"> |
| 476 |
|
<include name="**/${testcase}Test.java"/> |
| 477 |
|
</fileset> |
| 478 |
|
</batchtest> |
| 479 |
|
|
| 480 |
|
<batchtest todir="${build.reports.dir}" if="do.test.old"> |
| 481 |
<fileset dir="${test.src.dir}"> |
<fileset dir="${test.src.dir}"> |
| 482 |
|
<include name="jsr166/test/**/${testcase}Test.java"/> |
| 483 |
|
</fileset> |
| 484 |
|
</batchtest> |
| 485 |
|
|
| 486 |
|
<!-- |
| 487 |
|
<batchtest todir="${build.reports.dir}" if="do.test.jtreg"> |
| 488 |
|
<fileset dir="${jtreg.src.dir}"> |
| 489 |
<include name="**/${testcase}Test.java"/> |
<include name="**/${testcase}Test.java"/> |
| 490 |
</fileset> |
</fileset> |
| 491 |
</batchtest> |
</batchtest> |
| 492 |
|
--> |
| 493 |
|
|
| 494 |
</junit> |
</junit> |
| 495 |
|
|
| 499 |
<target name="report-tests" |
<target name="report-tests" |
| 500 |
depends="run-tests"> |
depends="run-tests"> |
| 501 |
|
|
| 502 |
<!-- Sets junit.report.format to frames if Xalan is present, |
<!-- Sets junit.report.format to frames if redirection is present, |
| 503 |
otherwise sets it to noframes. --> |
otherwise sets it to noframes. --> |
| 504 |
<available property="junit.report.format" |
<available property="junit.report.format" |
| 505 |
value="frames" |
value="frames" |
| 522 |
</target> |
</target> |
| 523 |
|
|
| 524 |
|
|
| 525 |
<target name="check-junit"> |
<target name="configure-compiler"> |
| 526 |
|
|
| 527 |
|
<property name="unchecked.option" value="-Xlint:unchecked"/> |
| 528 |
|
|
| 529 |
|
<condition property="warnunchecked.arg" value="${unchecked.option}"> |
| 530 |
|
<istrue value="${build.warnunchecked}"/> |
| 531 |
|
</condition> |
| 532 |
|
|
| 533 |
|
<property name="warnunchecked.arg" value=""/> |
| 534 |
|
|
| 535 |
|
|
| 536 |
|
<!-- Common options in javac invocations --> |
| 537 |
|
<property name="build.args" value="${warnunchecked.arg}"/> |
| 538 |
|
|
| 539 |
|
</target> |
| 540 |
|
|
| 541 |
|
|
| 542 |
|
<target name="configure-tests" |
| 543 |
|
depends="configure-compiler"> |
| 544 |
|
|
| 545 |
<!-- junit.framework.Protectable is in JUnit 3.8.1 but not in 3.7 --> |
<!-- junit.framework.Protectable is in JUnit 3.8.1 but not in 3.7 --> |
| 546 |
<available property="junit.available" |
<available property="junit.available" |
| 547 |
classname="junit.framework.Protectable"/> |
classname="junit.framework.Protectable"/> |
| 548 |
|
|
| 549 |
|
<!-- Xalan --> |
| 550 |
|
<available property="xalan.available" |
| 551 |
|
classname="org.apache.xalan.Version"/> |
| 552 |
|
|
| 553 |
|
|
| 554 |
|
<!-- Ant 1.6beta and later don't need or want this check --> |
| 555 |
|
<!-- |
| 556 |
<fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests" |
<fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests" |
| 557 |
unless="junit.available"/> |
unless="junit.available"/> |
| 558 |
|
|
| 559 |
</target> |
<fail message="Need Xalan 2.5.1 jar in ${ant.home}${file.separator}lib to run tests" |
| 560 |
|
unless="xalan.available"/> |
| 561 |
|
--> |
| 562 |
|
|
|
<target name="check-emulation"> |
|
|
<condition property="build.emulation.true"> |
|
|
<or> |
|
|
<isset property="build.emulation"/> |
|
|
<os family="windows"/> |
|
|
</or> |
|
|
</condition> |
|
| 563 |
</target> |
</target> |
| 564 |
|
|
| 565 |
|
|
| 566 |
|
|
| 567 |
<!-- Anthill targets --> |
<!-- Anthill targets --> |
| 568 |
|
|
| 569 |
<target name="anthill-build" |
<target name="anthill-build"> |
| 570 |
|
|
| 571 |
|
<!-- Override this in user.properties --> |
| 572 |
|
<property name="tiger.home" location="e:/j2sdk1.5.0"/> |
| 573 |
|
|
| 574 |
|
<exec resultproperty="result.property" dir="${basedir}" executable="${tiger.home}/bin/java"> |
| 575 |
|
<arg value="-Xmx256000000"/> |
| 576 |
|
<!-- classpath of new JVM --> |
| 577 |
|
<arg value="-classpath"/> <arg path="${java.class.path}"/> |
| 578 |
|
<!-- location of Ant home directory --> |
| 579 |
|
<arg value="-Dant.home=${ant.home}"/> |
| 580 |
|
<!-- the Ant main class --> |
| 581 |
|
<arg value="org.apache.tools.ant.Main"/> |
| 582 |
|
<!-- The build file --> |
| 583 |
|
<arg value="-buildfile"/> <arg value="build.xml"/> |
| 584 |
|
<!-- the target to build on the new Ant instance --> |
| 585 |
|
<arg value="-DJAVA_HOME=${tiger.home}"/> |
| 586 |
|
<arg value="do-anthill-build"/> |
| 587 |
|
</exec> |
| 588 |
|
</target> |
| 589 |
|
|
| 590 |
|
<target name="do-anthill-build" |
| 591 |
depends="jar, test, docs, dist-docs"/> |
depends="jar, test, docs, dist-docs"/> |
| 592 |
|
|
| 593 |
<target name="anthill-publish"> |
<target name="anthill-publish"> |
| 610 |
</target> |
</target> |
| 611 |
|
|
| 612 |
|
|
| 613 |
|
|
| 614 |
|
<!-- Various demos and test programs --> |
| 615 |
|
|
| 616 |
|
|
| 617 |
|
<target name="sample" depends="init, configure-compiler" |
| 618 |
|
description="Standalone demo program"> |
| 619 |
|
|
| 620 |
|
<mkdir dir="${build.testcases.dir}"/> |
| 621 |
|
|
| 622 |
|
<javac srcdir="${test.src.dir}" |
| 623 |
|
destdir="${build.testcases.dir}" |
| 624 |
|
debug="${build.debug}" |
| 625 |
|
debuglevel="${build.debuglevel}" |
| 626 |
|
deprecation="${build.deprecation}" |
| 627 |
|
source="${build.sourcelevel}" |
| 628 |
|
fork="true"> |
| 629 |
|
|
| 630 |
|
<include name="jsr166/test/Sample.java"/> |
| 631 |
|
|
| 632 |
|
</javac> |
| 633 |
|
|
| 634 |
|
<copy todir="${build.testcases.dir}"> |
| 635 |
|
<fileset dir="${test.src.dir}"> |
| 636 |
|
<include name="**/*.properties"/> |
| 637 |
|
</fileset> |
| 638 |
|
</copy> |
| 639 |
|
|
| 640 |
|
|
| 641 |
|
<java classname="jsr166.test.Sample" fork="true"> |
| 642 |
|
<classpath refid="test.classpath"/> |
| 643 |
|
<!-- <jvmarg value="-ea"/> --> |
| 644 |
|
<!-- <jvmarg value="-server"/> --> |
| 645 |
|
<!-- <arg value="1000"/> --> |
| 646 |
|
</java> |
| 647 |
|
</target> |
| 648 |
|
|
| 649 |
|
|
| 650 |
|
<target name="loops" depends="init, configure-compiler" |
| 651 |
|
description="Benchmark from Doug Lea's AQS paper"> |
| 652 |
|
|
| 653 |
|
<mkdir dir="${build.loops.dir}"/> |
| 654 |
|
|
| 655 |
|
<javac srcdir="${loops.src.dir}" |
| 656 |
|
destdir="${build.loops.dir}" |
| 657 |
|
debug="${build.debug}" |
| 658 |
|
debuglevel="${build.debuglevel}" |
| 659 |
|
deprecation="${build.deprecation}" |
| 660 |
|
source="${build.sourcelevel}" |
| 661 |
|
fork="true"> |
| 662 |
|
|
| 663 |
|
<compilerarg line="${build.args}"/> |
| 664 |
|
<classpath refid="loops.classpath"/> |
| 665 |
|
|
| 666 |
|
</javac> |
| 667 |
|
|
| 668 |
|
<java classname="ALoops" fork="true"> |
| 669 |
|
<classpath refid="loops.classpath"/> |
| 670 |
|
</java> |
| 671 |
|
|
| 672 |
|
</target> |
| 673 |
|
|
| 674 |
|
|
| 675 |
|
<target name="compile-j1" depends="init, configure-compiler"> |
| 676 |
|
|
| 677 |
|
<mkdir dir="${build.j1.dir}"/> |
| 678 |
|
|
| 679 |
|
<javac srcdir="${j1.src.dir}" |
| 680 |
|
destdir="${build.j1.dir}" |
| 681 |
|
debug="${build.debug}" |
| 682 |
|
debuglevel="${build.debuglevel}" |
| 683 |
|
deprecation="${build.deprecation}" |
| 684 |
|
source="${build.sourcelevel}" > |
| 685 |
|
|
| 686 |
|
<include name="**/*.java"/> |
| 687 |
|
<exclude name="**/dijkstra/**"/> |
| 688 |
|
|
| 689 |
|
<compilerarg line="${build.args}"/> |
| 690 |
|
<classpath refid="j1.classpath"/> |
| 691 |
|
|
| 692 |
|
</javac> |
| 693 |
|
|
| 694 |
|
</target> |
| 695 |
|
|
| 696 |
|
|
| 697 |
|
<target name="sw" depends="compile-j1" |
| 698 |
|
description="Runs the SwingWorker demo"> |
| 699 |
|
|
| 700 |
|
<!-- |
| 701 |
|
<java classname="jsr166.swing.SwingWorkerDemo" fork="true"> |
| 702 |
|
<classpath refid="j1.classpath"/> |
| 703 |
|
</java> |
| 704 |
|
--> |
| 705 |
|
|
| 706 |
|
<copy todir="${build.j1.dir}" file="${j1.src.dir}/jsr166/swing/SwingWorker.html"/> |
| 707 |
|
|
| 708 |
|
<exec dir="${build.j1.dir}" executable="appletviewer.exe"> |
| 709 |
|
<arg value="${build.j1.dir}/SwingWorker.html"/> |
| 710 |
|
</exec> |
| 711 |
|
|
| 712 |
|
</target> |
| 713 |
|
|
| 714 |
|
<target name="j1" depends="compile-j1" |
| 715 |
|
description="Runs a standalone JavaOne program"> |
| 716 |
|
|
| 717 |
|
<java classname="${j1.test}" fork="true"> |
| 718 |
|
<classpath refid="j1.classpath"/> |
| 719 |
|
<jvmarg value="-client"/> |
| 720 |
|
|
| 721 |
|
<!-- TestPseudoRandom args --> |
| 722 |
|
<arg value="2"/> |
| 723 |
|
<arg value="25"/> |
| 724 |
|
<arg value="100000"/> |
| 725 |
|
|
| 726 |
|
<!-- WebCrawler args --> |
| 727 |
|
<!-- |
| 728 |
|
<arg value="jsr166.webcrawler.WebCrawler3"/> |
| 729 |
|
<arg value="http://www.priorartisans.com"/> |
| 730 |
|
<arg value="25"/> |
| 731 |
|
--> |
| 732 |
|
|
| 733 |
|
</java> |
| 734 |
|
|
| 735 |
|
</target> |
| 736 |
|
|
| 737 |
|
|
| 738 |
|
<target name="test-j1" depends="compile-j1" |
| 739 |
|
description="Runs testcases from the JavaOne source directories"> |
| 740 |
|
|
| 741 |
|
<junit printsummary="true" |
| 742 |
|
showoutput="true" |
| 743 |
|
errorProperty="junit.failed" |
| 744 |
|
failureProperty="junit.failed" |
| 745 |
|
dir="${build.j1.dir}" |
| 746 |
|
fork="true"> |
| 747 |
|
|
| 748 |
|
<!-- <jvmarg value="-server"/> --> |
| 749 |
|
<classpath refid="j1.classpath"/> |
| 750 |
|
<formatter type="xml"/> |
| 751 |
|
|
| 752 |
|
<batchtest todir="${build.j1.dir}"> |
| 753 |
|
<fileset dir="${j1.src.dir}"> |
| 754 |
|
<include name="**/*Test.java"/> |
| 755 |
|
</fileset> |
| 756 |
|
</batchtest> |
| 757 |
|
|
| 758 |
|
</junit> |
| 759 |
|
|
| 760 |
|
<available property="junit.report.format" |
| 761 |
|
value="frames" |
| 762 |
|
classname="org.apache.xalan.lib.Redirect"/> |
| 763 |
|
<property name="junit.report.format" value="noframes"/> |
| 764 |
|
|
| 765 |
|
<junitreport todir="${build.j1.dir}"> |
| 766 |
|
<fileset dir="${build.j1.dir}"> |
| 767 |
|
<include name="TEST-*.xml"/> |
| 768 |
|
</fileset> |
| 769 |
|
<report styledir="${stylesheet.dir}" |
| 770 |
|
format="${junit.report.format}" |
| 771 |
|
todir="${build.j1.dir}" |
| 772 |
|
/> |
| 773 |
|
</junitreport> |
| 774 |
|
|
| 775 |
|
<fail message="Test Cases Failed" if="junit.failed"/> |
| 776 |
|
|
| 777 |
|
</target> |
| 778 |
|
|
| 779 |
|
|
| 780 |
|
|
| 781 |
|
<!-- C++ and JNI definitions and demos --> |
| 782 |
|
|
| 783 |
|
<target name="configure-cpp"> |
| 784 |
|
|
| 785 |
|
<!-- Define tasks and types --> |
| 786 |
|
|
| 787 |
|
<path id="cpptasks.path"> |
| 788 |
|
<pathelement location="${lib.dir}/cpptasks.jar"/> |
| 789 |
|
</path> |
| 790 |
|
<taskdef resource="cpptasks.tasks" classpathref="cpptasks.path"/> |
| 791 |
|
<typedef resource="cpptasks.types" classpathref="cpptasks.path"/> |
| 792 |
|
|
| 793 |
|
<!-- Set platform property for JNI includes --> |
| 794 |
|
|
| 795 |
|
<condition property="platform" value="linux"> |
| 796 |
|
<os name="Linux"/> |
| 797 |
|
</condition> |
| 798 |
|
<condition property="platform" value="win32"> |
| 799 |
|
<os family="windows"/> |
| 800 |
|
</condition> |
| 801 |
|
<condition property="platform" value="solaris"> |
| 802 |
|
<os name="SunOS"/> |
| 803 |
|
</condition> |
| 804 |
|
|
| 805 |
|
</target> |
| 806 |
|
|
| 807 |
|
|
| 808 |
|
<target name="cppdemo" depends="configure-cpp"> |
| 809 |
|
|
| 810 |
|
<mkdir dir="${build.dir}"/> |
| 811 |
|
|
| 812 |
|
<cc multithreaded="true" |
| 813 |
|
name="g++" |
| 814 |
|
objdir="${build.dir}" |
| 815 |
|
outfile="${build.dir}/CppDemo"> |
| 816 |
|
<fileset dir="${test.src.dir}" includes="CppDemo.cpp"/> |
| 817 |
|
<libset libs="stdc++"/> |
| 818 |
|
</cc> |
| 819 |
|
|
| 820 |
|
<exec executable="${build.dir}/CppDemo"> |
| 821 |
|
<arg line="count in word frequency of word in command line count"/> |
| 822 |
|
</exec> |
| 823 |
|
|
| 824 |
|
</target> |
| 825 |
|
|
| 826 |
|
|
| 827 |
|
<target name="jnidemo" depends="init, configure-compiler, configure-cpp"> |
| 828 |
|
|
| 829 |
|
<mkdir dir="${build.testcases.dir}"/> |
| 830 |
|
|
| 831 |
|
<javac srcdir="${test.src.dir}" |
| 832 |
|
destdir="${build.testcases.dir}" |
| 833 |
|
debug="${build.debug}" |
| 834 |
|
debuglevel="${build.debuglevel}" |
| 835 |
|
deprecation="${build.deprecation}" |
| 836 |
|
source="${build.sourcelevel}" |
| 837 |
|
fork="true"> |
| 838 |
|
<compilerarg value="${bootclasspath.args}"/> |
| 839 |
|
<compilerarg line="${build.args}"/> |
| 840 |
|
<classpath refid="test.classpath"/> |
| 841 |
|
<include name="JniDemo.java"/> |
| 842 |
|
</javac> |
| 843 |
|
|
| 844 |
|
<javah destdir="${build.testcases.dir}" |
| 845 |
|
classpathref="test.classpath"> |
| 846 |
|
<class name="JniDemo"/> |
| 847 |
|
</javah> |
| 848 |
|
|
| 849 |
|
<cc multithreaded="true" |
| 850 |
|
name="g++" |
| 851 |
|
objdir="${build.dir}" |
| 852 |
|
outfile="${build.dir}/JniDemo" |
| 853 |
|
outtype="shared"> |
| 854 |
|
|
| 855 |
|
<compiler> |
| 856 |
|
<defineset> |
| 857 |
|
<define name="__int64" value="long long"/> |
| 858 |
|
</defineset> |
| 859 |
|
<includepath location="${java.home}/../include"/> |
| 860 |
|
<includepath location="${java.home}/../include/${platform}"/> |
| 861 |
|
<compilerarg value="-mno-cygwin"/> |
| 862 |
|
</compiler> |
| 863 |
|
|
| 864 |
|
<linker> |
| 865 |
|
<linkerarg value="--add-stdcall-alias"/> |
| 866 |
|
</linker> |
| 867 |
|
|
| 868 |
|
<includepath location="${build.testcases.dir}"/> |
| 869 |
|
|
| 870 |
|
<fileset dir="${test.src.dir}" includes="JniDemo.cpp"/> |
| 871 |
|
|
| 872 |
|
<libset libs="stdc++"/> |
| 873 |
|
|
| 874 |
|
</cc> |
| 875 |
|
|
| 876 |
|
<!-- Necessary if windows, harmless if not --> |
| 877 |
|
<copy file="${build.dir}/libJniDemo.so" tofile="${build.dir}/JniDemo.dll"/> |
| 878 |
|
|
| 879 |
|
<java classname="JniDemo" fork="true"> |
| 880 |
|
<!-- Watch out: path separator hardwired to semicolon here! --> |
| 881 |
|
<sysproperty key="java.library.path" path="${java.library.path};${build.dir}"/> |
| 882 |
|
<classpath refid="test.classpath"/> |
| 883 |
|
<arg line="count in word frequency of word in command line count"/> |
| 884 |
|
</java> |
| 885 |
|
|
| 886 |
|
</target> |
| 887 |
|
|
| 888 |
|
|
| 889 |
|
|
| 890 |
|
<!-- Backward compatibility, work in progress (some files not checked in) --> |
| 891 |
|
|
| 892 |
|
|
| 893 |
|
|
| 894 |
|
<property name="pretiger.src.dir" location="${build.dir}/pretiger/src"/> |
| 895 |
|
<property name="build.pretiger.dir" location="${build.dir}/pretiger/classes"/> |
| 896 |
|
<property name="pretiger.jar" location="${build.lib.dir}/jsr166-pretiger.jar"/> |
| 897 |
|
<property name="pretiger.sourcelevel" value="1.4"/> |
| 898 |
|
|
| 899 |
|
<target name="defang" |
| 900 |
|
depends="init" |
| 901 |
|
description="Generates pre-Tiger compatible source"> |
| 902 |
|
|
| 903 |
|
<delete dir="${pretiger.src.dir}"/> |
| 904 |
|
<mkdir dir="${pretiger.src.dir}"/> |
| 905 |
|
|
| 906 |
|
<exec executable="perl"> |
| 907 |
|
<arg file="etc/defang.pl"/> |
| 908 |
|
<!-- <arg value="-v"/> --> |
| 909 |
|
<arg value="-s"/> <arg file="${src.dir}"/> |
| 910 |
|
<arg value="-t"/> <arg file="${pretiger.src.dir}"/> |
| 911 |
|
</exec> |
| 912 |
|
|
| 913 |
|
</target> |
| 914 |
|
|
| 915 |
|
<target name="compile-pretiger" |
| 916 |
|
depends="init, configure-compiler, defang" |
| 917 |
|
description="Compiles pre-Tiger sources to build folder"> |
| 918 |
|
|
| 919 |
|
<mkdir dir="${build.pretiger.dir}"/> |
| 920 |
|
|
| 921 |
|
<javac srcdir="${pretiger.src.dir}" |
| 922 |
|
destdir="${build.pretiger.dir}" |
| 923 |
|
debug="${build.debug}" |
| 924 |
|
debuglevel="${build.debuglevel}" |
| 925 |
|
deprecation="${build.deprecation}" |
| 926 |
|
source="${pretiger.sourcelevel}" |
| 927 |
|
fork="true"> |
| 928 |
|
|
| 929 |
|
<compilerarg line="${build.args}"/> |
| 930 |
|
<exclude name="**/Thread.java"/> |
| 931 |
|
|
| 932 |
|
</javac> |
| 933 |
|
|
| 934 |
|
</target> |
| 935 |
|
|
| 936 |
|
<target name="pretiger" depends="compile-pretiger"> |
| 937 |
|
|
| 938 |
|
<mkdir dir="${build.lib.dir}"/> |
| 939 |
|
|
| 940 |
|
<jar destfile="${pretiger.jar}"> |
| 941 |
|
<fileset dir="${build.pretiger.dir}"> |
| 942 |
|
</fileset> |
| 943 |
|
</jar> |
| 944 |
|
|
| 945 |
|
</target> |
| 946 |
|
|
| 947 |
</project> |
</project> |