ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/build.xml
(Generate patch)

Comparing jsr166/build.xml (file contents):
Revision 1.58 by tim, Mon Sep 15 15:13:35 2003 UTC vs.
Revision 1.84 by dl, Thu Nov 25 12:48:45 2010 UTC

# Line 21 | Line 21
21  
22  
23    <!-- Compilation options -->
24 <  <property name="build.sourcelevel"    value="1.5"/>
25 <  <property name="build.docsourcelevel" value="1.4"/>
24 >  <property name="build.sourcelevel"    value="1.6"/>
25    <property name="build.debug"          value="true"/>
26    <property name="build.debuglevel"     value="source,lines,vars"/>
27    <property name="build.deprecation"    value="false"/>
28  
29    <!-- Build locations -->
30 <  <property name="build.dir"            location="build"/>
31 <  <property name="build.classes.dir"    location="${build.dir}/classes"/>
32 <  <property name="build.testcases.dir"  location="${build.dir}/testcases"/>
33 <  <property name="build.lib.dir"        location="${build.dir}/lib"/>
34 <  <property name="build.ant.dir"        location="${build.dir}/ant"/>
35 <  <property name="build.javadocs.dir"   location="${build.dir}/javadocs"/>
36 <  <property name="build.sinjdocs.dir"   location="${build.dir}/sinjdocs"/>
37 <  <property name="build.stripped.dir"   location="${build.dir}/stripped"/>
38 <  <property name="build.reports.dir"    location="${build.dir}/reports"/>
39 <  <property name="build.doccheck.dir"   location="${build.dir}/doccheck"/>
40 <  <property name="build.filter.src.dir" location="${build.dir}/filtersrc"/>
41 <  <property name="build.dc-filter.dir"  location="${build.dir}/filterdocchk"/>
42 <  <property name="build.checkstyle.dir" location="${build.dir}/checkstyle"/>
30 >  <property name="build.dir"                   location="build"/>
31 >  <property name="build.classes.dir"           location="${build.dir}/classes"/>
32 >  <property name="build.testcases.dir"         location="${build.dir}/testcases"/>
33 >  <property name="build.loops.dir"             location="${build.dir}/loops"/>
34 >  <property name="build.lib.dir"               location="${build.dir}/lib"/>
35 >  <property name="build.javadocs.dir"          location="${build.dir}/javadocs"/>
36 >  <property name="build.reports.dir"           location="${build.dir}/reports"/>
37 >  <property name="build.jsr166x.dir"           location="${build.dir}/jsr166x"/>
38 >  <property name="build.jsr166xlib.dir"        location="${build.dir}/jsr166xlib"/>
39 >  <property name="build.jsr166xjavadocs.dir"   location="${build.dir}/jsr166xjavadocs"/>
40 >
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 -->
50    <property name="src.dir"              location="${basedir}/src/main"/>
51    <property name="test.src.dir"         location="${basedir}/src/test"/>
52 <  <property name="ant.src.dir"          location="${basedir}/etc/ant"/>
53 <  <property name="stylesheet.dir"       location="${basedir}/etc/xsl"/>
52 >  <property name="loops.src.dir"        location="${basedir}/src/loops"/>
53 >  <property name="tck.src.dir"          location="${test.src.dir}/tck"/>
54 >  <property name="jtreg.src.dir"        location="${test.src.dir}/jtreg"/>
55    <property name="lib.dir"              location="${basedir}/lib"/>
56    <property name="dist.dir"             location="${basedir}/dist"/>
57 <
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 -->
63 <  <property name="dist.javadocs.dir"    location="${dist.dir}/docs"/>
63 >  <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 -->
69    <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"/>
59  <property name="rt.jar"               location="${java.home}/lib/rt.jar"/>
60  <property name="sinjdoc.jar"          location="${lib.dir}/sinjdoc.jar"/>
61
74  
75 <  <!-- Files excluded from dist-docs -->
76 <  <patternset id="docs.exclusion">
65 <    <exclude name="java/util/Random.*"/>
66 <    <exclude name="sun/misc/Unsafe.*"/>
67 <  </patternset>
75 >  <!-- Bootclasspath argument -->
76 >  <property name="bootclasspath.args"   value="-Xbootclasspath/p:${product.jar}"/>
77  
78 +  <!-- Test classpath -->
79 +  <path id="test.classpath">
80 +    <pathelement location="${build.testcases.dir}"/>
81 +    <pathelement location="${junit.jar}"/>
82 +  </path>
83 +
84 +  <!-- ALoops classpath -->
85 +  <path id="loops.classpath">
86 +    <pathelement location="${build.loops.dir}"/>
87 +  </path>
88  
89  
90    <!-- 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"
97 <          depends="init, configure-compiler, prepare-src"
97 >          depends="init, configure-compiler"
98            description="Compiles main sources to build folder">
99  
77    <property name="prepare.src.dir" value="${src.dir}"/>
78
100      <mkdir dir="${build.classes.dir}"/>
101  
102 <    <javac srcdir="${prepare.src.dir}"
102 >    <javac srcdir="${src.dir}"
103            destdir="${build.classes.dir}"
104              debug="${build.debug}"
105         debuglevel="${build.debuglevel}"
# Line 86 | Line 107
107             source="${build.sourcelevel}"
108               fork="true">
109  
110 +      <include name="**/*.java"/>
111 +      <compilerarg value="-XDignore.symbol.file=true"/>
112 +
113 + <!--
114 +      <exclude name="java/lang/**"/>
115        <compilerarg line="${build.args}"/>
116 +      <compilerarg line="-Xlint -Xmaxwarns 1000"/>
117 + -->
118  
119      </javac>
120  
121    </target>
122  
123  
96  <target name="jar"
97          depends="init-jar, native-jar"
98          description="Builds library jar from compiled sources"/>
99
124  
125 <  <target name="test"
126 <          depends="init, configure-tests, report-tests"
127 <          description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" />
125 >  <target name="jar"
126 >          depends="compile"
127 >          description="Builds library jar from compiled sources">
128  
129 +    <mkdir dir="${build.lib.dir}"/>
130  
131 <  <target name="checkstyle"
132 <          depends="filter-src"
133 <          description="Reports on style errors in Java source (verbose, mostly chaff)">
109 <
110 <    <taskdef resource="checkstyletask.properties"
111 <            classpath="${lib.dir}/checkstyle-all-3.1.jar"/>
112 <
113 <    <mkdir dir="${build.checkstyle.dir}"/>
114 <    
115 <    <checkstyle config="etc/checkstyle/sun_checks.xml"
116 <       failOnViolation="false">
117 <      <formatter type="xml" toFile="${build.checkstyle.dir}/checkstyle-report.xml"/>
118 <      <fileset dir="${build.filter.src.dir}" includes="**/*.java"/>
119 <    </checkstyle>
120 <    
121 <    <style in="${build.checkstyle.dir}/checkstyle-report.xml"
122 <          out="${build.checkstyle.dir}/checkstyle-report.html"
123 <        style="${stylesheet.dir}/checkstyle-frames.xsl"/>
131 >    <jar destfile="${product.jar}">
132 >      <fileset dir="${build.classes.dir}"/>
133 >    </jar>
134  
135    </target>
136  
137  
128  <target name="doccheck"
129          depends="filter-doccheck"
130          description="Reports on javadoc style errors">
131
132    <delete dir="${build.doccheck.dir}"/>
133    <mkdir dir="${build.doccheck.dir}"/>
134
135    <javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck"
136         docletpath="${lib.dir}/doccheck.jar"
137            destdir="${build.doccheck.dir}">
138      <packageset dir="${build.dc-filter.dir}"/>
139    </javadoc>
138  
139 <    <echo>DocCheck output is in ${build.doccheck.dir}</echo>
139 >  <target name="test"
140 >          depends="init, configure-tests, report-tests"
141 >          description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" />
142  
143  </target>
143  
144  
145    <target name="docs"
147          depends="filter-src"
146            description="Builds javadocs with custom tags to build folder">
147  
148      <delete dir="${build.javadocs.dir}"/>
149      <mkdir dir="${build.javadocs.dir}"/>
150  
151      <javadoc destdir="${build.javadocs.dir}"
152 <                link="http://java.sun.com/j2se/1.4.1/docs/api"
152 >                link="http://download.oracle.com/javase/6/docs/api/"
153              overview="${src.dir}/intro.html"
154 <              source="${build.docsourcelevel}">
154 >            sourcepath="${src.dir}:${jdksrc.dir}"
155 >    >
156  
157 <      <tag name="revised" description="Last revised:"/>
159 <      <tag name="spec"    description="Specified by:"/>
160 <
161 <      <packageset dir="${build.filter.src.dir}"/>
157 >      <packageset dir="${src.dir}"/>
158  
159      </javadoc>
160  
161    </target>
162  
163  
168  <target name="sinjdocs"
169          depends="configure-tests"
170          description="Builds javadocs with custom tags to build folder">
171
172    <delete dir="${build.sinjdocs.dir}"/>
173    <mkdir dir="${build.sinjdocs.dir}"/>
174
175    <java classname="net.cscott.sinjdoc.Main" fork="true">
176
177      <jvmarg value="-Xbootclasspath/p:${test.bootclasspath}"/>
178
179      <classpath>
180        <pathelement location="${sinjdoc.jar}"/>
181        <pathelement location="${lib.dir}/jutil.jar"/>
182        <pathelement location="${lib.dir}/cup.jar"/>
183        <path refid="test.classpath"/>
184      </classpath>
185
186      <!-- <arg value="-help"/> -->
187      <!-- <arg value="-verbose"/> -->
188      <!-- <arg value="-link"/>  <arg value="http://java.sun.com/j2se/1.4.1/docs/api"/> -->
189      
190      <arg value="-d"/>          <arg value="${build.sinjdocs.dir}"/>
191      <arg value="-sourcepath"/> <arg value="${src.dir}"/>
192      <arg value="-overview"/>   <arg value="${src.dir}/intro.html"/>
193      <arg value="-source"/>     <arg value="${build.sourcelevel}"/>
194      
195      <arg value="java.lang"/>
196      <arg value="java.util"/>
197      <arg value="java.util.concurrent"/>
198      <arg value="java.util.concurrent.atomic"/>
199      <arg value="java.util.concurrent.locks"/>
200
201
202    </java>
203
204  </target>
205
164  
165    <target name="dist"
166            depends="init, dist-clean, dist-jar, dist-docs"
# Line 227 | Line 185
185  
186    </target>
187  
188 +
189 +
190    <target name="clean"
191            description="Removes all build products">
192  
# Line 237 | Line 197
197    </target>
198  
199  
200 +
201    <target name="dist-clean"
202            description="Removes all build and distribution products">
203  
# Line 245 | Line 206
206    </target>
207  
208  
209 +
210    <target name="dist-docs"
249          depends="filter-src"
211            description="Builds javadocs without custom tags to dist folder">
212  
213      <delete dir="${dist.javadocs.dir}"/>
214      <mkdir dir="${dist.javadocs.dir}"/>
215  
216      <javadoc destdir="${dist.javadocs.dir}"
217 <                link="http://java.sun.com/j2se/1.4.1/docs/api"
217 >            link="http://download.oracle.com/javase/6/docs/api/"
218              overview="${src.dir}/intro.html"
258              source="${build.docsourcelevel}">
259
260      <packageset dir="${build.filter.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>
243  
244    </target>
# Line 278 | Line 258
258    </target>
259  
260  
281  <target name="init-jar">
282
283    <mkdir dir="${build.lib.dir}"/>
284
285  </target>
286
287
288  <target name="native-jar"
289          depends="compile">
290
291    <jar destfile="${product.jar}">
292      <fileset dir="${build.classes.dir}"/>
293    </jar>
294
295  </target>
296
297
261    <target name="dist-jar"
262            depends="clean, jar">
263  
# Line 303 | Line 266
266    </target>
267  
268  
269 <  <target name="compile-ant-filter"
270 <          depends="init">
308 <
309 <    <mkdir dir="${build.ant.dir}"/>
310 <
311 <    <javac srcdir="${ant.src.dir}"
312 <          destdir="${build.ant.dir}"
313 <           source="1.4"
314 <    />
315 <
316 <  </target>
317 <
318 <
319 <  <target name="filter-src"
320 <          depends="compile-ant-filter">
321 <
322 <    <mkdir dir="${build.filter.src.dir}"/>
323 <
324 <    <copy todir="${build.filter.src.dir}">
325 <      <fileset dir="${src.dir}">
326 <        <include name="**/*.html"/>
327 <      </fileset>
328 <    </copy>
329 <
330 <    <copy todir="${build.filter.src.dir}">
331 <      <fileset dir="${src.dir}">
332 <        <exclude name="**/*.html"/>
333 <        <patternset refid="docs.exclusion"/>
334 <      </fileset>
335 <      <filterchain>
336 <
337 <        <!--
338 <         # This filter gets rid of angle-bracketed type parameters
339 <         # so that javadoc can run on the result. The following
340 <         # heuristic seems to work:
341 <         #
342 <         # For all lines not starting with space(s)-asterisk-space(s),
343 <         #   replace <something> with a space, where there may be more
344 <         #   than one right angle bracket at the end, and "something"
345 <         #   must not contain parens or pipes. (This may need some
346 <         #   tweaking.)
347 <         -->
348 <
349 <        <filterreader classname="jsr166.ant.filters.ReplaceFilter"
350 <                      classpath="${build.ant.dir}">
351 <          <param name="notmatching" value="^\s+\*\s.*$"/>
352 <          <param name="pattern"     value="&lt;[^|>()]+?>+"/>
353 <          <param name="replacement" value=" "/>
354 <        </filterreader>
355 <
356 <      </filterchain>
357 <    </copy>
358 <
359 <  </target>
360 <
269 >  <target name="compile-tests"
270 >          depends="jar">
271  
272 <  <target name="filter-doccheck"
363 <          depends="filter-src">
272 >    <mkdir dir="${build.testcases.dir}"/>
273  
274 <    <mkdir dir="${build.dc-filter.dir}"/>
274 >    <javac srcdir="${tck.src.dir}"
275 >          destdir="${build.testcases.dir}"
276 >            debug="${build.debug}"
277 >       debuglevel="${build.debuglevel}"
278 >      deprecation="${build.deprecation}"
279 >           source="${build.sourcelevel}"
280 >             fork="true">
281  
282 <    <copy todir="${build.dc-filter.dir}">
283 <      <fileset dir="${build.filter.src.dir}">
284 <        <include name="**/*.html"/>
370 <      </fileset>
371 <    </copy>
282 >      <compilerarg value="${bootclasspath.args}"/>
283 >      <compilerarg line="${build.args}"/>
284 >      <compilerarg value="-XDignore.symbol.file=true"/>
285  
286 <    <property name="generic.declarations"
374 <             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 {}"
375 <    />
286 >      <classpath refid="test.classpath"/>
287  
288 <    <copy todir="${build.dc-filter.dir}">
378 <      <fileset dir="${build.filter.src.dir}">
379 <        <exclude name="**/*.html"/>
380 <      </fileset>
381 <      <filterchain>
382 <        <!--
383 <         # These two filters try to make the source look like
384 <         # something that doccheck can process. The first removes
385 <         # -source 1.4 assertions and the second adds in a bunch
386 <         # of single letter public nested marker interfaces so that
387 <         # the generic type parameters are recognized.
388 <         -->
389 <
390 <        <filterreader classname="jsr166.ant.filters.ReplaceFilter"
391 <                      classpath="${build.ant.dir}">
392 <          <param name="matching"    value="^\s*assert[\s ].*$"/>
393 <          <param name="pattern"     value="assert"/>
394 <          <param name="replacement" value="//assert"/>
395 <        </filterreader>
396 <
397 <        <filterreader classname="jsr166.ant.filters.ReplaceFilter"
398 <                      classpath="${build.ant.dir}">
399 <          <param name="matching"    value="^([^*]*(class|interface|implements) .*|)\{.*$"/>
400 <          <param name="pattern"     value="$"/>
401 <          <param name="replacement" value=" ${generic.declarations}"/>
402 <        </filterreader>
288 >    </javac>
289  
290 <      </filterchain>
291 <    </copy>
290 >    <javac srcdir="${test.src.dir}"
291 >          destdir="${build.testcases.dir}"
292 >            debug="${build.debug}"
293 >       debuglevel="${build.debuglevel}"
294 >      deprecation="${build.deprecation}"
295 >           source="${build.sourcelevel}"
296 >             fork="true">
297  
298 <  </target>
298 >      <include name="jsr166/test/**"/>
299  
300 +      <compilerarg value="${bootclasspath.args}"/>
301 +      <compilerarg line="${build.args}"/>
302 +      <compilerarg value="-XDignore.symbol.file=true"/>
303  
304 <  <target name="compile-tests"
411 <          depends="jar">
304 >      <classpath refid="test.classpath"/>
305  
306 <    <mkdir dir="${build.testcases.dir}"/>
306 >    </javac>
307  
308 <    <javac srcdir="${test.src.dir}"
308 > <!--
309 >    <javac srcdir="${jtreg.src.dir}"
310            destdir="${build.testcases.dir}"
311              debug="${build.debug}"
312         debuglevel="${build.debuglevel}"
# Line 420 | Line 314
314             source="${build.sourcelevel}"
315               fork="true">
316  
317 +      <compilerarg value="${bootclasspath.args}"/>
318        <compilerarg line="${build.args}"/>
319 +      <compilerarg value="-XDignore.symbol.file=true"/>
320 +
321        <classpath refid="test.classpath"/>
425      
426      <include name="java/**"/>
427      <include name="jsr166/**"/>
322  
323      </javac>
324 + -->
325  
326    </target>
327  
# Line 446 | Line 341
341                      dir="${build.reports.dir}"
342                     fork="true">
343  
344 <      <jvmarg value="-Xbootclasspath:${test.bootclasspath}"/>
344 >      <jvmarg value="${bootclasspath.args}"/>
345 >      <jvmarg value="-server"/>
346 >      <jvmarg value="-showversion"/>
347 >
348 >      <classpath refid="test.classpath"/>
349  
350        <formatter type="xml"/>
351  
352 <      <batchtest todir="${build.reports.dir}">
352 >      <batchtest todir="${build.reports.dir}" unless="no.test.tck">
353 >        <fileset dir="${tck.src.dir}">
354 >          <include name="**/${testcase}Test.java"/>
355 >        </fileset>
356 >      </batchtest>
357 >
358 >      <batchtest todir="${build.reports.dir}" if="do.test.old">
359          <fileset dir="${test.src.dir}">
360 <          <include name="java/**/${testcase}Test.java"/>
361 <          <include name="jsr166/**/${testcase}Test.java"/>
360 >          <include name="jsr166/test/**/${testcase}Test.java"/>
361 >        </fileset>
362 >      </batchtest>
363 >
364 > <!--
365 >      <batchtest todir="${build.reports.dir}" if="do.test.jtreg">
366 >        <fileset dir="${jtreg.src.dir}">
367 >          <include name="**/${testcase}Test.java"/>
368          </fileset>
369        </batchtest>
370 + -->
371  
372      </junit>
373  
# Line 477 | Line 389
389        <fileset dir="${build.reports.dir}">
390          <include name="TEST-*.xml"/>
391        </fileset>
392 <      <report styledir="${stylesheet.dir}"
481 <                format="${junit.report.format}"
482 <                 todir="${build.reports.dir}"
392 >      <report format="${junit.report.format}" todir="${build.reports.dir}"
393        />
394      </junitreport>
395  
# Line 497 | Line 407
407      </condition>
408  
409      <property name="warnunchecked.arg" value=""/>
500    
501    <condition property="prepare.src.dir" value="${build.dir}/prepare-src">
502      <istrue value="${build.nothreads}"/>
503    </condition>
410  
411  
412      <!-- Common options in javac invocations -->
# Line 509 | Line 415
415    </target>
416  
417  
512  <target name="prepare-src"
513          depends="configure-compiler"
514          if="prepare.src.dir">
515
516    <mkdir dir="${prepare.src.dir}"/>
517    <copy todir="${prepare.src.dir}">
518      <fileset dir="${src.dir}">
519        <exclude name="java/lang/**"/>
520      </fileset>
521    </copy>
522
523  </target>
524
525
418    <target name="configure-tests"
419         depends="configure-compiler">
420  
# Line 530 | Line 422
422      <available property="junit.available"
423                 classname="junit.framework.Protectable"/>
424  
533    <fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests"
534          unless="junit.available"/>
535
425      <!-- Xalan -->
426      <available property="xalan.available"
427                 classname="org.apache.xalan.Version"/>
428  
429 +
430 +    <!-- Ant 1.6beta and later don't need or want this check -->
431 +    <!--
432 +    <fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests"
433 +          unless="junit.available"/>
434 +
435      <fail message="Need Xalan 2.5.1 jar in ${ant.home}${file.separator}lib to run tests"
436            unless="xalan.available"/>
437 +    -->
438  
439 +  </target>
440  
544    <!--
545     ! Bootclasspath munging for testing, so JUnit can test our local
546     ! modifications to java.*.
547     -->
441  
442 <    <path id="test.classpath">
443 <      <pathelement location="${product.jar}"/>
444 <      <pathelement location="${rt.jar}"/>
445 <      <pathelement location="${junit.jar}"/>
446 <      <pathelement location="${build.testcases.dir}"/>
447 <    </path>
442 >  <!-- Various demos and test programs -->
443 >
444 >
445 >  <target name="loops" depends="init, configure-compiler"
446 >          description="Benchmark from Doug Lea's AQS paper">
447 >
448 >    <mkdir dir="${build.loops.dir}"/>
449  
450 <    <path id="test.bootclasspath">
451 <      <path refid="test.classpath"/>
452 <    </path>
450 >    <javac srcdir="${loops.src.dir}"
451 >          destdir="${build.loops.dir}"
452 >            debug="${build.debug}"
453 >       debuglevel="${build.debuglevel}"
454 >      deprecation="${build.deprecation}"
455 >           source="${build.sourcelevel}"
456 >             fork="true">
457  
458 <    <!-- Flatten test classpaths into platform-appropriate strings -->
459 <    <property name="test.classpath"         refid="test.classpath"/>
460 <    <property name="test.bootclasspath"     refid="test.bootclasspath"/>
458 >      <compilerarg line="${build.args}"/>
459 >      <classpath refid="loops.classpath"/>
460 >      <compilerarg value="-XDignore.symbol.file=true"/>
461 >
462 >    </javac>
463 >
464 >    <java classname="ALoops" fork="true">
465 >      <classpath refid="loops.classpath"/>
466 >    </java>
467  
468    </target>
469  
470  
471 +  <!-- jsr166x -->
472  
568  <!-- Anthill targets -->
473  
474 <  <target name="anthill-build">
475 <  
476 <    <!-- Override this in user.properties -->
477 <    <property name="tiger.home" location="e:/j2sdk1.5.0"/>
478 <    
479 <    <exec resultproperty="result.property" dir="${basedir}" executable="${tiger.home}/bin/java">
480 <      <arg value="-Xmx256000000"/>
481 <      <!-- classpath of new JVM -->
482 <      <arg value="-classpath"/> <arg path="${java.class.path}"/>
483 <      <!-- location of Ant home directory -->
484 <      <arg value="-Dant.home=${ant.home}"/>
485 <      <!-- the Ant main class -->
486 <      <arg value="org.apache.tools.ant.Main"/>
487 <      <!-- The build file -->
488 <      <arg value="-buildfile"/>  <arg value="build.xml"/>
489 <      <!-- the target to build on the new Ant instance -->
490 <      <arg value="-DJAVA_HOME=${tiger.home}"/>
491 <      <arg value="do-anthill-build"/>
492 <    </exec>
474 >  <target name="jsr166xcompile"
475 >          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}"
483 >       debuglevel="${build.debuglevel}"
484 >      deprecation="${build.deprecation}"
485 >           source="${build.sourcelevel}"
486 >             fork="true">
487 >
488 >      <include name="**/*.java"/>
489 >      <compilerarg line="${build.args}"/>
490 >      <compilerarg value="-XDignore.symbol.file=true"/>
491 >
492 >    </javac>
493 >
494    </target>
590  
591  <target name="do-anthill-build"
592          depends="jar, test, docs, dist-docs"/>
495  
594  <target name="anthill-publish">
496  
596    <copy todir="${deployDir}/docs/private">
597      <fileset dir="${build.javadocs.dir}"/>
598    </copy>
497  
498 <    <copy todir="${deployDir}/docs/public">
499 <      <fileset dir="${dist.javadocs.dir}"/>
500 <    </copy>
498 >  <target name="jsr166xjar"
499 >          depends="jsr166xcompile"
500 >          description="Builds library jar from compiled sources">
501  
502 <    <copy tofile="${deployDir}/index.html"
605 <          file="${basedir}/etc/anthill-index.html"/>
502 >    <mkdir dir="${build.jsr166xlib.dir}"/>
503  
504 <    <copy todir="${deployDir}/notes">
505 <      <fileset dir="${basedir}/etc/notes"/>
506 <    </copy>
504 >    <jar destfile="${jsr166xproduct.jar}">
505 >      <fileset dir="${build.jsr166x.dir}"/>
506 >    </jar>
507  
508    </target>
509  
510  
614  <target name="ng" depends="test">
615    <java classname="SuperfluousAbstract" fork="true">
511  
512 <      <jvmarg value="-Xbootclasspath/p:${test.bootclasspath}"/>
512 >  <target name="jsr166xdocs"
513 >          description="Builds javadocs with custom tags to build folder">
514 >
515 >    <delete dir="${build.jsr166xjavadocs.dir}"/>
516 >    <mkdir dir="${build.jsr166xjavadocs.dir}"/>
517 >
518 >    <javadoc destdir="${build.jsr166xjavadocs.dir}"
519 >             link="http://download.oracle.com/javase/6/docs/api/"
520 >            sourcepath="${topsrc.dir}:${jdksrc.dir}"
521 >    >
522 >      <packageset dir="${topsrc.dir}" defaultexcludes="yes">
523 >      <include name="jsr166x"/>
524 >      </packageset>
525 >
526 >
527 >    </javadoc>
528 >
529 >  </target>
530 >
531 >
532 >  <target name="jsr166xdist"
533 >          depends="jsr166xdist-clean, jsr166xdist-jar, jsr166xdist-docs"
534 >          description="Puts all distributable products in single hierarchy"/>
535 >
536 >
537 >
538 >  <target name="jsr166xclean"
539 >          description="Removes all build products">
540 >
541 >    <delete dir="${build.jsr166x.dir}"/>
542 >    <delete dir="${build.jsr166xlib.dir}"/>
543 >
544 >  </target>
545 >
546 >
547 >
548 >  <target name="jsr166xdist-clean"
549 >          description="Removes all build and distribution products">
550 >
551 >  </target>
552 >
553 >
554 >
555 >  <target name="jsr166xdist-docs"
556 >          description="Builds javadocs without custom tags to dist folder">
557 >
558 >    <delete dir="${dist.jsr166xjavadocs.dir}"/>
559 >    <mkdir dir="${dist.jsr166xjavadocs.dir}"/>
560 >
561 >    <javadoc destdir="${dist.jsr166xjavadocs.dir}"
562 >                link="http://download.oracle.com/javase/6/docs/api/"
563 >              source="${build.sourcelevel}">
564 >
565 >      <packageset dir="${topsrc.dir}" defaultexcludes="yes">
566 >      <include name="jsr166x"/>
567 >      </packageset>
568 >
569 >    </javadoc>
570 >
571 >  </target>
572 >
573 >  <target name="jsr166xdist-jar"
574 >          depends="jsr166xclean, jsr166xjar">
575 >
576 >    <copy file="${jsr166xproduct.jar}" todir="${dist.dir}"/>
577 >
578 >  </target>
579 >
580 >  <!-- jsr166y -->
581 >
582 >
583 >  <target name="jsr166ycompile"
584 >          depends="init, configure-compiler"
585 >          description="Compiles jsr166y sources">
586 >
587 >    <mkdir dir="${build.jsr166y.dir}"/>
588 >
589 >    <javac srcdir="${jsr166ysrc.dir}"
590 >          destdir="${build.jsr166y.dir}"
591 >            debug="${build.debug}"
592 >       debuglevel="${build.debuglevel}"
593 >      deprecation="${build.deprecation}"
594 >           source="${build.sourcelevel}"
595 >             fork="true">
596 >
597 >      <include name="**/*.java"/>
598 >      <compilerarg line="${build.args}"/>
599 >      <compilerarg value="-XDignore.symbol.file=true"/>
600 >      <compilerarg value="${bootclasspath.args}"/>
601 >
602 > <!--       <compilerarg line="-Xlint -Xmaxwarns 1000"/> -->
603 >
604 >    </javac>
605 >
606 >  </target>
607 >
608 >
609 >
610 >  <target name="jsr166yjar"
611 >          depends="jsr166ycompile"
612 >          description="Builds library jar from compiled sources">
613 >
614 >    <mkdir dir="${build.jsr166ylib.dir}"/>
615 >
616 >    <jar destfile="${jsr166yproduct.jar}" index="true">
617 >      <fileset dir="${build.jsr166y.dir}"/>
618 >    </jar>
619 >
620 >  </target>
621 >
622 >
623 >
624 >  <target name="jsr166ydocs"
625 >          description="Builds javadocs with custom tags to build folder">
626 >
627 >    <delete dir="${build.jsr166yjavadocs.dir}"/>
628 >    <mkdir dir="${build.jsr166yjavadocs.dir}"/>
629 >
630 >    <javadoc destdir="${build.jsr166yjavadocs.dir}"
631 >                link="http://download.oracle.com/javase/6/docs/api/"
632 >            sourcepath="${topsrc.dir}:${jdksrc.dir}"
633 >    >
634 >      <packageset dir="${topsrc.dir}" defaultexcludes="no">
635 >      <include name="jsr166y"/>
636 >      </packageset>
637 >
638 >
639 >    </javadoc>
640 >
641 >  </target>
642 >
643 >
644 >  <target name="jsr166ydist"
645 >          depends="jsr166ydist-clean, jsr166ydist-jar, jsr166ydist-docs"
646 >          description="Puts all distributable products in single hierarchy"/>
647 >
648 >
649 >
650 >  <target name="jsr166yclean"
651 >          description="Removes all build products">
652 >
653 >    <delete dir="${build.jsr166y.dir}"/>
654 >    <delete dir="${build.jsr166ylib.dir}"/>
655 >
656 >  </target>
657 >
658 >
659 >
660 >  <target name="jsr166ydist-clean"
661 >          description="Removes all build and distribution products">
662 >
663 >  </target>
664 >
665 >  <target name="jsr166ydist-docs"
666 >          description="Builds javadocs without custom tags to dist folder">
667 >
668 >    <delete dir="${dist.jsr166yjavadocs.dir}"/>
669 >    <mkdir dir="${dist.jsr166yjavadocs.dir}"/>
670 >
671 >    <javadoc destdir="${dist.jsr166yjavadocs.dir}"
672 >                link="http://download.oracle.com/javase/6/docs/api/"
673 >              source="${build.sourcelevel}"
674 >            sourcepath="${topsrc.dir}:${jdksrc.dir}"
675 >            >
676 >      <fileset dir="${topsrc.dir}" defaultexcludes="yes">
677 >      <include name="jsr166y/*.java"/>
678 >            </fileset>
679 >    </javadoc>
680 >
681 >  </target>
682 >
683 >  <target name="jsr166ydist-jar"
684 >          depends="jsr166yclean, jsr166yjar">
685 >
686 >    <copy file="${jsr166yproduct.jar}" todir="${dist.dir}"/>
687 >
688 >  </target>
689 >
690 >  <!-- extra166y -->
691 >
692 >
693 >  <target name="extra166ycompile"
694 >          depends="init, configure-compiler, jsr166ycompile"
695 >          description="Compiles extra166y sources">
696 >
697 >    <mkdir dir="${build.extra166y.dir}"/>
698 >
699 >    <javac srcdir="${extra166ysrc.dir}"
700 >          destdir="${build.extra166y.dir}"
701 >            debug="${build.debug}"
702 >            classpath="${jsr166yproduct.jar}"
703 >       debuglevel="${build.debuglevel}"
704 >      deprecation="${build.deprecation}"
705 >           source="${build.sourcelevel}"
706 >             fork="true">
707 >
708 >      <include name="**/*.java"/>
709 >      <compilerarg line="${build.args}"/>
710 >      <compilerarg value="-XDignore.symbol.file=true"/>
711 >      <compilerarg value="${bootclasspath.args}"/>
712 >
713 > <!--       <compilerarg line="-Xlint -Xmaxwarns 1000"/> -->
714 >
715 >    </javac>
716 >
717 >  </target>
718 >
719 >
720 >
721 >  <target name="extra166yjar"
722 >          depends="extra166ycompile"
723 >          description="Builds library jar from compiled sources">
724 >
725 >    <mkdir dir="${build.extra166ylib.dir}"/>
726 >
727 >    <jar destfile="${extra166yproduct.jar}" index="true">
728 >      <fileset dir="${build.extra166y.dir}"/>
729 >    </jar>
730 >
731 >  </target>
732 >
733 >
734 >
735 >  <target name="extra166ydocs"
736 >          description="Builds javadocs with custom tags to build folder">
737 >
738 >    <delete dir="${build.extra166yjavadocs.dir}"/>
739 >    <mkdir dir="${build.extra166yjavadocs.dir}"/>
740 >
741 >    <javadoc destdir="${build.extra166yjavadocs.dir}"
742 >                link="http://download.oracle.com/javase/6/docs/api/"
743 >            sourcepath="${topsrc.dir}:${jdksrc.dir}"
744 >    >
745 >      <packageset dir="${topsrc.dir}" defaultexcludes="no">
746 >      <include name="extra166y"/>
747 >      </packageset>
748 >
749 >
750 >    </javadoc>
751  
619    </java>
752    </target>
753  
754  
755 +  <target name="extra166ydist"
756 +          depends="extra166ydist-clean, extra166ydist-jar, extra166ydist-docs"
757 +          description="Puts all distributable products in single hierarchy"/>
758 +
759 +
760 +
761 +  <target name="extra166yclean"
762 +          description="Removes all build products">
763 +
764 +    <delete dir="${build.extra166y.dir}"/>
765 +    <delete dir="${build.extra166ylib.dir}"/>
766 +
767 +  </target>
768 +
769 +
770 +
771 +  <target name="extra166ydist-clean"
772 +          description="Removes all build and distribution products">
773 +
774 +  </target>
775 +
776 +  <target name="extra166ydist-docs"
777 +          description="Builds javadocs without custom tags to dist folder">
778 +
779 +    <delete dir="${dist.extra166yjavadocs.dir}"/>
780 +    <mkdir dir="${dist.extra166yjavadocs.dir}"/>
781 +
782 +    <javadoc destdir="${dist.extra166yjavadocs.dir}"
783 +                link="http://download.oracle.com/javase/6/docs/api/"
784 +              source="${build.sourcelevel}"
785 +            sourcepath="${topsrc.dir}:${jdksrc.dir}"
786 +            >
787 +      <fileset dir="${topsrc.dir}" defaultexcludes="yes">
788 +      <include name="extra166y/*.java"/>
789 +            </fileset>
790 +    </javadoc>
791 +
792 +  </target>
793 +
794 +  <target name="extra166ydist-jar"
795 +          depends="extra166yclean, extra166yjar">
796 +
797 +    <copy file="${extra166yproduct.jar}" todir="${dist.dir}"/>
798 +
799 +  </target>
800 +
801   </project>

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines