| 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.sinjdocs.dir" location="${build.dir}/sinjdocs"/> |
|
|
<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.filter.doccheck.dir" location="${build.dir}/filterdocchk"/> |
<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="ant.src.dir" location="${basedir}/etc/ant"/> |
<property name="ant.src.dir" location="${basedir}/etc/ant"/> |
| 47 |
<property name="stylesheet.dir" location="${basedir}/etc/xsl"/> |
<property name="stylesheet.dir" location="${basedir}/etc/xsl"/> |
| 48 |
<property name="lib.dir" location="${basedir}/lib"/> |
<property name="lib.dir" location="${basedir}/lib"/> |
| 54 |
<!-- Jar locations --> |
<!-- Jar locations --> |
| 55 |
<property name="product.jar" location="${build.lib.dir}/jsr166.jar"/> |
<property name="product.jar" location="${build.lib.dir}/jsr166.jar"/> |
| 56 |
<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"/> |
|
|
<property name="sinjdoc.jar" location="${lib.dir}/sinjdoc.jar"/> |
|
| 57 |
|
|
| 58 |
|
<!-- Bootclasspath argument --> |
| 59 |
|
<property name="bootclasspath.args" value="-Xbootclasspath/p:${product.jar}"/> |
| 60 |
|
|
| 61 |
<!-- Files excluded from dist-docs and emulation jar --> |
<!-- Test classpath --> |
| 62 |
<patternset id="unsafe.exclusion"> |
<path id="test.classpath"> |
| 63 |
<exclude name="java/util/Random.*"/> |
<pathelement location="${build.testcases.dir}"/> |
| 64 |
<exclude name="sun/misc/Unsafe.*"/> |
<pathelement location="${junit.jar}"/> |
| 65 |
</patternset> |
</path> |
|
|
|
|
<!-- 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*"/> |
|
|
<exclude name="java/util/concurrent/locks/LockSupport*"/> |
|
|
<exclude name="java/util/concurrent/locks/ReentrantLock*"/> |
|
|
</patternset> |
|
| 66 |
|
|
| 67 |
|
|
| 68 |
|
|
| 69 |
<!-- Main targets --> |
<!-- Main targets --> |
| 70 |
|
|
| 71 |
|
|
| 72 |
<target name="compile" |
<target name="compile" |
| 73 |
depends="init, configure-compiler, prepare-src" |
depends="init, configure-compiler" |
| 74 |
description="Compiles main sources to build folder"> |
description="Compiles main sources to build folder"> |
| 75 |
|
|
|
<property name="prepare.src.dir" value="${src.dir}"/> |
|
|
|
|
| 76 |
<mkdir dir="${build.classes.dir}"/> |
<mkdir dir="${build.classes.dir}"/> |
| 77 |
|
|
| 78 |
<!-- |
<javac srcdir="${src.dir}" |
|
<echo>javac ${gjc.args}</echo> |
|
|
<echo>bootclasspath=${compile.bootclasspath}</echo> |
|
|
--> |
|
|
|
|
|
<javac srcdir="${prepare.src.dir}" |
|
| 79 |
destdir="${build.classes.dir}" |
destdir="${build.classes.dir}" |
| 80 |
debug="${build.debug}" |
debug="${build.debug}" |
| 81 |
debuglevel="${build.debuglevel}" |
debuglevel="${build.debuglevel}" |
| 83 |
source="${build.sourcelevel}" |
source="${build.sourcelevel}" |
| 84 |
fork="true"> |
fork="true"> |
| 85 |
|
|
| 86 |
<!-- |
<compilerarg line="${build.args}"/> |
|
<compilerarg line="${gjc.args}"/> |
|
|
<bootclasspath refid="compile.bootclasspath"/> |
|
|
--> |
|
| 87 |
|
|
| 88 |
</javac> |
</javac> |
| 89 |
|
|
| 90 |
</target> |
</target> |
| 91 |
|
|
| 92 |
|
|
|
<target name="jar" |
|
|
depends="configure-emulation, init-jar, native-jar, emulation-jar" |
|
|
description="Builds library jar from compiled sources"/> |
|
|
|
|
| 93 |
|
|
| 94 |
<target name="test" |
<target name="jar" |
| 95 |
depends="init, configure-tests, report-tests" |
depends="compile" |
| 96 |
description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" /> |
description="Builds library jar from compiled sources"> |
|
|
|
|
|
|
|
<target name="checkstyle" |
|
|
depends="filter-src" |
|
|
description="Reports on style errors in Java source (verbose, mostly chaff)"> |
|
| 97 |
|
|
| 98 |
<taskdef resource="checkstyletask.properties" |
<mkdir dir="${build.lib.dir}"/> |
|
classpath="${lib.dir}/checkstyle-all-2.4.jar"/> |
|
| 99 |
|
|
| 100 |
<checkstyle> |
<jar destfile="${product.jar}"> |
| 101 |
<formatter type="plain"/> <!-- also available: type="xml" --> |
<fileset dir="${build.classes.dir}"/> |
| 102 |
<fileset dir="${build.filter.src.dir}" includes="**/*.java"/> |
</jar> |
|
</checkstyle> |
|
| 103 |
|
|
| 104 |
</target> |
</target> |
| 105 |
|
|
| 106 |
|
|
|
<target name="doccheck" |
|
|
depends="filter-doccheck" |
|
|
description="Reports on javadoc style errors"> |
|
| 107 |
|
|
| 108 |
<delete dir="${build.doccheck.dir}"/> |
<target name="test" |
| 109 |
<mkdir dir="${build.doccheck.dir}"/> |
depends="init, configure-tests, report-tests" |
| 110 |
|
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.doccheck.dir}"/> |
|
|
</javadoc> |
|
|
|
|
|
<echo>DocCheck output is in ${build.doccheck.dir}</echo> |
|
| 111 |
|
|
|
</target> |
|
| 112 |
|
|
| 113 |
|
|
| 114 |
<target name="docs" |
<target name="docs" |
|
depends="filter-src" |
|
| 115 |
description="Builds javadocs with custom tags to build folder"> |
description="Builds javadocs with custom tags to build folder"> |
| 116 |
|
|
| 117 |
<delete dir="${build.javadocs.dir}"/> |
<delete dir="${build.javadocs.dir}"/> |
| 120 |
<javadoc destdir="${build.javadocs.dir}" |
<javadoc destdir="${build.javadocs.dir}" |
| 121 |
link="http://java.sun.com/j2se/1.4.1/docs/api" |
link="http://java.sun.com/j2se/1.4.1/docs/api" |
| 122 |
overview="${src.dir}/intro.html" |
overview="${src.dir}/intro.html" |
| 123 |
source="${build.docsourcelevel}"> |
source="${build.sourcelevel}"> |
| 124 |
|
|
| 125 |
<tag name="revised" description="Last revised:"/> |
<tag name="revised" description="Last revised:"/> |
| 126 |
<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:"/> |
|
| 127 |
|
|
| 128 |
<packageset dir="${build.filter.src.dir}"/> |
<packageset dir="${src.dir}"/> |
| 129 |
|
|
| 130 |
</javadoc> |
</javadoc> |
| 131 |
|
|
| 132 |
</target> |
</target> |
| 133 |
|
|
| 134 |
|
|
|
<target name="sinjdocs" |
|
|
depends="configure-tests" |
|
|
description="Builds javadocs with custom tags to build folder"> |
|
|
|
|
|
<delete dir="${build.sinjdocs.dir}"/> |
|
|
<mkdir dir="${build.sinjdocs.dir}"/> |
|
|
|
|
|
<java classname="net.cscott.sinjdoc.Main" fork="true"> |
|
| 135 |
|
|
| 136 |
<jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/> |
<target name="doccheck" |
| 137 |
|
depends="filter-doccheck" |
| 138 |
|
description="Reports on javadoc style errors"> |
| 139 |
|
|
| 140 |
<classpath> |
<delete dir="${build.doccheck.dir}"/> |
| 141 |
<pathelement location="${sinjdoc.jar}"/> |
<mkdir dir="${build.doccheck.dir}"/> |
|
<pathelement location="${lib.dir}/jutil.jar"/> |
|
|
<pathelement location="${lib.dir}/cup.jar"/> |
|
|
<path refid="test.classpath"/> |
|
|
</classpath> |
|
|
|
|
|
|
|
|
<arg value="-d"/> <arg value="${build.sinjdocs.dir}"/> |
|
|
<arg value="-sourcepath"/> <arg value="${src.dir}"/> |
|
|
<arg value="-overview"/> <arg value="${src.dir}/intro.html"/> |
|
|
<arg value="-source"/> <arg value="${build.sourcelevel}"/> |
|
|
<!-- <arg value="-verbose"/> --> |
|
|
<!-- <arg value="-link"/> <arg value="http://java.sun.com/j2se/1.4.1/docs/api"/> --> |
|
|
<arg value="java.lang"/> |
|
|
<arg value="java.util"/> |
|
|
<arg value="java.util.concurrent"/> |
|
|
<arg value="java.util.concurrent.atomic"/> |
|
|
<arg value="java.util.concurrent.locks"/> |
|
| 142 |
|
|
| 143 |
<!-- |
<javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck" |
| 144 |
<arg value="-help"/> |
docletpath="${lib.dir}/doccheck.jar" |
| 145 |
--> |
destdir="${build.doccheck.dir}"> |
| 146 |
|
<packageset dir="${build.dc-filter.dir}"/> |
| 147 |
|
</javadoc> |
| 148 |
|
|
| 149 |
</java> |
<echo>DocCheck output is in ${build.doccheck.dir}</echo> |
| 150 |
|
|
| 151 |
</target> |
</target> |
| 152 |
|
|
| 153 |
|
|
|
<target name="strip" |
|
|
depends="init, configure-compiler" |
|
|
description="Strip generics from java source (not working yet)"> |
|
| 154 |
|
|
| 155 |
<mkdir dir="${build.stripped.dir}"/> |
<target name="checkstyle" |
| 156 |
|
depends="filter-src" |
| 157 |
|
description="Reports on style errors in Java source (verbose, mostly chaff)"> |
| 158 |
|
|
| 159 |
<!-- |
<taskdef resource="checkstyletask.properties" |
| 160 |
# javac -s doesn't reliably generate compilable code. It generates |
classpath="${lib.dir}/checkstyle-all-3.1.jar"/> |
|
# 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"> |
|
| 161 |
|
|
| 162 |
<!-- |
<mkdir dir="${build.checkstyle.dir}"/> |
|
<compilerarg line="${gjc.args} -s"/> |
|
|
<bootclasspath refid="compile.bootclasspath"/> |
|
|
--> |
|
| 163 |
|
|
| 164 |
</javac> |
<checkstyle config="etc/checkstyle/sun_checks.xml" |
| 165 |
|
failOnViolation="false"> |
| 166 |
|
<formatter type="xml" toFile="${build.checkstyle.dir}/checkstyle-report.xml"/> |
| 167 |
|
<fileset dir="${build.filter.src.dir}" includes="**/*.java"/> |
| 168 |
|
</checkstyle> |
| 169 |
|
|
| 170 |
|
<style in="${build.checkstyle.dir}/checkstyle-report.xml" |
| 171 |
|
out="${build.checkstyle.dir}/checkstyle-report.html" |
| 172 |
|
style="${stylesheet.dir}/checkstyle-frames.xsl"/> |
| 173 |
|
|
| 174 |
</target> |
</target> |
| 175 |
|
|
| 176 |
|
|
| 177 |
|
|
| 178 |
<target name="dist" |
<target name="dist" |
| 179 |
depends="init, dist-clean, dist-jar, dist-docs" |
depends="init, dist-clean, dist-jar, dist-docs" |
| 180 |
description="Puts all distributable products in single hierarchy"/> |
description="Puts all distributable products in single hierarchy"/> |
| 181 |
|
|
| 182 |
|
|
| 183 |
|
|
| 184 |
<target name="release" |
<target name="release" |
| 185 |
depends="dist" |
depends="dist" |
| 186 |
description="Puts entire CVS tree, plus distribution productions, in a jar"> |
description="Puts entire CVS tree, plus distribution productions, in a jar"> |
| 187 |
|
|
|
<!-- |
|
|
#keep build dir? - dl |
|
|
<delete dir="${build.dir}"/> |
|
|
--> |
|
| 188 |
<property name="release.jar" value="dist/jsr166-${version}-dist.jar"/> |
<property name="release.jar" value="dist/jsr166-${version}-dist.jar"/> |
| 189 |
|
|
| 190 |
<jar basedir="${basedir}" destfile="${release.jar}"> |
<jar basedir="${basedir}" destfile="${release.jar}"> |
| 191 |
|
<!-- <exclude name="build/**"/> --> |
| 192 |
<exclude name="${release.jar}"/> |
<exclude name="${release.jar}"/> |
| 193 |
<exclude name="user.properties"/> |
<exclude name="user.properties"/> |
| 194 |
<exclude name="etc/notes/**"/> |
<exclude name="etc/notes/**"/> |
| 195 |
<exclude name="lib/gjc/2.1/**"/> |
<exclude name="src/emulation/**"/> |
| 196 |
<exclude name="**/SyntaxTest.java"/> |
<exclude name="**/SyntaxTest.java"/> |
| 197 |
|
<exclude name="**/SuperfluousAbstract.java"/> |
| 198 |
</jar> |
</jar> |
| 199 |
|
|
| 200 |
</target> |
</target> |
| 201 |
|
|
| 202 |
|
|
| 203 |
|
|
| 204 |
<target name="clean" |
<target name="clean" |
| 205 |
description="Removes all build products"> |
description="Removes all build products"> |
| 206 |
|
|
| 211 |
</target> |
</target> |
| 212 |
|
|
| 213 |
|
|
| 214 |
|
|
| 215 |
<target name="dist-clean" |
<target name="dist-clean" |
| 216 |
description="Removes all build and distribution products"> |
description="Removes all build and distribution products"> |
| 217 |
|
|
| 220 |
</target> |
</target> |
| 221 |
|
|
| 222 |
|
|
| 223 |
|
|
| 224 |
<target name="dist-docs" |
<target name="dist-docs" |
|
depends="filter-src" |
|
| 225 |
description="Builds javadocs without custom tags to dist folder"> |
description="Builds javadocs without custom tags to dist folder"> |
| 226 |
|
|
| 227 |
<delete dir="${dist.javadocs.dir}"/> |
<delete dir="${dist.javadocs.dir}"/> |
| 228 |
<mkdir dir="${dist.javadocs.dir}"/> |
<mkdir dir="${dist.javadocs.dir}"/> |
| 229 |
|
|
| 230 |
<javadoc destdir="${dist.javadocs.dir}" |
<javadoc destdir="${dist.javadocs.dir}" |
| 231 |
link="http://java.sun.com/j2se/1.4.1/docs/api" |
link="http://java.sun.com/j2se/1.4.2/docs/api" |
| 232 |
overview="${src.dir}/intro.html" |
overview="${src.dir}/intro.html" |
| 233 |
source="${build.docsourcelevel}"> |
source="${build.sourcelevel}"> |
| 234 |
|
|
| 235 |
<packageset dir="${build.filter.src.dir}"/> |
<packageset dir="${src.dir}"/> |
| 236 |
|
|
| 237 |
</javadoc> |
</javadoc> |
| 238 |
|
|
| 248 |
<!-- Version is kept in a separate file --> |
<!-- Version is kept in a separate file --> |
| 249 |
<loadfile property="version" srcFile="version.properties"/> |
<loadfile property="version" srcFile="version.properties"/> |
| 250 |
<echo>Building JSR-166 version ${version}</echo> |
<echo>Building JSR-166 version ${version}</echo> |
| 251 |
|
<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> |
|
| 252 |
|
|
| 253 |
</target> |
</target> |
| 254 |
|
|
| 288 |
<copy todir="${build.filter.src.dir}"> |
<copy todir="${build.filter.src.dir}"> |
| 289 |
<fileset dir="${src.dir}"> |
<fileset dir="${src.dir}"> |
| 290 |
<exclude name="**/*.html"/> |
<exclude name="**/*.html"/> |
| 291 |
<patternset refid="unsafe.exclusion"/> |
<!-- Files excluded from dist-docs --> |
| 292 |
|
<exclude name="java/util/Random.*"/> |
| 293 |
|
<exclude name="sun/misc/Unsafe.*"/> |
| 294 |
</fileset> |
</fileset> |
| 295 |
|
<!-- |
| 296 |
<filterchain> |
<filterchain> |
| 297 |
|
--> |
| 298 |
|
|
| 299 |
<!-- |
<!-- |
| 300 |
# This filter gets rid of angle-bracketed type parameters |
# This filter gets rid of angle-bracketed type parameters |
| 308 |
# tweaking.) |
# tweaking.) |
| 309 |
--> |
--> |
| 310 |
|
|
| 311 |
|
<!-- |
| 312 |
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
| 313 |
classpath="${build.ant.dir}"> |
classpath="${build.ant.dir}"> |
| 314 |
<param name="notmatching" value="^\s+\*\s.*$"/> |
<param name="notmatching" value="^\s+\*\s.*$"/> |
| 315 |
<param name="pattern" value="<[^|>()]+?>+"/> |
<param name="pattern" value="<[^|>()]+?>+"/> |
| 316 |
<param name="replacement" value=" "/> |
<param name="replacement" value=" "/> |
| 317 |
</filterreader> |
</filterreader> |
|
|
|
|
|
|
|
<!-- |
|
|
# This filter uncomments lines beginning with "//@" so that |
|
|
# javadoc can see imports that are needed to resolve links |
|
|
# but that shouldn't be in the compiled code. |
|
| 318 |
--> |
--> |
| 319 |
|
|
| 320 |
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
<!-- |
|
classpath="${build.ant.dir}"> |
|
|
<param name="matching" value="^//@.*$"/> |
|
|
<param name="pattern" value="^//@"/> |
|
|
<param name="replacement" value=""/> |
|
|
</filterreader> |
|
| 321 |
</filterchain> |
</filterchain> |
| 322 |
|
--> |
| 323 |
</copy> |
</copy> |
| 324 |
|
|
| 325 |
</target> |
</target> |
| 326 |
|
|
| 327 |
|
|
|
|
|
|
|
|
| 328 |
<target name="filter-doccheck" |
<target name="filter-doccheck" |
| 329 |
depends="filter-src"> |
depends="filter-src"> |
| 330 |
|
|
| 331 |
<mkdir dir="${build.filter.doccheck.dir}"/> |
<mkdir dir="${build.dc-filter.dir}"/> |
| 332 |
|
|
| 333 |
<copy todir="${build.filter.doccheck.dir}"> |
<copy todir="${build.dc-filter.dir}"> |
| 334 |
<fileset dir="${build.filter.src.dir}"> |
<fileset dir="${build.filter.src.dir}"> |
| 335 |
<include name="**/*.html"/> |
<include name="**/*.html"/> |
| 336 |
</fileset> |
</fileset> |
| 340 |
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 {}" |
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 {}" |
| 341 |
/> |
/> |
| 342 |
|
|
| 343 |
<copy todir="${build.filter.doccheck.dir}"> |
<copy todir="${build.dc-filter.dir}"> |
| 344 |
<fileset dir="${build.filter.src.dir}"> |
<fileset dir="${build.filter.src.dir}"> |
| 345 |
<exclude name="**/*.html"/> |
<exclude name="**/*.html"/> |
| 346 |
</fileset> |
</fileset> |
| 378 |
|
|
| 379 |
<mkdir dir="${build.testcases.dir}"/> |
<mkdir dir="${build.testcases.dir}"/> |
| 380 |
|
|
| 381 |
<!-- |
<javac srcdir="${tck.src.dir}" |
| 382 |
<echo>javac ${gjc.args}</echo> |
destdir="${build.testcases.dir}" |
| 383 |
<echo>bootclasspath=${test.compile.bootclasspath}</echo> |
debug="${build.debug}" |
| 384 |
<echo>classpath="${test.classpath}"</echo> |
debuglevel="${build.debuglevel}" |
| 385 |
--> |
deprecation="${build.deprecation}" |
| 386 |
|
source="${build.sourcelevel}" |
| 387 |
|
fork="true"> |
| 388 |
|
|
| 389 |
|
<compilerarg value="${bootclasspath.args}"/> |
| 390 |
|
<compilerarg line="${build.args}"/> |
| 391 |
|
|
| 392 |
|
<classpath refid="test.classpath"/> |
| 393 |
|
|
| 394 |
|
</javac> |
| 395 |
|
|
| 396 |
<javac srcdir="${test.src.dir}" |
<javac srcdir="${test.src.dir}" |
| 397 |
destdir="${build.testcases.dir}" |
destdir="${build.testcases.dir}" |
| 401 |
source="${build.sourcelevel}" |
source="${build.sourcelevel}" |
| 402 |
fork="true"> |
fork="true"> |
| 403 |
|
|
| 404 |
<!-- |
<include name="jsr166/test/**"/> |
| 405 |
<compilerarg line="${gjc.args}"/> |
|
| 406 |
--> |
<compilerarg value="${bootclasspath.args}"/> |
| 407 |
<bootclasspath refid="test.compile.bootclasspath"/> |
<compilerarg line="${build.args}"/> |
| 408 |
|
|
| 409 |
<classpath refid="test.classpath"/> |
<classpath refid="test.classpath"/> |
| 410 |
|
|
| 411 |
</javac> |
</javac> |
| 428 |
dir="${build.reports.dir}" |
dir="${build.reports.dir}" |
| 429 |
fork="true"> |
fork="true"> |
| 430 |
|
|
| 431 |
<jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/> |
<jvmarg value="${bootclasspath.args}"/> |
| 432 |
|
|
| 433 |
|
<classpath refid="test.classpath"/> |
| 434 |
|
|
| 435 |
<formatter type="xml"/> |
<formatter type="xml"/> |
| 436 |
|
|
| 437 |
<batchtest todir="${build.reports.dir}"> |
<batchtest todir="${build.reports.dir}"> |
| 438 |
<fileset dir="${test.src.dir}"> |
<fileset dir="${tck.src.dir}"> |
| 439 |
<include name="**/${testcase}Test.java"/> |
<include name="**/${testcase}Test.java"/> |
| 440 |
</fileset> |
</fileset> |
| 441 |
|
<fileset dir="${test.src.dir}"> |
| 442 |
|
<include name="jsr166/test/**/${testcase}Test.java"/> |
| 443 |
|
</fileset> |
| 444 |
</batchtest> |
</batchtest> |
| 445 |
|
|
| 446 |
</junit> |
</junit> |
| 451 |
<target name="report-tests" |
<target name="report-tests" |
| 452 |
depends="run-tests"> |
depends="run-tests"> |
| 453 |
|
|
| 454 |
<!-- Sets junit.report.format to frames if Xalan is present, |
<!-- Sets junit.report.format to frames if redirection is present, |
| 455 |
otherwise sets it to noframes. --> |
otherwise sets it to noframes. --> |
| 456 |
<available property="junit.report.format" |
<available property="junit.report.format" |
| 457 |
value="frames" |
value="frames" |
| 475 |
|
|
| 476 |
|
|
| 477 |
<target name="configure-compiler"> |
<target name="configure-compiler"> |
|
<!-- |
|
|
<property name="gjc.version" |
|
|
value="2.2"/> |
|
|
|
|
|
<condition property="novariance.arg" value="-novariance"> |
|
|
<and> |
|
|
<equals arg1="${gjc.version}" arg2="2.0"/> |
|
|
<or> |
|
|
<not><isset property="gjc.novariance"/></not> |
|
|
<istrue value="${gjc.novariance}"/> |
|
|
</or> |
|
|
</and> |
|
|
</condition> |
|
| 478 |
|
|
| 479 |
<property name="novariance.arg" |
<property name="unchecked.option" value="-Xlint:unchecked"/> |
|
value=""/> |
|
| 480 |
|
|
| 481 |
<property name="gjc.dir" |
<condition property="warnunchecked.arg" value="${unchecked.option}"> |
| 482 |
value="${lib.dir}/gjc"/> |
<istrue value="${build.warnunchecked}"/> |
|
|
|
|
<property name="javac.jar" |
|
|
location="${gjc.dir}/${gjc.version}/javac.jar"/> |
|
|
|
|
|
<property name="collect.jar" |
|
|
location="${gjc.dir}/${gjc.version}/collect${novariance.arg}.jar"/> |
|
|
|
|
|
--> |
|
|
<condition property="warnunchecked.arg" value="-warnunchecked"> |
|
|
<istrue value="${gjc.warnunchecked}"/> |
|
| 483 |
</condition> |
</condition> |
| 484 |
|
|
| 485 |
<property name="warnunchecked.arg" value=""/> |
<property name="warnunchecked.arg" value=""/> |
| 486 |
|
|
|
<condition property="prepare.src.dir" value="${build.dir}/prepare-src"> |
|
|
<istrue value="${build.nothreads}"/> |
|
|
</condition> |
|
|
|
|
|
|
|
|
<!-- |
|
|
! Bootclasspath munging for source compilation. |
|
|
--> |
|
|
|
|
|
<path id="pre.bootclasspath"> |
|
|
<pathelement location="${javac.jar}"/> |
|
|
</path> |
|
|
|
|
|
<path id="compile.bootclasspath"> |
|
|
<pathelement location="${build.classes.dir}"/> |
|
|
<pathelement location="${collect.jar}"/> |
|
|
<pathelement location="${rt.jar}"/> |
|
|
</path> |
|
|
|
|
|
<!-- Flatten paths into platform-appropriate strings --> |
|
|
<property name="pre.bootclasspath" refid="pre.bootclasspath"/> |
|
|
<property name="compile.bootclasspath" refid="compile.bootclasspath"/> |
|
|
|
|
| 487 |
|
|
| 488 |
<!-- Common options in javac invocations --> |
<!-- Common options in javac invocations --> |
| 489 |
<!-- |
<property name="build.args" value="${warnunchecked.arg}"/> |
|
<property name="gjc.args" |
|
|
value="-J-Xbootclasspath/p:${pre.bootclasspath} ${warnunchecked.arg} ${novariance.arg}" |
|
|
/> |
|
|
--> |
|
|
|
|
|
</target> |
|
|
|
|
|
|
|
|
<target name="prepare-src" |
|
|
depends="configure-compiler" |
|
|
if="prepare.src.dir"> |
|
|
|
|
|
<mkdir dir="${prepare.src.dir}"/> |
|
|
<copy todir="${prepare.src.dir}"> |
|
|
<fileset dir="${src.dir}"> |
|
|
<exclude name="java/lang/**"/> |
|
|
</fileset> |
|
|
</copy> |
|
|
|
|
|
</target> |
|
|
|
|
|
|
|
|
<target name="configure-emulation"> |
|
|
|
|
|
<condition property="build.emulation.true"> |
|
|
<or> |
|
|
<and> |
|
|
<os family="windows"/> |
|
|
<not> |
|
|
<isset property="build.emulation"/> |
|
|
</not> |
|
|
</and> |
|
|
<istrue value="${build.emulation}"/> |
|
|
</or> |
|
|
</condition> |
|
| 490 |
|
|
| 491 |
</target> |
</target> |
| 492 |
|
|
| 498 |
<available property="junit.available" |
<available property="junit.available" |
| 499 |
classname="junit.framework.Protectable"/> |
classname="junit.framework.Protectable"/> |
| 500 |
|
|
| 501 |
<fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests" |
<!-- Xalan --> |
| 502 |
unless="junit.available"/> |
<available property="xalan.available" |
| 503 |
|
classname="org.apache.xalan.Version"/> |
| 504 |
|
|
| 505 |
|
|
| 506 |
|
<!-- Ant 1.6beta and later don't need or want this check --> |
| 507 |
<!-- |
<!-- |
| 508 |
! Bootclasspath munging for testing, so JUnit can test our local |
<fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests" |
| 509 |
! modifications to java.*. |
unless="junit.available"/> |
|
--> |
|
| 510 |
|
|
| 511 |
<path id="test.classpath"> |
<fail message="Need Xalan 2.5.1 jar in ${ant.home}${file.separator}lib to run tests" |
| 512 |
<pathelement location="${product.jar}"/> |
unless="xalan.available"/> |
| 513 |
<pathelement location="${build.testcases.dir}"/> |
--> |
|
<pathelement location="${junit.jar}"/> |
|
|
</path> |
|
| 514 |
|
|
| 515 |
<path id="test.compile.bootclasspath"> |
</target> |
|
<pathelement location="${javac.jar}"/> |
|
|
<pathelement location="${collect.jar}"/> |
|
|
<pathelement location="${rt.jar}"/> |
|
|
</path> |
|
| 516 |
|
|
|
<path id="test.run.bootclasspath"> |
|
|
<pathelement location="${javac.jar}"/> |
|
|
<path refid="test.classpath"/> |
|
|
</path> |
|
| 517 |
|
|
|
<!-- 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"/> |
|
| 518 |
|
|
| 519 |
</target> |
<!-- Anthill targets --> |
| 520 |
|
|
| 521 |
|
<target name="anthill-build"> |
| 522 |
|
|
| 523 |
|
<!-- Override this in user.properties --> |
| 524 |
|
<property name="tiger.home" location="e:/j2sdk1.5.0"/> |
| 525 |
|
|
| 526 |
<!-- Anthill targets --> |
<exec resultproperty="result.property" dir="${basedir}" executable="${tiger.home}/bin/java"> |
| 527 |
|
<arg value="-Xmx256000000"/> |
| 528 |
|
<!-- classpath of new JVM --> |
| 529 |
|
<arg value="-classpath"/> <arg path="${java.class.path}"/> |
| 530 |
|
<!-- location of Ant home directory --> |
| 531 |
|
<arg value="-Dant.home=${ant.home}"/> |
| 532 |
|
<!-- the Ant main class --> |
| 533 |
|
<arg value="org.apache.tools.ant.Main"/> |
| 534 |
|
<!-- The build file --> |
| 535 |
|
<arg value="-buildfile"/> <arg value="build.xml"/> |
| 536 |
|
<!-- the target to build on the new Ant instance --> |
| 537 |
|
<arg value="-DJAVA_HOME=${tiger.home}"/> |
| 538 |
|
<arg value="do-anthill-build"/> |
| 539 |
|
</exec> |
| 540 |
|
</target> |
| 541 |
|
|
| 542 |
<target name="anthill-build" |
<target name="do-anthill-build" |
| 543 |
depends="jar, test, docs, dist-docs"/> |
depends="jar, test, docs, dist-docs"/> |
| 544 |
|
|
| 545 |
<target name="anthill-publish"> |
<target name="anthill-publish"> |
| 562 |
</target> |
</target> |
| 563 |
|
|
| 564 |
|
|
| 565 |
<target name="ng" depends="test"> |
<!-- Standalone sample program --> |
| 566 |
<java classname="SuperfluousAbstract" fork="true"> |
|
| 567 |
|
<target name="sample" depends="jar"> |
| 568 |
|
|
| 569 |
|
<mkdir dir="${build.testcases.dir}"/> |
| 570 |
|
|
| 571 |
|
<javac srcdir="${test.src.dir}" |
| 572 |
|
destdir="${build.testcases.dir}" |
| 573 |
|
debug="${build.debug}" |
| 574 |
|
debuglevel="${build.debuglevel}" |
| 575 |
|
deprecation="${build.deprecation}" |
| 576 |
|
source="${build.sourcelevel}" |
| 577 |
|
fork="true"> |
| 578 |
|
|
| 579 |
|
<compilerarg value="${bootclasspath.args}"/> |
| 580 |
|
<compilerarg line="${build.args}"/> |
| 581 |
|
|
| 582 |
|
<classpath refid="test.classpath"/> |
| 583 |
|
|
| 584 |
|
<include name="jsr166/test/Sample.java"/> |
| 585 |
|
|
| 586 |
|
</javac> |
| 587 |
|
|
|
<jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/> |
|
| 588 |
|
|
| 589 |
|
<java classname="jsr166.test.Sample" fork="true"> |
| 590 |
|
<jvmarg value="${bootclasspath.args}"/> |
| 591 |
|
<classpath refid="test.classpath"/> |
| 592 |
</java> |
</java> |
| 593 |
</target> |
</target> |
| 594 |
|
|
| 595 |
|
|
| 596 |
|
|
| 597 |
|
<!-- Backward compatibility, work in progress (some files not checked in) --> |
| 598 |
|
|
| 599 |
|
|
| 600 |
|
|
| 601 |
|
<property name="pretiger.src.dir" location="${build.dir}/pretiger/src"/> |
| 602 |
|
<property name="build.pretiger.dir" location="${build.dir}/pretiger/classes"/> |
| 603 |
|
<property name="pretiger.jar" location="${build.lib.dir}/jsr166-pretiger.jar"/> |
| 604 |
|
<property name="pretiger.sourcelevel" value="1.4"/> |
| 605 |
|
|
| 606 |
|
<target name="defang" |
| 607 |
|
depends="init" |
| 608 |
|
description="Generates pre-Tiger compatible source"> |
| 609 |
|
|
| 610 |
|
<delete dir="${pretiger.src.dir}"/> |
| 611 |
|
<mkdir dir="${pretiger.src.dir}"/> |
| 612 |
|
|
| 613 |
|
<exec executable="perl"> |
| 614 |
|
<arg file="etc/defang.pl"/> |
| 615 |
|
<!-- <arg value="-v"/> --> |
| 616 |
|
<arg value="-s"/> <arg file="${src.dir}"/> |
| 617 |
|
<arg value="-t"/> <arg file="${pretiger.src.dir}"/> |
| 618 |
|
</exec> |
| 619 |
|
|
| 620 |
|
</target> |
| 621 |
|
|
| 622 |
|
<target name="compile-pretiger" |
| 623 |
|
depends="init, configure-compiler, defang" |
| 624 |
|
description="Compiles pre-Tiger sources to build folder"> |
| 625 |
|
|
| 626 |
|
<mkdir dir="${build.pretiger.dir}"/> |
| 627 |
|
|
| 628 |
|
<javac srcdir="${pretiger.src.dir}" |
| 629 |
|
destdir="${build.pretiger.dir}" |
| 630 |
|
debug="${build.debug}" |
| 631 |
|
debuglevel="${build.debuglevel}" |
| 632 |
|
deprecation="${build.deprecation}" |
| 633 |
|
source="${pretiger.sourcelevel}" |
| 634 |
|
fork="true"> |
| 635 |
|
|
| 636 |
|
<compilerarg line="${build.args}"/> |
| 637 |
|
<exclude name="**/Thread.java"/> |
| 638 |
|
|
| 639 |
|
</javac> |
| 640 |
|
|
| 641 |
|
</target> |
| 642 |
|
|
| 643 |
|
<target name="pretiger" depends="compile-pretiger"> |
| 644 |
|
|
| 645 |
|
<mkdir dir="${build.lib.dir}"/> |
| 646 |
|
|
| 647 |
|
<jar destfile="${pretiger.jar}"> |
| 648 |
|
<fileset dir="${build.pretiger.dir}"> |
| 649 |
|
</fileset> |
| 650 |
|
</jar> |
| 651 |
|
|
| 652 |
|
</target> |
| 653 |
|
|
| 654 |
</project> |
</project> |