| 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"/> |
| 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.lib.dir" location="${build.dir}/lib"/> |
<property name="build.lib.dir" location="${build.dir}/lib"/> |
| 34 |
<property name="build.ant.dir" location="${build.dir}/ant"/> |
<property name="build.ant.dir" location="${build.dir}/ant"/> |
| 35 |
<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"/> |
|
| 36 |
<property name="build.reports.dir" location="${build.dir}/reports"/> |
<property name="build.reports.dir" location="${build.dir}/reports"/> |
| 37 |
|
<property name="build.checkstyle.dir" location="${build.dir}/checkstyle"/> |
| 38 |
<property name="build.doccheck.dir" location="${build.dir}/doccheck"/> |
<property name="build.doccheck.dir" location="${build.dir}/doccheck"/> |
| 39 |
<property name="build.filter.src.dir" location="${build.dir}/filtersrc"/> |
<property name="build.filter.src.dir" location="${build.dir}/filtersrc"/> |
| 40 |
|
<property name="build.dc-filter.dir" location="${build.dir}/filterdocchk"/> |
| 41 |
|
|
| 42 |
<!-- Source locations --> |
<!-- Source locations --> |
| 43 |
<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"/> |
|
| 44 |
<property name="test.src.dir" location="${basedir}/src/test"/> |
<property name="test.src.dir" location="${basedir}/src/test"/> |
| 45 |
|
<property name="tck.src.dir" location="${test.src.dir}/tck"/> |
| 46 |
|
<property name="jtreg.src.dir" location="${test.src.dir}/jtreg"/> |
| 47 |
<property name="ant.src.dir" location="${basedir}/etc/ant"/> |
<property name="ant.src.dir" location="${basedir}/etc/ant"/> |
| 48 |
<property name="stylesheet.dir" location="${basedir}/etc/xsl"/> |
<property name="stylesheet.dir" location="${basedir}/etc/xsl"/> |
| 49 |
<property name="lib.dir" location="${basedir}/lib"/> |
<property name="lib.dir" location="${basedir}/lib"/> |
| 55 |
<!-- Jar locations --> |
<!-- Jar locations --> |
| 56 |
<property name="product.jar" location="${build.lib.dir}/jsr166.jar"/> |
<property name="product.jar" location="${build.lib.dir}/jsr166.jar"/> |
| 57 |
<property name="junit.jar" location="${lib.dir}/junit.jar"/> |
<property name="junit.jar" location="${lib.dir}/junit.jar"/> |
|
<property name="rt.jar" location="${java.home}/lib/rt.jar"/> |
|
| 58 |
|
|
| 59 |
|
<!-- Bootclasspath argument --> |
| 60 |
|
<property name="bootclasspath.args" value="-Xbootclasspath/p:${product.jar}"/> |
| 61 |
|
|
| 62 |
|
<!-- Test classpath --> |
| 63 |
<!-- Files excluded from dist-docs and emulation jar --> |
<path id="test.classpath"> |
| 64 |
<patternset id="unsafe.exclusion"> |
<pathelement location="${build.testcases.dir}"/> |
| 65 |
<exclude name="java/util/Random.*"/> |
<pathelement location="${junit.jar}"/> |
| 66 |
<exclude name="sun/misc/Unsafe.*"/> |
</path> |
|
</patternset> |
|
|
|
|
|
<!-- Files excludes from emulation jar --> |
|
|
<patternset id="atomic.exclusion"> |
|
|
<exclude name="java/util/concurrent/atomic/AtomicBoolean*"/> |
|
|
<exclude name="java/util/concurrent/atomic/AtomicInteger*"/> |
|
|
<exclude name="java/util/concurrent/atomic/AtomicLong*"/> |
|
|
<exclude name="java/util/concurrent/atomic/AtomicReference*"/> |
|
|
</patternset> |
|
| 67 |
|
|
| 68 |
|
|
| 69 |
|
|
| 70 |
<!-- Main targets --> |
<!-- Main targets --> |
| 71 |
|
|
| 72 |
|
|
| 73 |
<target name="compile" |
<target name="compile" |
| 74 |
depends="init, configure-compiler, prepare-src" |
depends="init, configure-compiler" |
| 75 |
description="Compiles main sources to build folder"> |
description="Compiles main sources to build folder"> |
| 76 |
|
|
|
<property name="prepare.src.dir" value="${src.dir}"/> |
|
|
|
|
| 77 |
<mkdir dir="${build.classes.dir}"/> |
<mkdir dir="${build.classes.dir}"/> |
| 78 |
|
|
| 79 |
<!-- |
<javac srcdir="${src.dir}" |
|
<echo>javac ${gjc.args}</echo> |
|
|
<echo>bootclasspath=${compile.bootclasspath}</echo> |
|
|
--> |
|
|
|
|
|
<javac srcdir="${prepare.src.dir}" |
|
| 80 |
destdir="${build.classes.dir}" |
destdir="${build.classes.dir}" |
| 81 |
debug="${build.debug}" |
debug="${build.debug}" |
| 82 |
debuglevel="${build.debuglevel}" |
debuglevel="${build.debuglevel}" |
| 84 |
source="${build.sourcelevel}" |
source="${build.sourcelevel}" |
| 85 |
fork="true"> |
fork="true"> |
| 86 |
|
|
| 87 |
<compilerarg line="${gjc.args}"/> |
<compilerarg line="${build.args}"/> |
|
<bootclasspath refid="compile.bootclasspath"/> |
|
| 88 |
|
|
| 89 |
</javac> |
</javac> |
| 90 |
|
|
| 91 |
</target> |
</target> |
| 92 |
|
|
| 93 |
|
|
|
<target name="jar" |
|
|
depends="configure-emulation, init-jar, native-jar, emulation-jar" |
|
|
description="Builds library jar from compiled sources"/> |
|
|
|
|
|
|
|
|
<target name="test" |
|
|
depends="init, configure-tests, report-tests" |
|
|
description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" /> |
|
|
|
|
| 94 |
|
|
| 95 |
<target name="checkstyle" |
<target name="jar" |
| 96 |
depends="filter-src" |
depends="compile" |
| 97 |
description="Reports on style errors in Java source (verbose, mostly chaff)"> |
description="Builds library jar from compiled sources"> |
| 98 |
|
|
| 99 |
<taskdef resource="checkstyletask.properties" |
<mkdir dir="${build.lib.dir}"/> |
|
classpath="${lib.dir}/checkstyle-all-2.4.jar"/> |
|
| 100 |
|
|
| 101 |
<checkstyle> |
<jar destfile="${product.jar}"> |
| 102 |
<formatter type="plain"/> <!-- also available: type="xml" --> |
<fileset dir="${build.classes.dir}"/> |
| 103 |
<fileset dir="${build.filter.src.dir}" includes="**/*.java"/> |
</jar> |
|
</checkstyle> |
|
| 104 |
|
|
| 105 |
</target> |
</target> |
| 106 |
|
|
| 107 |
|
|
|
<target name="doccheck" |
|
|
depends="filter-src" |
|
|
description="Reports on javadoc style errors (not working yet)"> |
|
| 108 |
|
|
| 109 |
<delete dir="${build.doccheck.dir}"/> |
<target name="test" |
| 110 |
<mkdir dir="${build.doccheck.dir}"/> |
depends="init, configure-tests, report-tests" |
| 111 |
|
description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" /> |
|
<javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck" |
|
|
docletpath="${lib.dir}/doccheck.jar" |
|
|
destdir="${build.doccheck.dir}"> |
|
|
<packageset dir="${build.filter.src.dir}"/> |
|
|
</javadoc> |
|
| 112 |
|
|
|
</target> |
|
| 113 |
|
|
| 114 |
|
|
| 115 |
<target name="docs" |
<target name="docs" |
|
depends="filter-src" |
|
| 116 |
description="Builds javadocs with custom tags to build folder"> |
description="Builds javadocs with custom tags to build folder"> |
| 117 |
|
|
| 118 |
<delete dir="${build.javadocs.dir}"/> |
<delete dir="${build.javadocs.dir}"/> |
| 121 |
<javadoc destdir="${build.javadocs.dir}" |
<javadoc destdir="${build.javadocs.dir}" |
| 122 |
link="http://java.sun.com/j2se/1.4.1/docs/api" |
link="http://java.sun.com/j2se/1.4.1/docs/api" |
| 123 |
overview="${src.dir}/intro.html" |
overview="${src.dir}/intro.html" |
| 124 |
source="${build.docsourcelevel}"> |
source="${build.sourcelevel}"> |
| 125 |
|
|
| 126 |
<tag name="revised" description="Last revised:"/> |
<tag name="revised" description="Last revised:"/> |
| 127 |
<tag name="spec" description="Specified by:"/> |
<tag name="spec" description="Specified by:"/> |
|
<tag name="editor" description="Last edited by:"/> |
|
|
<tag name="fixme" description="FIX ME:"/> |
|
| 128 |
|
|
| 129 |
<packageset dir="${build.filter.src.dir}"/> |
<packageset dir="${src.dir}"/> |
| 130 |
|
|
| 131 |
</javadoc> |
</javadoc> |
| 132 |
|
|
| 133 |
</target> |
</target> |
| 134 |
|
|
| 135 |
|
|
|
<target name="strip" |
|
|
depends="init, configure-compiler" |
|
|
description="Strip generics from java source (not working yet)"> |
|
| 136 |
|
|
| 137 |
<mkdir dir="${build.stripped.dir}"/> |
<target name="doccheck" |
| 138 |
|
depends="filter-doccheck" |
| 139 |
|
description="Reports on javadoc style errors"> |
| 140 |
|
|
| 141 |
<!-- |
<delete dir="${build.doccheck.dir}"/> |
| 142 |
# javac -s doesn't reliably generate compilable code. It generates |
<mkdir dir="${build.doccheck.dir}"/> |
|
# 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"> |
|
| 143 |
|
|
| 144 |
<compilerarg line="${gjc.args} -s"/> |
<javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck" |
| 145 |
<bootclasspath refid="compile.bootclasspath"/> |
docletpath="${lib.dir}/doccheck.jar" |
| 146 |
|
destdir="${build.doccheck.dir}"> |
| 147 |
|
<packageset dir="${build.dc-filter.dir}"/> |
| 148 |
|
</javadoc> |
| 149 |
|
|
| 150 |
</javac> |
<echo>DocCheck output is in ${build.doccheck.dir}</echo> |
| 151 |
|
|
| 152 |
</target> |
</target> |
| 153 |
|
|
| 154 |
|
|
| 155 |
|
|
| 156 |
|
<target name="checkstyle" |
| 157 |
|
depends="filter-src" |
| 158 |
|
description="Reports on style errors in Java source (verbose, mostly chaff)"> |
| 159 |
|
|
| 160 |
|
<taskdef resource="checkstyletask.properties" |
| 161 |
|
classpath="${lib.dir}/checkstyle-all-3.1.jar"/> |
| 162 |
|
|
| 163 |
|
<mkdir dir="${build.checkstyle.dir}"/> |
| 164 |
|
|
| 165 |
|
<checkstyle config="etc/checkstyle/sun_checks.xml" |
| 166 |
|
failOnViolation="false"> |
| 167 |
|
<formatter type="xml" toFile="${build.checkstyle.dir}/checkstyle-report.xml"/> |
| 168 |
|
<fileset dir="${build.filter.src.dir}" includes="**/*.java"/> |
| 169 |
|
</checkstyle> |
| 170 |
|
|
| 171 |
|
<style in="${build.checkstyle.dir}/checkstyle-report.xml" |
| 172 |
|
out="${build.checkstyle.dir}/checkstyle-report.html" |
| 173 |
|
style="${stylesheet.dir}/checkstyle-frames.xsl"/> |
| 174 |
|
|
| 175 |
|
</target> |
| 176 |
|
|
| 177 |
|
|
| 178 |
|
|
| 179 |
<target name="dist" |
<target name="dist" |
| 180 |
depends="init, dist-clean, dist-jar, dist-docs" |
depends="init, dist-clean, dist-jar, dist-docs" |
| 181 |
description="Puts all distributable products in single hierarchy"/> |
description="Puts all distributable products in single hierarchy"/> |
| 182 |
|
|
| 183 |
|
|
| 184 |
|
|
| 185 |
<target name="release" |
<target name="release" |
| 186 |
depends="dist" |
depends="dist" |
| 187 |
description="Puts entire CVS tree, plus distribution productions, in a jar"> |
description="Puts entire CVS tree, plus distribution productions, in a jar"> |
| 188 |
|
|
|
<!-- |
|
|
#keep build dir? - dl |
|
|
<delete dir="${build.dir}"/> |
|
|
--> |
|
| 189 |
<property name="release.jar" value="dist/jsr166-${version}-dist.jar"/> |
<property name="release.jar" value="dist/jsr166-${version}-dist.jar"/> |
| 190 |
|
|
| 191 |
<jar basedir="${basedir}" destfile="${release.jar}"> |
<jar basedir="${basedir}" destfile="${release.jar}"> |
| 192 |
|
<!-- <exclude name="build/**"/> --> |
| 193 |
<exclude name="${release.jar}"/> |
<exclude name="${release.jar}"/> |
| 194 |
<exclude name="user.properties"/> |
<exclude name="user.properties"/> |
| 195 |
<exclude name="etc/notes/**"/> |
<exclude name="etc/notes/**"/> |
| 196 |
<exclude name="lib/gjc/2.1/**"/> |
<exclude name="src/emulation/**"/> |
| 197 |
<exclude name="**/SyntaxTest.java"/> |
<exclude name="**/SyntaxTest.java"/> |
| 198 |
|
<exclude name="**/SuperfluousAbstract.java"/> |
| 199 |
</jar> |
</jar> |
| 200 |
|
|
| 201 |
</target> |
</target> |
| 202 |
|
|
| 203 |
|
|
| 204 |
|
|
| 205 |
<target name="clean" |
<target name="clean" |
| 206 |
description="Removes all build products"> |
description="Removes all build products"> |
| 207 |
|
|
| 212 |
</target> |
</target> |
| 213 |
|
|
| 214 |
|
|
| 215 |
|
|
| 216 |
<target name="dist-clean" |
<target name="dist-clean" |
| 217 |
description="Removes all build and distribution products"> |
description="Removes all build and distribution products"> |
| 218 |
|
|
| 221 |
</target> |
</target> |
| 222 |
|
|
| 223 |
|
|
| 224 |
|
|
| 225 |
<target name="dist-docs" |
<target name="dist-docs" |
|
depends="filter-src" |
|
| 226 |
description="Builds javadocs without custom tags to dist folder"> |
description="Builds javadocs without custom tags to dist folder"> |
| 227 |
|
|
| 228 |
<delete dir="${dist.javadocs.dir}"/> |
<delete dir="${dist.javadocs.dir}"/> |
| 229 |
<mkdir dir="${dist.javadocs.dir}"/> |
<mkdir dir="${dist.javadocs.dir}"/> |
| 230 |
|
|
| 231 |
<javadoc destdir="${dist.javadocs.dir}" |
<javadoc destdir="${dist.javadocs.dir}" |
| 232 |
link="http://java.sun.com/j2se/1.4.1/docs/api" |
link="http://java.sun.com/j2se/1.4.2/docs/api" |
| 233 |
overview="${src.dir}/intro.html" |
overview="${src.dir}/intro.html" |
| 234 |
source="${build.docsourcelevel}"> |
source="${build.sourcelevel}"> |
| 235 |
|
|
| 236 |
<packageset dir="${build.filter.src.dir}"/> |
<packageset dir="${src.dir}"/> |
| 237 |
|
|
| 238 |
</javadoc> |
</javadoc> |
| 239 |
|
|
| 249 |
<!-- Version is kept in a separate file --> |
<!-- Version is kept in a separate file --> |
| 250 |
<loadfile property="version" srcFile="version.properties"/> |
<loadfile property="version" srcFile="version.properties"/> |
| 251 |
<echo>Building JSR-166 version ${version}</echo> |
<echo>Building JSR-166 version ${version}</echo> |
| 252 |
|
<echo>java.home is ${java.home}</echo> |
|
</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, configure-compiler" |
|
|
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"> |
|
|
|
|
|
<compilerarg line="${gjc.args}"/> |
|
|
<bootclasspath refid="compile.bootclasspath"/> |
|
|
|
|
|
</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="atomic.exclusion"/> |
|
|
<patternset refid="unsafe.exclusion"/> |
|
|
</fileset> |
|
|
<fileset dir="${build.emulation.dir}"/> |
|
|
</jar> |
|
| 253 |
|
|
| 254 |
</target> |
</target> |
| 255 |
|
|
| 286 |
</fileset> |
</fileset> |
| 287 |
</copy> |
</copy> |
| 288 |
|
|
|
<!-- Not needed now, used for doccheck filtering: |
|
|
<property name="generic.declarations" |
|
|
value="public interface E {} public interface T {} public interface K {} public interface V {}" |
|
|
/> |
|
|
--> |
|
|
|
|
| 289 |
<copy todir="${build.filter.src.dir}"> |
<copy todir="${build.filter.src.dir}"> |
| 290 |
<fileset dir="${src.dir}"> |
<fileset dir="${src.dir}"> |
| 291 |
<exclude name="**/*.html"/> |
<exclude name="**/*.html"/> |
| 292 |
<patternset refid="unsafe.exclusion"/> |
<!-- Files excluded from dist-docs --> |
| 293 |
|
<exclude name="java/util/Random.*"/> |
| 294 |
|
<exclude name="sun/misc/Unsafe.*"/> |
| 295 |
</fileset> |
</fileset> |
| 296 |
|
<!-- |
| 297 |
<filterchain> |
<filterchain> |
| 298 |
|
--> |
| 299 |
|
|
| 300 |
<!-- |
<!-- |
| 301 |
# This filter gets rid of angle-bracketed type parameters |
# This filter gets rid of angle-bracketed type parameters |
| 309 |
# tweaking.) |
# tweaking.) |
| 310 |
--> |
--> |
| 311 |
|
|
| 312 |
|
<!-- |
| 313 |
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
| 314 |
classpath="${build.ant.dir}"> |
classpath="${build.ant.dir}"> |
| 315 |
<param name="notmatching" value="^\s+\*\s.*$"/> |
<param name="notmatching" value="^\s+\*\s.*$"/> |
| 316 |
<param name="pattern" value="<[^|>()]+?>+"/> |
<param name="pattern" value="<[^|>()]+?>+"/> |
| 317 |
<param name="replacement" value=" "/> |
<param name="replacement" value=" "/> |
| 318 |
</filterreader> |
</filterreader> |
| 319 |
|
--> |
| 320 |
|
|
| 321 |
<!-- |
<!-- |
| 322 |
# This filter uncomments lines beginning with "//@" so that |
</filterchain> |
|
# javadoc can see imports that are needed to resolve links |
|
|
# but that shouldn't be in the compiled code. |
|
| 323 |
--> |
--> |
| 324 |
|
</copy> |
| 325 |
|
|
| 326 |
|
</target> |
| 327 |
|
|
|
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
|
|
classpath="${build.ant.dir}"> |
|
|
<param name="matching" value="^//@.*$"/> |
|
|
<param name="pattern" value="^//@"/> |
|
|
<param name="replacement" value=""/> |
|
|
</filterreader> |
|
| 328 |
|
|
| 329 |
|
<target name="filter-doccheck" |
| 330 |
|
depends="filter-src"> |
| 331 |
|
|
| 332 |
|
<mkdir dir="${build.dc-filter.dir}"/> |
| 333 |
|
|
| 334 |
|
<copy todir="${build.dc-filter.dir}"> |
| 335 |
|
<fileset dir="${build.filter.src.dir}"> |
| 336 |
|
<include name="**/*.html"/> |
| 337 |
|
</fileset> |
| 338 |
|
</copy> |
| 339 |
|
|
| 340 |
|
<property name="generic.declarations" |
| 341 |
|
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 {}" |
| 342 |
|
/> |
| 343 |
|
|
| 344 |
|
<copy todir="${build.dc-filter.dir}"> |
| 345 |
|
<fileset dir="${build.filter.src.dir}"> |
| 346 |
|
<exclude name="**/*.html"/> |
| 347 |
|
</fileset> |
| 348 |
|
<filterchain> |
| 349 |
<!-- |
<!-- |
| 350 |
# The next two filters try to make the source look like |
# These two filters try to make the source look like |
| 351 |
# something that doccheck can process. The first removes |
# something that doccheck can process. The first removes |
| 352 |
# -source 1.4 assertions and the second adds in a bunch |
# -source 1.4 assertions and the second adds in a bunch |
| 353 |
# of single letter public nested marker interfaces so that |
# of single letter public nested marker interfaces so that |
| 354 |
# the generic type parameters are recognized. |
# the generic type parameters are recognized. |
|
# |
|
|
# Currently commented out because doccheck doesn't work. :-( |
|
| 355 |
--> |
--> |
| 356 |
|
|
|
<!-- |
|
| 357 |
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
| 358 |
classpath="${build.ant.dir}"> |
classpath="${build.ant.dir}"> |
| 359 |
<param name="matching" value="^\s*assert[\s ].*$"/> |
<param name="matching" value="^\s*assert[\s ].*$"/> |
| 363 |
|
|
| 364 |
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
| 365 |
classpath="${build.ant.dir}"> |
classpath="${build.ant.dir}"> |
| 366 |
<param name="matching" value="^(.*(class|interface|implements) .*|)\{.*$"/> |
<param name="matching" value="^([^*]*(class|interface|implements) .*|)\{.*$"/> |
| 367 |
<param name="pattern" value="$"/> |
<param name="pattern" value="$"/> |
| 368 |
<param name="replacement" value=" ${generic.declarations}"/> |
<param name="replacement" value=" ${generic.declarations}"/> |
| 369 |
</filterreader> |
</filterreader> |
|
--> |
|
| 370 |
|
|
| 371 |
</filterchain> |
</filterchain> |
| 372 |
</copy> |
</copy> |
| 379 |
|
|
| 380 |
<mkdir dir="${build.testcases.dir}"/> |
<mkdir dir="${build.testcases.dir}"/> |
| 381 |
|
|
| 382 |
<!-- |
<javac srcdir="${tck.src.dir}" |
| 383 |
<echo>javac ${gjc.args}</echo> |
destdir="${build.testcases.dir}" |
| 384 |
<echo>bootclasspath=${test.compile.bootclasspath}</echo> |
debug="${build.debug}" |
| 385 |
<echo>classpath="${test.classpath}"</echo> |
debuglevel="${build.debuglevel}" |
| 386 |
--> |
deprecation="${build.deprecation}" |
| 387 |
|
source="${build.sourcelevel}" |
| 388 |
|
fork="true"> |
| 389 |
|
|
| 390 |
|
<compilerarg value="${bootclasspath.args}"/> |
| 391 |
|
<compilerarg line="${build.args}"/> |
| 392 |
|
|
| 393 |
|
<classpath refid="test.classpath"/> |
| 394 |
|
|
| 395 |
|
</javac> |
| 396 |
|
|
| 397 |
<javac srcdir="${test.src.dir}" |
<javac srcdir="${test.src.dir}" |
| 398 |
destdir="${build.testcases.dir}" |
destdir="${build.testcases.dir}" |
| 402 |
source="${build.sourcelevel}" |
source="${build.sourcelevel}" |
| 403 |
fork="true"> |
fork="true"> |
| 404 |
|
|
| 405 |
<compilerarg line="${gjc.args}"/> |
<include name="jsr166/test/**"/> |
| 406 |
<bootclasspath refid="test.compile.bootclasspath"/> |
|
| 407 |
|
<compilerarg value="${bootclasspath.args}"/> |
| 408 |
|
<compilerarg line="${build.args}"/> |
| 409 |
|
|
| 410 |
|
<classpath refid="test.classpath"/> |
| 411 |
|
|
| 412 |
|
</javac> |
| 413 |
|
|
| 414 |
|
<!-- |
| 415 |
|
<javac srcdir="${jtreg.src.dir}" |
| 416 |
|
destdir="${build.testcases.dir}" |
| 417 |
|
debug="${build.debug}" |
| 418 |
|
debuglevel="${build.debuglevel}" |
| 419 |
|
deprecation="${build.deprecation}" |
| 420 |
|
source="${build.sourcelevel}" |
| 421 |
|
fork="true"> |
| 422 |
|
|
| 423 |
|
<compilerarg value="${bootclasspath.args}"/> |
| 424 |
|
<compilerarg line="${build.args}"/> |
| 425 |
|
|
| 426 |
<classpath refid="test.classpath"/> |
<classpath refid="test.classpath"/> |
| 427 |
|
|
| 428 |
</javac> |
</javac> |
| 429 |
|
--> |
| 430 |
|
|
| 431 |
</target> |
</target> |
| 432 |
|
|
| 446 |
dir="${build.reports.dir}" |
dir="${build.reports.dir}" |
| 447 |
fork="true"> |
fork="true"> |
| 448 |
|
|
| 449 |
<jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/> |
<jvmarg value="${bootclasspath.args}"/> |
| 450 |
|
|
| 451 |
|
<classpath refid="test.classpath"/> |
| 452 |
|
|
| 453 |
<formatter type="xml"/> |
<formatter type="xml"/> |
| 454 |
|
|
| 455 |
<batchtest todir="${build.reports.dir}"> |
<batchtest todir="${build.reports.dir}" unless="no.test.tck"> |
| 456 |
|
<fileset dir="${tck.src.dir}"> |
| 457 |
|
<include name="**/${testcase}Test.java"/> |
| 458 |
|
</fileset> |
| 459 |
|
</batchtest> |
| 460 |
|
|
| 461 |
|
<batchtest todir="${build.reports.dir}" if="do.test.old"> |
| 462 |
<fileset dir="${test.src.dir}"> |
<fileset dir="${test.src.dir}"> |
| 463 |
|
<include name="jsr166/test/**/${testcase}Test.java"/> |
| 464 |
|
</fileset> |
| 465 |
|
</batchtest> |
| 466 |
|
|
| 467 |
|
<!-- |
| 468 |
|
<batchtest todir="${build.reports.dir}" if="do.test.jtreg"> |
| 469 |
|
<fileset dir="${jtreg.src.dir}"> |
| 470 |
<include name="**/${testcase}Test.java"/> |
<include name="**/${testcase}Test.java"/> |
| 471 |
</fileset> |
</fileset> |
| 472 |
</batchtest> |
</batchtest> |
| 473 |
|
--> |
| 474 |
|
|
| 475 |
</junit> |
</junit> |
| 476 |
|
|
| 480 |
<target name="report-tests" |
<target name="report-tests" |
| 481 |
depends="run-tests"> |
depends="run-tests"> |
| 482 |
|
|
| 483 |
<!-- Sets junit.report.format to frames if Xalan is present, |
<!-- Sets junit.report.format to frames if redirection is present, |
| 484 |
otherwise sets it to noframes. --> |
otherwise sets it to noframes. --> |
| 485 |
<available property="junit.report.format" |
<available property="junit.report.format" |
| 486 |
value="frames" |
value="frames" |
| 505 |
|
|
| 506 |
<target name="configure-compiler"> |
<target name="configure-compiler"> |
| 507 |
|
|
| 508 |
<property name="gjc.version" |
<property name="unchecked.option" value="-Xlint:unchecked"/> |
|
value="2.0"/> |
|
| 509 |
|
|
| 510 |
<condition property="novariance.arg" value="-novariance"> |
<condition property="warnunchecked.arg" value="${unchecked.option}"> |
| 511 |
<and> |
<istrue value="${build.warnunchecked}"/> |
|
<equals arg1="${gjc.version}" arg2="2.0"/> |
|
|
<or> |
|
|
<not><isset property="gjc.novariance"/></not> |
|
|
<istrue value="${gjc.novariance}"/> |
|
|
</or> |
|
|
</and> |
|
| 512 |
</condition> |
</condition> |
| 513 |
|
|
| 514 |
<property name="novariance.arg" |
<property name="warnunchecked.arg" value=""/> |
|
value=""/> |
|
| 515 |
|
|
|
<property name="gjc.dir" |
|
|
value="${lib.dir}/gjc"/> |
|
| 516 |
|
|
| 517 |
<property name="javac.jar" |
<!-- Common options in javac invocations --> |
| 518 |
location="${gjc.dir}/${gjc.version}/javac.jar"/> |
<property name="build.args" value="${warnunchecked.arg}"/> |
| 519 |
|
|
| 520 |
<property name="collect.jar" |
</target> |
|
location="${gjc.dir}/${gjc.version}/collect${novariance.arg}.jar"/> |
|
| 521 |
|
|
| 522 |
|
|
| 523 |
<condition property="warnunchecked.arg" value="-warnunchecked"> |
<target name="configure-tests" |
| 524 |
<istrue value="${gjc.warnunchecked}"/> |
depends="configure-compiler"> |
|
</condition> |
|
| 525 |
|
|
| 526 |
<property name="warnunchecked.arg" value=""/> |
<!-- junit.framework.Protectable is in JUnit 3.8.1 but not in 3.7 --> |
| 527 |
|
<available property="junit.available" |
| 528 |
|
classname="junit.framework.Protectable"/> |
| 529 |
|
|
| 530 |
<condition property="prepare.src.dir" value="${build.dir}/prepare-src"> |
<!-- Xalan --> |
| 531 |
<istrue value="${build.nothreads}"/> |
<available property="xalan.available" |
| 532 |
</condition> |
classname="org.apache.xalan.Version"/> |
| 533 |
|
|
| 534 |
|
|
| 535 |
|
<!-- Ant 1.6beta and later don't need or want this check --> |
| 536 |
<!-- |
<!-- |
| 537 |
! Bootclasspath munging for source compilation. |
<fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests" |
| 538 |
|
unless="junit.available"/> |
| 539 |
|
|
| 540 |
|
<fail message="Need Xalan 2.5.1 jar in ${ant.home}${file.separator}lib to run tests" |
| 541 |
|
unless="xalan.available"/> |
| 542 |
--> |
--> |
| 543 |
|
|
| 544 |
<path id="pre.bootclasspath"> |
</target> |
|
<pathelement location="${javac.jar}"/> |
|
|
</path> |
|
| 545 |
|
|
|
<path id="compile.bootclasspath"> |
|
|
<pathelement location="${build.classes.dir}"/> |
|
|
<pathelement location="${collect.jar}"/> |
|
|
<pathelement location="${rt.jar}"/> |
|
|
</path> |
|
| 546 |
|
|
|
<!-- Flatten paths into platform-appropriate strings --> |
|
|
<property name="pre.bootclasspath" refid="pre.bootclasspath"/> |
|
|
<property name="compile.bootclasspath" refid="compile.bootclasspath"/> |
|
| 547 |
|
|
| 548 |
|
<!-- Anthill targets --> |
| 549 |
|
|
| 550 |
<!-- Common options in javac invocations --> |
<target name="anthill-build"> |
|
<property name="gjc.args" |
|
|
value="-J-Xbootclasspath/p:${pre.bootclasspath} ${warnunchecked.arg} ${novariance.arg}" |
|
|
/> |
|
| 551 |
|
|
| 552 |
|
<!-- Override this in user.properties --> |
| 553 |
|
<property name="tiger.home" location="e:/j2sdk1.5.0"/> |
| 554 |
|
|
| 555 |
|
<exec resultproperty="result.property" dir="${basedir}" executable="${tiger.home}/bin/java"> |
| 556 |
|
<arg value="-Xmx256000000"/> |
| 557 |
|
<!-- classpath of new JVM --> |
| 558 |
|
<arg value="-classpath"/> <arg path="${java.class.path}"/> |
| 559 |
|
<!-- location of Ant home directory --> |
| 560 |
|
<arg value="-Dant.home=${ant.home}"/> |
| 561 |
|
<!-- the Ant main class --> |
| 562 |
|
<arg value="org.apache.tools.ant.Main"/> |
| 563 |
|
<!-- The build file --> |
| 564 |
|
<arg value="-buildfile"/> <arg value="build.xml"/> |
| 565 |
|
<!-- the target to build on the new Ant instance --> |
| 566 |
|
<arg value="-DJAVA_HOME=${tiger.home}"/> |
| 567 |
|
<arg value="do-anthill-build"/> |
| 568 |
|
</exec> |
| 569 |
</target> |
</target> |
| 570 |
|
|
| 571 |
|
<target name="do-anthill-build" |
| 572 |
|
depends="jar, test, docs, dist-docs"/> |
| 573 |
|
|
| 574 |
<target name="prepare-src" |
<target name="anthill-publish"> |
|
depends="configure-compiler" |
|
|
if="prepare.src.dir"> |
|
| 575 |
|
|
| 576 |
<mkdir dir="${prepare.src.dir}"/> |
<copy todir="${deployDir}/docs/private"> |
| 577 |
<copy todir="${prepare.src.dir}"> |
<fileset dir="${build.javadocs.dir}"/> |
|
<fileset dir="${src.dir}"> |
|
|
<exclude name="java/lang/**"/> |
|
|
</fileset> |
|
| 578 |
</copy> |
</copy> |
| 579 |
|
|
| 580 |
</target> |
<copy todir="${deployDir}/docs/public"> |
| 581 |
|
<fileset dir="${dist.javadocs.dir}"/> |
| 582 |
|
</copy> |
| 583 |
|
|
| 584 |
<target name="configure-emulation"> |
<copy tofile="${deployDir}/index.html" |
| 585 |
|
file="${basedir}/etc/anthill-index.html"/> |
| 586 |
|
|
| 587 |
<condition property="build.emulation.true"> |
<copy todir="${deployDir}/notes"> |
| 588 |
<or> |
<fileset dir="${basedir}/etc/notes"/> |
| 589 |
<and> |
</copy> |
|
<os family="windows"/> |
|
|
<not> |
|
|
<isset property="build.emulation"/> |
|
|
</not> |
|
|
</and> |
|
|
<istrue value="${build.emulation}"/> |
|
|
</or> |
|
|
</condition> |
|
| 590 |
|
|
| 591 |
</target> |
</target> |
| 592 |
|
|
| 593 |
|
|
| 594 |
<target name="configure-tests" |
<!-- Standalone sample program --> |
|
depends="configure-compiler"> |
|
| 595 |
|
|
| 596 |
<!-- junit.framework.Protectable is in JUnit 3.8.1 but not in 3.7 --> |
<target name="sample" depends="jar"> |
|
<available property="junit.available" |
|
|
classname="junit.framework.Protectable"/> |
|
| 597 |
|
|
| 598 |
<fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests" |
<mkdir dir="${build.testcases.dir}"/> |
|
unless="junit.available"/> |
|
| 599 |
|
|
| 600 |
|
<javac srcdir="${test.src.dir}" |
| 601 |
|
destdir="${build.testcases.dir}" |
| 602 |
|
debug="${build.debug}" |
| 603 |
|
debuglevel="${build.debuglevel}" |
| 604 |
|
deprecation="${build.deprecation}" |
| 605 |
|
source="${build.sourcelevel}" |
| 606 |
|
fork="true"> |
| 607 |
|
|
| 608 |
<!-- |
<compilerarg value="${bootclasspath.args}"/> |
| 609 |
! Bootclasspath munging for testing, so JUnit can test our local |
<compilerarg line="${build.args}"/> |
|
! modifications to java.*. |
|
|
--> |
|
| 610 |
|
|
| 611 |
<path id="test.classpath"> |
<classpath refid="test.classpath"/> |
|
<pathelement location="${product.jar}"/> |
|
|
<pathelement location="${build.testcases.dir}"/> |
|
|
<pathelement location="${junit.jar}"/> |
|
|
</path> |
|
| 612 |
|
|
| 613 |
<path id="test.compile.bootclasspath"> |
<include name="jsr166/test/Sample.java"/> |
|
<pathelement location="${javac.jar}"/> |
|
|
<pathelement location="${collect.jar}"/> |
|
|
<pathelement location="${rt.jar}"/> |
|
|
</path> |
|
| 614 |
|
|
| 615 |
<path id="test.run.bootclasspath"> |
</javac> |
|
<pathelement location="${javac.jar}"/> |
|
|
<path refid="test.classpath"/> |
|
|
</path> |
|
| 616 |
|
|
|
<!-- Flatten test classpaths into platform-appropriate strings --> |
|
|
<property name="test.classpath" refid="test.classpath"/> |
|
|
<property name="test.compile.bootclasspath" refid="test.compile.bootclasspath"/> |
|
|
<property name="test.run.bootclasspath" refid="test.run.bootclasspath"/> |
|
| 617 |
|
|
| 618 |
|
<java classname="jsr166.test.Sample" fork="true"> |
| 619 |
|
<jvmarg value="${bootclasspath.args}"/> |
| 620 |
|
<classpath refid="test.classpath"/> |
| 621 |
|
</java> |
| 622 |
</target> |
</target> |
| 623 |
|
|
| 624 |
|
|
| 625 |
|
|
| 626 |
<!-- Anthill targets --> |
<!-- Backward compatibility, work in progress (some files not checked in) --> |
| 627 |
|
|
|
<target name="anthill-build" |
|
|
depends="jar, test, docs, dist-docs"/> |
|
| 628 |
|
|
|
<target name="anthill-publish"> |
|
| 629 |
|
|
| 630 |
<copy todir="${deployDir}/docs/private"> |
<property name="pretiger.src.dir" location="${build.dir}/pretiger/src"/> |
| 631 |
<fileset dir="${build.javadocs.dir}"/> |
<property name="build.pretiger.dir" location="${build.dir}/pretiger/classes"/> |
| 632 |
</copy> |
<property name="pretiger.jar" location="${build.lib.dir}/jsr166-pretiger.jar"/> |
| 633 |
|
<property name="pretiger.sourcelevel" value="1.4"/> |
| 634 |
|
|
| 635 |
<copy todir="${deployDir}/docs/public"> |
<target name="defang" |
| 636 |
<fileset dir="${dist.javadocs.dir}"/> |
depends="init" |
| 637 |
</copy> |
description="Generates pre-Tiger compatible source"> |
| 638 |
|
|
| 639 |
<copy tofile="${deployDir}/index.html" |
<delete dir="${pretiger.src.dir}"/> |
| 640 |
file="${basedir}/etc/anthill-index.html"/> |
<mkdir dir="${pretiger.src.dir}"/> |
| 641 |
|
|
| 642 |
<copy todir="${deployDir}/notes"> |
<exec executable="perl"> |
| 643 |
<fileset dir="${basedir}/etc/notes"/> |
<arg file="etc/defang.pl"/> |
| 644 |
</copy> |
<!-- <arg value="-v"/> --> |
| 645 |
|
<arg value="-s"/> <arg file="${src.dir}"/> |
| 646 |
|
<arg value="-t"/> <arg file="${pretiger.src.dir}"/> |
| 647 |
|
</exec> |
| 648 |
|
|
| 649 |
</target> |
</target> |
| 650 |
|
|
| 651 |
|
<target name="compile-pretiger" |
| 652 |
|
depends="init, configure-compiler, defang" |
| 653 |
|
description="Compiles pre-Tiger sources to build folder"> |
| 654 |
|
|
| 655 |
<target name="ng" depends="test"> |
<mkdir dir="${build.pretiger.dir}"/> |
|
<java classname="SuperfluousAbstract" fork="true"> |
|
| 656 |
|
|
| 657 |
<jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/> |
<javac srcdir="${pretiger.src.dir}" |
| 658 |
|
destdir="${build.pretiger.dir}" |
| 659 |
|
debug="${build.debug}" |
| 660 |
|
debuglevel="${build.debuglevel}" |
| 661 |
|
deprecation="${build.deprecation}" |
| 662 |
|
source="${pretiger.sourcelevel}" |
| 663 |
|
fork="true"> |
| 664 |
|
|
| 665 |
|
<compilerarg line="${build.args}"/> |
| 666 |
|
<exclude name="**/Thread.java"/> |
| 667 |
|
|
| 668 |
|
</javac> |
| 669 |
|
|
|
</java> |
|
| 670 |
</target> |
</target> |
| 671 |
|
|
| 672 |
|
<target name="pretiger" depends="compile-pretiger"> |
| 673 |
|
|
| 674 |
|
<mkdir dir="${build.lib.dir}"/> |
| 675 |
|
|
| 676 |
|
<jar destfile="${pretiger.jar}"> |
| 677 |
|
<fileset dir="${build.pretiger.dir}"> |
| 678 |
|
</fileset> |
| 679 |
|
</jar> |
| 680 |
|
|
| 681 |
|
</target> |
| 682 |
|
|
| 683 |
</project> |
</project> |