| 21 |
|
|
| 22 |
|
|
| 23 |
<!-- Compilation options --> |
<!-- Compilation options --> |
| 24 |
<property name="build.sourcelevel" value="1.5"/> |
<property name="build.sourcelevel" value="1.6"/> |
| 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"/> |
| 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"/> |
| 32 |
<property name="build.testcases.dir" location="${build.dir}/testcases"/> |
<property name="build.testcases.dir" location="${build.dir}/testcases"/> |
|
<property name="build.j1.dir" location="${build.dir}/j1"/> |
|
| 33 |
<property name="build.loops.dir" location="${build.dir}/loops"/> |
<property name="build.loops.dir" location="${build.dir}/loops"/> |
| 34 |
<property name="build.lib.dir" location="${build.dir}/lib"/> |
<property name="build.lib.dir" location="${build.dir}/lib"/> |
|
<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"/> |
| 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"/> |
<property name="build.jsr166x.dir" location="${build.dir}/jsr166x"/> |
| 38 |
<property name="build.doccheck.dir" location="${build.dir}/doccheck"/> |
<property name="build.jsr166xlib.dir" location="${build.dir}/jsr166xlib"/> |
| 39 |
<property name="build.filter.src.dir" location="${build.dir}/filtersrc"/> |
<property name="build.jsr166xjavadocs.dir" location="${build.dir}/jsr166xjavadocs"/> |
| 40 |
<property name="build.dc-filter.dir" location="${build.dir}/filterdocchk"/> |
|
| 41 |
|
<property name="build.jsr166y.dir" location="${build.dir}/jsr166y"/> |
| 42 |
|
<property name="build.jsr166ylib.dir" location="${build.dir}/jsr166ylib"/> |
| 43 |
|
<property name="build.jsr166yjavadocs.dir" location="${build.dir}/jsr166yjavadocs"/> |
| 44 |
|
|
| 45 |
|
<property name="build.extra166y.dir" location="${build.dir}/extra166y"/> |
| 46 |
|
<property name="build.extra166ylib.dir" location="${build.dir}/extra166ylib"/> |
| 47 |
|
<property name="build.extra166yjavadocs.dir" location="${build.dir}/extra166yjavadocs"/> |
| 48 |
|
|
| 49 |
<!-- Source locations --> |
<!-- Source locations --> |
| 50 |
<property name="src.dir" location="${basedir}/src/main"/> |
<property name="src.dir" location="${basedir}/src/main"/> |
| 51 |
<property name="test.src.dir" location="${basedir}/src/test"/> |
<property name="test.src.dir" location="${basedir}/src/test"/> |
|
<property name="j1.src.dir" location="${basedir}/src/javaone"/> |
|
| 52 |
<property name="loops.src.dir" location="${basedir}/src/loops"/> |
<property name="loops.src.dir" location="${basedir}/src/loops"/> |
| 53 |
<property name="tck.src.dir" location="${test.src.dir}/tck"/> |
<property name="tck.src.dir" location="${test.src.dir}/tck"/> |
| 54 |
<property name="jtreg.src.dir" location="${test.src.dir}/jtreg"/> |
<property name="jtreg.src.dir" location="${test.src.dir}/jtreg"/> |
|
<property name="ant.src.dir" location="${basedir}/etc/ant"/> |
|
|
<property name="stylesheet.dir" location="${basedir}/etc/xsl"/> |
|
| 55 |
<property name="lib.dir" location="${basedir}/lib"/> |
<property name="lib.dir" location="${basedir}/lib"/> |
| 56 |
<property name="dist.dir" location="${basedir}/dist"/> |
<property name="dist.dir" location="${basedir}/dist"/> |
| 57 |
|
<property name="topsrc.dir" location="${basedir}/src"/> |
| 58 |
|
<property name="jsr166xsrc.dir" location="${basedir}/src/jsr166x"/> |
| 59 |
|
<property name="jsr166ysrc.dir" location="${basedir}/src/jsr166y"/> |
| 60 |
|
<property name="extra166ysrc.dir" location="${basedir}/src/extra166y"/> |
| 61 |
|
<property name="jdksrc.dir" location="/home/dl/1.6.0/j2se/martin/j2se/src/share/classes"/> |
| 62 |
<!-- Distribution locations --> |
<!-- Distribution locations --> |
| 63 |
<property name="dist.javadocs.dir" location="${dist.dir}/docs"/> |
<property name="dist.javadocs.dir" location="${dist.dir}/docs"/> |
| 64 |
|
<property name="dist.jsr166xjavadocs.dir" location="${dist.dir}/jsr166xdocs"/> |
| 65 |
|
<property name="dist.jsr166yjavadocs.dir" location="${dist.dir}/jsr166ydocs"/> |
| 66 |
|
<property name="dist.extra166yjavadocs.dir" location="${dist.dir}/extra166ydocs"/> |
| 67 |
|
|
| 68 |
<!-- Jar locations --> |
<!-- Jar locations --> |
| 69 |
<property name="product.jar" location="${build.lib.dir}/jsr166.jar"/> |
<property name="product.jar" location="${build.lib.dir}/jsr166.jar"/> |
| 70 |
|
<property name="jsr166xproduct.jar" location="${build.jsr166xlib.dir}/jsr166x.jar"/> |
| 71 |
|
<property name="jsr166yproduct.jar" location="${build.jsr166ylib.dir}/jsr166y.jar"/> |
| 72 |
|
<property name="extra166yproduct.jar" location="${build.extra166ylib.dir}/extra166y.jar"/> |
| 73 |
<property name="junit.jar" location="${lib.dir}/junit.jar"/> |
<property name="junit.jar" location="${lib.dir}/junit.jar"/> |
|
<property name="concurrent.jar" location="${lib.dir}/concurrent.jar"/> |
|
| 74 |
|
|
| 75 |
<!-- Bootclasspath argument --> |
<!-- Bootclasspath argument --> |
| 76 |
<property name="bootclasspath.args" value="-Xbootclasspath/p:${product.jar}"/> |
<property name="bootclasspath.args" value="-Xbootclasspath/p:${product.jar}"/> |
| 86 |
<pathelement location="${build.loops.dir}"/> |
<pathelement location="${build.loops.dir}"/> |
| 87 |
</path> |
</path> |
| 88 |
|
|
|
<!-- J1 classpath --> |
|
|
<path id="j1.classpath"> |
|
|
<pathelement location="${build.j1.dir}"/> |
|
|
<pathelement location="${junit.jar}"/> |
|
|
<pathelement location="${concurrent.jar}"/> |
|
|
</path> |
|
|
|
|
| 89 |
|
|
| 90 |
<!-- Main targets --> |
<!-- Main targets --> |
| 91 |
|
|
| 92 |
|
<target name="dists" |
| 93 |
|
depends="dist, jsr166xdist, jsr166ydist, extra166ydist" |
| 94 |
|
description="Builds all public jars and docs"/> |
| 95 |
|
|
| 96 |
<target name="compile" |
<target name="compile" |
| 97 |
depends="init, configure-compiler" |
depends="init, configure-compiler" |
| 108 |
fork="true"> |
fork="true"> |
| 109 |
|
|
| 110 |
<include name="**/*.java"/> |
<include name="**/*.java"/> |
| 111 |
|
<compilerarg value="-XDignore.symbol.file=true"/> |
| 112 |
|
|
| 113 |
|
<!-- |
| 114 |
<exclude name="java/lang/**"/> |
<exclude name="java/lang/**"/> |
| 115 |
<compilerarg line="${build.args}"/> |
<compilerarg line="${build.args}"/> |
| 116 |
|
<compilerarg line="-Xlint -Xmaxwarns 1000"/> |
| 117 |
|
--> |
| 118 |
|
|
| 119 |
</javac> |
</javac> |
| 120 |
|
|
| 149 |
<mkdir dir="${build.javadocs.dir}"/> |
<mkdir dir="${build.javadocs.dir}"/> |
| 150 |
|
|
| 151 |
<javadoc destdir="${build.javadocs.dir}" |
<javadoc destdir="${build.javadocs.dir}" |
| 152 |
link="http://java.sun.com/j2se/1.4.1/docs/api" |
link="http://download.oracle.com/javase/6/docs/api/" |
| 153 |
overview="${src.dir}/intro.html" |
overview="${src.dir}/intro.html" |
| 154 |
source="${build.sourcelevel}"> |
sourcepath="${src.dir}:${jdksrc.dir}" |
| 155 |
|
> |
|
<tag name="revised" description="Last revised:"/> |
|
|
<tag name="spec" description="Specified by:"/> |
|
| 156 |
|
|
| 157 |
<packageset dir="${src.dir}"/> |
<packageset dir="${src.dir}"/> |
| 158 |
|
|
| 162 |
|
|
| 163 |
|
|
| 164 |
|
|
|
<target name="doccheck" |
|
|
depends="filter-doccheck" |
|
|
description="Reports on javadoc style errors"> |
|
|
|
|
|
<delete dir="${build.doccheck.dir}"/> |
|
|
<mkdir dir="${build.doccheck.dir}"/> |
|
|
|
|
|
<javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck" |
|
|
docletpath="${lib.dir}/doccheck.jar" |
|
|
destdir="${build.doccheck.dir}"> |
|
|
<packageset dir="${build.dc-filter.dir}"/> |
|
|
</javadoc> |
|
|
|
|
|
<echo>DocCheck output is in ${build.doccheck.dir}</echo> |
|
|
|
|
|
</target> |
|
|
|
|
|
|
|
|
|
|
|
<target name="checkstyle" |
|
|
depends="filter-src" |
|
|
description="Reports on style errors in Java source (verbose, mostly chaff)"> |
|
|
|
|
|
<taskdef resource="checkstyletask.properties" |
|
|
classpath="${lib.dir}/checkstyle-all-3.1.jar"/> |
|
|
|
|
|
<mkdir dir="${build.checkstyle.dir}"/> |
|
|
|
|
|
<checkstyle config="etc/checkstyle/sun_checks.xml" |
|
|
failOnViolation="false"> |
|
|
<formatter type="xml" toFile="${build.checkstyle.dir}/checkstyle-report.xml"/> |
|
|
<fileset dir="${build.filter.src.dir}" includes="**/*.java"/> |
|
|
</checkstyle> |
|
|
|
|
|
<style in="${build.checkstyle.dir}/checkstyle-report.xml" |
|
|
out="${build.checkstyle.dir}/checkstyle-report.html" |
|
|
style="${stylesheet.dir}/checkstyle-frames.xsl"/> |
|
|
|
|
|
</target> |
|
|
|
|
|
|
|
|
|
|
| 165 |
<target name="dist" |
<target name="dist" |
| 166 |
depends="init, dist-clean, dist-jar, dist-docs" |
depends="init, dist-clean, dist-jar, dist-docs" |
| 167 |
description="Puts all distributable products in single hierarchy"/> |
description="Puts all distributable products in single hierarchy"/> |
| 168 |
|
|
| 169 |
|
|
|
|
|
| 170 |
<target name="release" |
<target name="release" |
| 171 |
depends="dist" |
depends="dist" |
| 172 |
description="Puts entire CVS tree, plus distribution productions, in a jar"> |
description="Puts entire CVS tree, plus distribution productions, in a jar"> |
| 214 |
<mkdir dir="${dist.javadocs.dir}"/> |
<mkdir dir="${dist.javadocs.dir}"/> |
| 215 |
|
|
| 216 |
<javadoc destdir="${dist.javadocs.dir}" |
<javadoc destdir="${dist.javadocs.dir}" |
| 217 |
link="http://java.sun.com/j2se/1.4.2/docs/api" |
link="http://download.oracle.com/javase/6/docs/api/" |
| 218 |
overview="${src.dir}/intro.html" |
overview="${src.dir}/intro.html" |
|
source="${build.sourcelevel}"> |
|
|
|
|
|
<packageset dir="${src.dir}"/> |
|
| 219 |
|
|
| 220 |
|
sourcepath="${src.dir}:${jdksrc.dir}" |
| 221 |
|
> |
| 222 |
|
<!-- |
| 223 |
|
<packageset dir="${src.dir}" defaultexcludes="yes"> |
| 224 |
|
<include name="java/util/concurrent"/> |
| 225 |
|
<include name="java/util/concurrent/atomic"/> |
| 226 |
|
<include name="java/util/concurrent/locks"/> |
| 227 |
|
</packageset> |
| 228 |
|
--> |
| 229 |
|
<fileset dir="${topsrc.dir}" defaultexcludes="yes"> |
| 230 |
|
<include name="main/java/util/concurrent/*.java"/> |
| 231 |
|
<include name="main/java/util/concurrent/atomic/*.java"/> |
| 232 |
|
<include name="main/java/util/concurrent/locks/*.java"/> |
| 233 |
|
<include name="main/java/util/*.java"/> |
| 234 |
|
<!-- |
| 235 |
|
<include name="main/java/util/concurrent/*.html"/> |
| 236 |
|
<include name="main/java/util/concurrent/atomic/*.html"/> |
| 237 |
|
<include name="main/java/util/concurrent/locks/*.html"/> |
| 238 |
|
<include name="main/java/util/*.html"/> |
| 239 |
|
--> |
| 240 |
|
<!-- <include name="jsr166x/*.java"/> --> |
| 241 |
|
</fileset> |
| 242 |
</javadoc> |
</javadoc> |
| 243 |
|
|
| 244 |
</target> |
</target> |
| 266 |
</target> |
</target> |
| 267 |
|
|
| 268 |
|
|
|
<target name="compile-ant-filter" |
|
|
depends="init"> |
|
|
|
|
|
<mkdir dir="${build.ant.dir}"/> |
|
|
|
|
|
<javac srcdir="${ant.src.dir}" |
|
|
destdir="${build.ant.dir}" |
|
|
source="1.4"/> |
|
|
|
|
|
</target> |
|
|
|
|
|
|
|
|
<target name="filter-src" |
|
|
depends="compile-ant-filter"> |
|
|
|
|
|
<mkdir dir="${build.filter.src.dir}"/> |
|
|
|
|
|
<copy todir="${build.filter.src.dir}"> |
|
|
<fileset dir="${src.dir}"> |
|
|
<include name="**/*.html"/> |
|
|
</fileset> |
|
|
</copy> |
|
|
|
|
|
<copy todir="${build.filter.src.dir}"> |
|
|
<fileset dir="${src.dir}"> |
|
|
<exclude name="**/*.html"/> |
|
|
<!-- Files excluded from dist-docs --> |
|
|
<exclude name="java/util/Random.*"/> |
|
|
<exclude name="sun/misc/Unsafe.*"/> |
|
|
</fileset> |
|
|
<!-- |
|
|
<filterchain> |
|
|
--> |
|
|
|
|
|
<!-- |
|
|
# This filter gets rid of angle-bracketed type parameters |
|
|
# so that javadoc can run on the result. The following |
|
|
# heuristic seems to work: |
|
|
# |
|
|
# For all lines not starting with space(s)-asterisk-space(s), |
|
|
# replace <something> with a space, where there may be more |
|
|
# than one right angle bracket at the end, and "something" |
|
|
# must not contain parens or pipes. (This may need some |
|
|
# tweaking.) |
|
|
--> |
|
|
|
|
|
<!-- |
|
|
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
|
|
classpath="${build.ant.dir}"> |
|
|
<param name="notmatching" value="^\s+\*\s.*$"/> |
|
|
<param name="pattern" value="<[^|>()]+?>+"/> |
|
|
<param name="replacement" value=" "/> |
|
|
</filterreader> |
|
|
--> |
|
|
|
|
|
<!-- |
|
|
</filterchain> |
|
|
--> |
|
|
</copy> |
|
|
|
|
|
</target> |
|
|
|
|
|
|
|
|
<target name="filter-doccheck" |
|
|
depends="filter-src"> |
|
|
|
|
|
<mkdir dir="${build.dc-filter.dir}"/> |
|
|
|
|
|
<copy todir="${build.dc-filter.dir}"> |
|
|
<fileset dir="${build.filter.src.dir}"> |
|
|
<include name="**/*.html"/> |
|
|
</fileset> |
|
|
</copy> |
|
|
|
|
|
<property name="generic.declarations" |
|
|
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 {}" |
|
|
/> |
|
|
|
|
|
<copy todir="${build.dc-filter.dir}"> |
|
|
<fileset dir="${build.filter.src.dir}"> |
|
|
<exclude name="**/*.html"/> |
|
|
</fileset> |
|
|
<filterchain> |
|
|
<!-- |
|
|
# These two filters try to make the source look like |
|
|
# something that doccheck can process. The first removes |
|
|
# -source 1.4 assertions and the second adds in a bunch |
|
|
# of single letter public nested marker interfaces so that |
|
|
# the generic type parameters are recognized. |
|
|
--> |
|
|
|
|
|
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
|
|
classpath="${build.ant.dir}"> |
|
|
<param name="matching" value="^\s*assert[\s ].*$"/> |
|
|
<param name="pattern" value="assert"/> |
|
|
<param name="replacement" value="//assert"/> |
|
|
</filterreader> |
|
|
|
|
|
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
|
|
classpath="${build.ant.dir}"> |
|
|
<param name="matching" value="^([^*]*(class|interface|implements) .*|)\{.*$"/> |
|
|
<param name="pattern" value="$"/> |
|
|
<param name="replacement" value=" ${generic.declarations}"/> |
|
|
</filterreader> |
|
|
|
|
|
</filterchain> |
|
|
</copy> |
|
|
|
|
|
</target> |
|
|
|
|
|
|
|
| 269 |
<target name="compile-tests" |
<target name="compile-tests" |
| 270 |
depends="jar"> |
depends="jar"> |
| 271 |
|
|
| 281 |
|
|
| 282 |
<compilerarg value="${bootclasspath.args}"/> |
<compilerarg value="${bootclasspath.args}"/> |
| 283 |
<compilerarg line="${build.args}"/> |
<compilerarg line="${build.args}"/> |
| 284 |
|
<compilerarg value="-XDignore.symbol.file=true"/> |
| 285 |
|
|
| 286 |
<classpath refid="test.classpath"/> |
<classpath refid="test.classpath"/> |
| 287 |
|
|
| 299 |
|
|
| 300 |
<compilerarg value="${bootclasspath.args}"/> |
<compilerarg value="${bootclasspath.args}"/> |
| 301 |
<compilerarg line="${build.args}"/> |
<compilerarg line="${build.args}"/> |
| 302 |
|
<compilerarg value="-XDignore.symbol.file=true"/> |
| 303 |
|
|
| 304 |
<classpath refid="test.classpath"/> |
<classpath refid="test.classpath"/> |
| 305 |
|
|
| 316 |
|
|
| 317 |
<compilerarg value="${bootclasspath.args}"/> |
<compilerarg value="${bootclasspath.args}"/> |
| 318 |
<compilerarg line="${build.args}"/> |
<compilerarg line="${build.args}"/> |
| 319 |
|
<compilerarg value="-XDignore.symbol.file=true"/> |
| 320 |
|
|
| 321 |
<classpath refid="test.classpath"/> |
<classpath refid="test.classpath"/> |
| 322 |
|
|
| 389 |
<fileset dir="${build.reports.dir}"> |
<fileset dir="${build.reports.dir}"> |
| 390 |
<include name="TEST-*.xml"/> |
<include name="TEST-*.xml"/> |
| 391 |
</fileset> |
</fileset> |
| 392 |
<report styledir="${stylesheet.dir}" |
<report format="${junit.report.format}" todir="${build.reports.dir}" |
|
format="${junit.report.format}" |
|
|
todir="${build.reports.dir}" |
|
| 393 |
/> |
/> |
| 394 |
</junitreport> |
</junitreport> |
| 395 |
|
|
| 439 |
</target> |
</target> |
| 440 |
|
|
| 441 |
|
|
|
|
|
|
<!-- Anthill targets --> |
|
|
|
|
|
<target name="anthill-build"> |
|
|
|
|
|
<!-- Override this in user.properties --> |
|
|
<property name="tiger.home" location="e:/j2sdk1.5.0"/> |
|
|
|
|
|
<exec resultproperty="result.property" dir="${basedir}" executable="${tiger.home}/bin/java"> |
|
|
<arg value="-Xmx256000000"/> |
|
|
<!-- classpath of new JVM --> |
|
|
<arg value="-classpath"/> <arg path="${java.class.path}"/> |
|
|
<!-- location of Ant home directory --> |
|
|
<arg value="-Dant.home=${ant.home}"/> |
|
|
<!-- the Ant main class --> |
|
|
<arg value="org.apache.tools.ant.Main"/> |
|
|
<!-- The build file --> |
|
|
<arg value="-buildfile"/> <arg value="build.xml"/> |
|
|
<!-- the target to build on the new Ant instance --> |
|
|
<arg value="-DJAVA_HOME=${tiger.home}"/> |
|
|
<arg value="do-anthill-build"/> |
|
|
</exec> |
|
|
</target> |
|
|
|
|
|
<target name="do-anthill-build" |
|
|
depends="jar, test, docs, dist-docs"/> |
|
|
|
|
|
<target name="anthill-publish"> |
|
|
|
|
|
<copy todir="${deployDir}/docs/private"> |
|
|
<fileset dir="${build.javadocs.dir}"/> |
|
|
</copy> |
|
|
|
|
|
<copy todir="${deployDir}/docs/public"> |
|
|
<fileset dir="${dist.javadocs.dir}"/> |
|
|
</copy> |
|
|
|
|
|
<copy tofile="${deployDir}/index.html" |
|
|
file="${basedir}/etc/anthill-index.html"/> |
|
|
|
|
|
<copy todir="${deployDir}/notes"> |
|
|
<fileset dir="${basedir}/etc/notes"/> |
|
|
</copy> |
|
|
|
|
|
</target> |
|
|
|
|
|
|
|
|
|
|
| 442 |
<!-- Various demos and test programs --> |
<!-- Various demos and test programs --> |
| 443 |
|
|
| 444 |
|
|
|
<target name="sample" depends="init, configure-compiler" |
|
|
description="Standalone demo program"> |
|
|
|
|
|
<mkdir dir="${build.testcases.dir}"/> |
|
|
|
|
|
<javac srcdir="${test.src.dir}" |
|
|
destdir="${build.testcases.dir}" |
|
|
debug="${build.debug}" |
|
|
debuglevel="${build.debuglevel}" |
|
|
deprecation="${build.deprecation}" |
|
|
source="${build.sourcelevel}" |
|
|
fork="true"> |
|
|
|
|
|
<include name="jsr166/test/Sample.java"/> |
|
|
|
|
|
</javac> |
|
|
|
|
|
<copy todir="${build.testcases.dir}"> |
|
|
<fileset dir="${test.src.dir}"> |
|
|
<include name="**/*.properties"/> |
|
|
</fileset> |
|
|
</copy> |
|
|
|
|
|
|
|
|
<java classname="jsr166.test.Sample" fork="true"> |
|
|
<classpath refid="test.classpath"/> |
|
|
<!-- <jvmarg value="-ea"/> --> |
|
|
<!-- <jvmarg value="-server"/> --> |
|
|
<!-- <arg value="1000"/> --> |
|
|
</java> |
|
|
</target> |
|
|
|
|
|
|
|
| 445 |
<target name="loops" depends="init, configure-compiler" |
<target name="loops" depends="init, configure-compiler" |
| 446 |
description="Benchmark from Doug Lea's AQS paper"> |
description="Benchmark from Doug Lea's AQS paper"> |
| 447 |
|
|
| 457 |
|
|
| 458 |
<compilerarg line="${build.args}"/> |
<compilerarg line="${build.args}"/> |
| 459 |
<classpath refid="loops.classpath"/> |
<classpath refid="loops.classpath"/> |
| 460 |
|
<compilerarg value="-XDignore.symbol.file=true"/> |
| 461 |
|
|
| 462 |
</javac> |
</javac> |
| 463 |
|
|
| 468 |
</target> |
</target> |
| 469 |
|
|
| 470 |
|
|
| 471 |
<target name="compile-j1" depends="init, configure-compiler"> |
<!-- jsr166x --> |
| 472 |
|
|
|
<mkdir dir="${build.j1.dir}"/> |
|
| 473 |
|
|
| 474 |
<javac srcdir="${j1.src.dir}" |
<target name="jsr166xcompile" |
| 475 |
destdir="${build.j1.dir}" |
depends="init, configure-compiler" |
| 476 |
|
description="Compiles jsr166x sources"> |
| 477 |
|
|
| 478 |
|
<mkdir dir="${build.jsr166x.dir}"/> |
| 479 |
|
|
| 480 |
|
<javac srcdir="${jsr166xsrc.dir}" |
| 481 |
|
destdir="${build.jsr166x.dir}" |
| 482 |
debug="${build.debug}" |
debug="${build.debug}" |
| 483 |
debuglevel="${build.debuglevel}" |
debuglevel="${build.debuglevel}" |
| 484 |
deprecation="${build.deprecation}" |
deprecation="${build.deprecation}" |
| 485 |
source="${build.sourcelevel}" > |
source="${build.sourcelevel}" |
| 486 |
|
fork="true"> |
| 487 |
|
|
| 488 |
<include name="**/*.java"/> |
<include name="**/*.java"/> |
|
<exclude name="**/dijkstra/**"/> |
|
|
|
|
| 489 |
<compilerarg line="${build.args}"/> |
<compilerarg line="${build.args}"/> |
| 490 |
<classpath refid="j1.classpath"/> |
<compilerarg value="-XDignore.symbol.file=true"/> |
| 491 |
|
|
| 492 |
</javac> |
</javac> |
| 493 |
|
|
| 494 |
</target> |
</target> |
| 495 |
|
|
| 496 |
|
|
|
<target name="sw" depends="compile-j1" |
|
|
description="Runs the SwingWorker demo"> |
|
| 497 |
|
|
| 498 |
<!-- |
<target name="jsr166xjar" |
| 499 |
<java classname="jsr166.swing.SwingWorkerDemo" fork="true"> |
depends="jsr166xcompile" |
| 500 |
<classpath refid="j1.classpath"/> |
description="Builds library jar from compiled sources"> |
|
</java> |
|
|
--> |
|
| 501 |
|
|
| 502 |
<copy todir="${build.j1.dir}" file="${j1.src.dir}/jsr166/swing/SwingWorker.html"/> |
<mkdir dir="${build.jsr166xlib.dir}"/> |
| 503 |
|
|
| 504 |
<exec dir="${build.j1.dir}" executable="appletviewer.exe"> |
<jar destfile="${jsr166xproduct.jar}"> |
| 505 |
<arg value="${build.j1.dir}/SwingWorker.html"/> |
<fileset dir="${build.jsr166x.dir}"/> |
| 506 |
</exec> |
</jar> |
| 507 |
|
|
| 508 |
</target> |
</target> |
| 509 |
|
|
|
<target name="j1" depends="compile-j1" |
|
|
description="Runs a standalone JavaOne program"> |
|
|
|
|
|
<java classname="${j1.test}" fork="true"> |
|
|
<classpath refid="j1.classpath"/> |
|
|
<jvmarg value="-client"/> |
|
| 510 |
|
|
|
<!-- WebCrawler args --> |
|
|
<arg value="jsr166.webcrawler.WebCrawler3"/> |
|
|
<arg value="http://www.priorartisans.com"/> |
|
|
<arg value="25"/> |
|
| 511 |
|
|
| 512 |
</java> |
<target name="jsr166xdocs" |
| 513 |
|
description="Builds javadocs with custom tags to build folder"> |
|
</target> |
|
| 514 |
|
|
| 515 |
|
<delete dir="${build.jsr166xjavadocs.dir}"/> |
| 516 |
|
<mkdir dir="${build.jsr166xjavadocs.dir}"/> |
| 517 |
|
|
| 518 |
<target name="test-j1" depends="compile-j1" |
<javadoc destdir="${build.jsr166xjavadocs.dir}" |
| 519 |
description="Runs testcases from the JavaOne source directories"> |
packagenames="jsr166x" |
| 520 |
|
link="http://download.oracle.com/javase/6/docs/api/" |
| 521 |
|
source="${build.sourcelevel}" |
| 522 |
|
sourcepath="${topsrc.dir}:${jdksrc.dir}" /> |
| 523 |
|
|
| 524 |
<junit printsummary="true" |
</target> |
|
showoutput="true" |
|
|
errorProperty="junit.failed" |
|
|
failureProperty="junit.failed" |
|
|
dir="${build.j1.dir}" |
|
|
fork="true"> |
|
| 525 |
|
|
|
<!-- <jvmarg value="-server"/> --> |
|
|
<classpath refid="j1.classpath"/> |
|
|
<formatter type="xml"/> |
|
| 526 |
|
|
| 527 |
<batchtest todir="${build.j1.dir}"> |
<target name="jsr166xdist" |
| 528 |
<fileset dir="${j1.src.dir}"> |
depends="jsr166xdist-clean, jsr166xdist-jar, jsr166xdist-docs" |
| 529 |
<include name="**/*Test.java"/> |
description="Puts all distributable products in single hierarchy"/> |
|
</fileset> |
|
|
</batchtest> |
|
| 530 |
|
|
|
</junit> |
|
| 531 |
|
|
|
<available property="junit.report.format" |
|
|
value="frames" |
|
|
classname="org.apache.xalan.lib.Redirect"/> |
|
|
<property name="junit.report.format" value="noframes"/> |
|
| 532 |
|
|
| 533 |
<junitreport todir="${build.j1.dir}"> |
<target name="jsr166xclean" |
| 534 |
<fileset dir="${build.j1.dir}"> |
description="Removes all build products"> |
|
<include name="TEST-*.xml"/> |
|
|
</fileset> |
|
|
<report styledir="${stylesheet.dir}" |
|
|
format="${junit.report.format}" |
|
|
todir="${build.j1.dir}" |
|
|
/> |
|
|
</junitreport> |
|
| 535 |
|
|
| 536 |
<fail message="Test Cases Failed" if="junit.failed"/> |
<delete dir="${build.jsr166x.dir}"/> |
| 537 |
|
<delete dir="${build.jsr166xlib.dir}"/> |
| 538 |
|
|
| 539 |
</target> |
</target> |
| 540 |
|
|
| 541 |
|
|
| 542 |
|
|
| 543 |
<!-- C++ and JNI definitions and demos --> |
<target name="jsr166xdist-clean" |
| 544 |
|
description="Removes all build and distribution products"> |
|
<target name="configure-cpp"> |
|
| 545 |
|
|
| 546 |
<!-- Define tasks and types --> |
</target> |
| 547 |
|
|
|
<path id="cpptasks.path"> |
|
|
<pathelement location="${lib.dir}/cpptasks.jar"/> |
|
|
</path> |
|
|
<taskdef resource="cpptasks.tasks" classpathref="cpptasks.path"/> |
|
|
<typedef resource="cpptasks.types" classpathref="cpptasks.path"/> |
|
| 548 |
|
|
|
<!-- Set platform property for JNI includes --> |
|
| 549 |
|
|
| 550 |
<condition property="platform" value="linux"> |
<target name="jsr166xdist-docs" |
| 551 |
<os name="Linux"/> |
description="Builds javadocs without custom tags to dist folder"> |
|
</condition> |
|
|
<condition property="platform" value="win32"> |
|
|
<os family="windows"/> |
|
|
</condition> |
|
|
<condition property="platform" value="solaris"> |
|
|
<os name="SunOS"/> |
|
|
</condition> |
|
|
|
|
|
</target> |
|
| 552 |
|
|
| 553 |
|
<delete dir="${dist.jsr166xjavadocs.dir}"/> |
| 554 |
|
<mkdir dir="${dist.jsr166xjavadocs.dir}"/> |
| 555 |
|
|
| 556 |
<target name="cppdemo" depends="configure-cpp"> |
<javadoc destdir="${dist.jsr166xjavadocs.dir}" |
| 557 |
|
packagenames="jsr166x" |
| 558 |
|
link="http://download.oracle.com/javase/6/docs/api/" |
| 559 |
|
source="${build.sourcelevel}" |
| 560 |
|
sourcepath="${topsrc.dir}:${jdksrc.dir}" /> |
| 561 |
|
|
| 562 |
<mkdir dir="${build.dir}"/> |
</target> |
| 563 |
|
|
| 564 |
<cc multithreaded="true" |
<target name="jsr166xdist-jar" |
| 565 |
name="g++" |
depends="jsr166xclean, jsr166xjar"> |
|
objdir="${build.dir}" |
|
|
outfile="${build.dir}/CppDemo"> |
|
|
<fileset dir="${test.src.dir}" includes="CppDemo.cpp"/> |
|
|
<libset libs="stdc++"/> |
|
|
</cc> |
|
| 566 |
|
|
| 567 |
<exec executable="${build.dir}/CppDemo"> |
<copy file="${jsr166xproduct.jar}" todir="${dist.dir}"/> |
|
<arg line="count in word frequency of word in command line count"/> |
|
|
</exec> |
|
| 568 |
|
|
| 569 |
</target> |
</target> |
| 570 |
|
|
| 571 |
|
<!-- jsr166y --> |
| 572 |
|
|
|
<target name="jnidemo" depends="init, configure-compiler, configure-cpp"> |
|
| 573 |
|
|
| 574 |
<mkdir dir="${build.testcases.dir}"/> |
<target name="jsr166ycompile" |
| 575 |
|
depends="init, configure-compiler" |
| 576 |
|
description="Compiles jsr166y sources"> |
| 577 |
|
|
| 578 |
<javac srcdir="${test.src.dir}" |
<mkdir dir="${build.jsr166y.dir}"/> |
| 579 |
destdir="${build.testcases.dir}" |
|
| 580 |
|
<javac srcdir="${jsr166ysrc.dir}" |
| 581 |
|
destdir="${build.jsr166y.dir}" |
| 582 |
debug="${build.debug}" |
debug="${build.debug}" |
| 583 |
debuglevel="${build.debuglevel}" |
debuglevel="${build.debuglevel}" |
| 584 |
deprecation="${build.deprecation}" |
deprecation="${build.deprecation}" |
| 585 |
source="${build.sourcelevel}" |
source="${build.sourcelevel}" |
| 586 |
fork="true"> |
fork="true"> |
| 587 |
<compilerarg value="${bootclasspath.args}"/> |
|
| 588 |
|
<include name="**/*.java"/> |
| 589 |
<compilerarg line="${build.args}"/> |
<compilerarg line="${build.args}"/> |
| 590 |
<classpath refid="test.classpath"/> |
<compilerarg value="-XDignore.symbol.file=true"/> |
| 591 |
<include name="JniDemo.java"/> |
<compilerarg value="${bootclasspath.args}"/> |
| 592 |
|
|
| 593 |
|
<!-- <compilerarg line="-Xlint -Xmaxwarns 1000"/> --> |
| 594 |
|
|
| 595 |
</javac> |
</javac> |
| 596 |
|
|
| 597 |
<javah destdir="${build.testcases.dir}" |
</target> |
| 598 |
classpathref="test.classpath"> |
|
| 599 |
<class name="JniDemo"/> |
|
| 600 |
</javah> |
|
| 601 |
|
<target name="jsr166yjar" |
| 602 |
<cc multithreaded="true" |
depends="jsr166ycompile" |
| 603 |
name="g++" |
description="Builds library jar from compiled sources"> |
| 604 |
objdir="${build.dir}" |
|
| 605 |
outfile="${build.dir}/JniDemo" |
<mkdir dir="${build.jsr166ylib.dir}"/> |
| 606 |
outtype="shared"> |
|
| 607 |
|
<jar destfile="${jsr166yproduct.jar}" index="true"> |
| 608 |
<compiler> |
<fileset dir="${build.jsr166y.dir}"/> |
| 609 |
<defineset> |
</jar> |
| 610 |
<define name="__int64" value="long long"/> |
|
| 611 |
</defineset> |
</target> |
| 612 |
<includepath location="${java.home}/../include"/> |
|
| 613 |
<includepath location="${java.home}/../include/${platform}"/> |
|
| 614 |
<compilerarg value="-mno-cygwin"/> |
|
| 615 |
</compiler> |
<target name="jsr166ydocs" |
| 616 |
|
description="Builds javadocs with custom tags to build folder"> |
| 617 |
<linker> |
|
| 618 |
<linkerarg value="--add-stdcall-alias"/> |
<delete dir="${build.jsr166yjavadocs.dir}"/> |
| 619 |
</linker> |
<mkdir dir="${build.jsr166yjavadocs.dir}"/> |
| 620 |
|
|
| 621 |
<includepath location="${build.testcases.dir}"/> |
<javadoc destdir="${build.jsr166yjavadocs.dir}" |
| 622 |
|
packagenames="jsr166y" |
| 623 |
<fileset dir="${test.src.dir}" includes="JniDemo.cpp"/> |
link="http://download.oracle.com/javase/6/docs/api/" |
| 624 |
|
source="${build.sourcelevel}" |
| 625 |
<libset libs="stdc++"/> |
sourcepath="${topsrc.dir}:${jdksrc.dir}" /> |
| 626 |
|
|
| 627 |
</cc> |
</target> |
| 628 |
|
|
| 629 |
<!-- Necessary if windows, harmless if not --> |
|
| 630 |
<copy file="${build.dir}/libJniDemo.so" tofile="${build.dir}/JniDemo.dll"/> |
<target name="jsr166ydist" |
| 631 |
|
depends="jsr166ydist-clean, jsr166ydist-jar, jsr166ydist-docs" |
| 632 |
<java classname="JniDemo" fork="true"> |
description="Puts all distributable products in single hierarchy"/> |
| 633 |
<!-- Watch out: path separator hardwired to semicolon here! --> |
|
| 634 |
<sysproperty key="java.library.path" path="${java.library.path};${build.dir}"/> |
|
| 635 |
<classpath refid="test.classpath"/> |
|
| 636 |
<arg line="count in word frequency of word in command line count"/> |
<target name="jsr166yclean" |
| 637 |
</java> |
description="Removes all build products"> |
| 638 |
|
|
| 639 |
|
<delete dir="${build.jsr166y.dir}"/> |
| 640 |
|
<delete dir="${build.jsr166ylib.dir}"/> |
| 641 |
|
|
| 642 |
</target> |
</target> |
| 643 |
|
|
| 644 |
|
|
| 645 |
|
|
| 646 |
<!-- Backward compatibility, work in progress (some files not checked in) --> |
<target name="jsr166ydist-clean" |
| 647 |
|
description="Removes all build and distribution products"> |
| 648 |
|
|
| 649 |
|
</target> |
| 650 |
|
|
| 651 |
|
<target name="jsr166ydist-docs" |
| 652 |
|
description="Builds javadocs without custom tags to dist folder"> |
| 653 |
|
|
| 654 |
|
<delete dir="${dist.jsr166yjavadocs.dir}"/> |
| 655 |
|
<mkdir dir="${dist.jsr166yjavadocs.dir}"/> |
| 656 |
|
|
| 657 |
<property name="pretiger.src.dir" location="${build.dir}/pretiger/src"/> |
<javadoc destdir="${dist.jsr166yjavadocs.dir}" |
| 658 |
<property name="build.pretiger.dir" location="${build.dir}/pretiger/classes"/> |
packagenames="jsr166y" |
| 659 |
<property name="pretiger.jar" location="${build.lib.dir}/jsr166-pretiger.jar"/> |
link="http://download.oracle.com/javase/6/docs/api/" |
| 660 |
<property name="pretiger.sourcelevel" value="1.4"/> |
source="${build.sourcelevel}" |
| 661 |
|
sourcepath="${topsrc.dir}:${jdksrc.dir}" /> |
| 662 |
|
|
| 663 |
<target name="defang" |
</target> |
|
depends="init" |
|
|
description="Generates pre-Tiger compatible source"> |
|
| 664 |
|
|
| 665 |
<delete dir="${pretiger.src.dir}"/> |
<target name="jsr166ydist-jar" |
| 666 |
<mkdir dir="${pretiger.src.dir}"/> |
depends="jsr166yclean, jsr166yjar"> |
| 667 |
|
|
| 668 |
<exec executable="perl"> |
<copy file="${jsr166yproduct.jar}" todir="${dist.dir}"/> |
|
<arg file="etc/defang.pl"/> |
|
|
<!-- <arg value="-v"/> --> |
|
|
<arg value="-s"/> <arg file="${src.dir}"/> |
|
|
<arg value="-t"/> <arg file="${pretiger.src.dir}"/> |
|
|
</exec> |
|
| 669 |
|
|
| 670 |
</target> |
</target> |
| 671 |
|
|
| 672 |
<target name="compile-pretiger" |
<!-- extra166y --> |
| 673 |
depends="init, configure-compiler, defang" |
|
|
description="Compiles pre-Tiger sources to build folder"> |
|
| 674 |
|
|
| 675 |
<mkdir dir="${build.pretiger.dir}"/> |
<target name="extra166ycompile" |
| 676 |
|
depends="init, configure-compiler, jsr166ycompile" |
| 677 |
|
description="Compiles extra166y sources"> |
| 678 |
|
|
| 679 |
<javac srcdir="${pretiger.src.dir}" |
<mkdir dir="${build.extra166y.dir}"/> |
| 680 |
destdir="${build.pretiger.dir}" |
|
| 681 |
|
<javac srcdir="${extra166ysrc.dir}" |
| 682 |
|
destdir="${build.extra166y.dir}" |
| 683 |
debug="${build.debug}" |
debug="${build.debug}" |
| 684 |
|
classpath="${jsr166yproduct.jar}" |
| 685 |
debuglevel="${build.debuglevel}" |
debuglevel="${build.debuglevel}" |
| 686 |
deprecation="${build.deprecation}" |
deprecation="${build.deprecation}" |
| 687 |
source="${pretiger.sourcelevel}" |
source="${build.sourcelevel}" |
| 688 |
fork="true"> |
fork="true"> |
| 689 |
|
|
| 690 |
|
<include name="**/*.java"/> |
| 691 |
<compilerarg line="${build.args}"/> |
<compilerarg line="${build.args}"/> |
| 692 |
<exclude name="**/Thread.java"/> |
<compilerarg value="-XDignore.symbol.file=true"/> |
| 693 |
|
<compilerarg value="${bootclasspath.args}"/> |
| 694 |
|
|
| 695 |
|
<!-- <compilerarg line="-Xlint -Xmaxwarns 1000"/> --> |
| 696 |
|
|
| 697 |
</javac> |
</javac> |
| 698 |
|
|
| 699 |
</target> |
</target> |
| 700 |
|
|
|
<target name="pretiger" depends="compile-pretiger"> |
|
| 701 |
|
|
|
<mkdir dir="${build.lib.dir}"/> |
|
| 702 |
|
|
| 703 |
<jar destfile="${pretiger.jar}"> |
<target name="extra166yjar" |
| 704 |
<fileset dir="${build.pretiger.dir}"> |
depends="extra166ycompile" |
| 705 |
</fileset> |
description="Builds library jar from compiled sources"> |
| 706 |
|
|
| 707 |
|
<mkdir dir="${build.extra166ylib.dir}"/> |
| 708 |
|
|
| 709 |
|
<jar destfile="${extra166yproduct.jar}" index="true"> |
| 710 |
|
<fileset dir="${build.extra166y.dir}"/> |
| 711 |
</jar> |
</jar> |
| 712 |
|
|
| 713 |
</target> |
</target> |
| 714 |
|
|
| 715 |
|
|
| 716 |
|
|
| 717 |
|
<target name="extra166ydocs" |
| 718 |
|
description="Builds javadocs with custom tags to build folder"> |
| 719 |
|
|
| 720 |
|
<delete dir="${build.extra166yjavadocs.dir}"/> |
| 721 |
|
<mkdir dir="${build.extra166yjavadocs.dir}"/> |
| 722 |
|
|
| 723 |
|
<javadoc destdir="${build.extra166yjavadocs.dir}" |
| 724 |
|
packagenames="extra166y" |
| 725 |
|
link="http://download.oracle.com/javase/6/docs/api/" |
| 726 |
|
source="${build.sourcelevel}" |
| 727 |
|
sourcepath="${topsrc.dir}:${jdksrc.dir}" /> |
| 728 |
|
|
| 729 |
|
</target> |
| 730 |
|
|
| 731 |
|
|
| 732 |
|
<target name="extra166ydist" |
| 733 |
|
depends="extra166ydist-clean, extra166ydist-jar, extra166ydist-docs" |
| 734 |
|
description="Puts all distributable products in single hierarchy"/> |
| 735 |
|
|
| 736 |
|
|
| 737 |
|
|
| 738 |
|
<target name="extra166yclean" |
| 739 |
|
description="Removes all build products"> |
| 740 |
|
|
| 741 |
|
<delete dir="${build.extra166y.dir}"/> |
| 742 |
|
<delete dir="${build.extra166ylib.dir}"/> |
| 743 |
|
|
| 744 |
|
</target> |
| 745 |
|
|
| 746 |
|
|
| 747 |
|
|
| 748 |
|
<target name="extra166ydist-clean" |
| 749 |
|
description="Removes all build and distribution products"> |
| 750 |
|
|
| 751 |
|
</target> |
| 752 |
|
|
| 753 |
|
<target name="extra166ydist-docs" |
| 754 |
|
description="Builds javadocs without custom tags to dist folder"> |
| 755 |
|
|
| 756 |
|
<delete dir="${dist.extra166yjavadocs.dir}"/> |
| 757 |
|
<mkdir dir="${dist.extra166yjavadocs.dir}"/> |
| 758 |
|
|
| 759 |
|
<javadoc destdir="${dist.extra166yjavadocs.dir}" |
| 760 |
|
packagenames="extra166y" |
| 761 |
|
link="http://download.oracle.com/javase/6/docs/api/" |
| 762 |
|
source="${build.sourcelevel}" |
| 763 |
|
sourcepath="${topsrc.dir}:${jdksrc.dir}" /> |
| 764 |
|
|
| 765 |
|
</target> |
| 766 |
|
|
| 767 |
|
<target name="extra166ydist-jar" |
| 768 |
|
depends="extra166yclean, extra166yjar"> |
| 769 |
|
|
| 770 |
|
<copy file="${extra166yproduct.jar}" todir="${dist.dir}"/> |
| 771 |
|
|
| 772 |
|
</target> |
| 773 |
|
|
| 774 |
</project> |
</project> |