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.74 by dl, Thu Sep 13 11:19:25 2007 UTC vs.
Revision 1.92 by jsr166, Mon Jan 14 07:08:06 2013 UTC

# Line 21 | Line 21
21  
22  
23    <!-- Compilation options -->
24 <  <property name="build.sourcelevel"    value="1.5"/>
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.j1.dir"         location="${build.dir}/j1"/>
34 <  <property name="build.loops.dir"      location="${build.dir}/loops"/>
35 <  <property name="build.lib.dir"        location="${build.dir}/lib"/>
36 <  <property name="build.ant.dir"        location="${build.dir}/ant"/>
37 <  <property name="build.javadocs.dir"   location="${build.dir}/javadocs"/>
38 <  <property name="build.reports.dir"    location="${build.dir}/reports"/>
39 <  <property name="build.checkstyle.dir" location="${build.dir}/checkstyle"/>
40 <  <property name="build.doccheck.dir"   location="${build.dir}/doccheck"/>
41 <  <property name="build.filter.src.dir" location="${build.dir}/filtersrc"/>
42 <  <property name="build.dc-filter.dir"  location="${build.dir}/filterdocchk"/>
43 <  <property name="build.jsr166x.dir"    location="${build.dir}/jsr166x"/>
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 >
38 >  <property name="build.jdk7.dir"              location="${build.dir}/jdk7"/>
39 >  <property name="build.jdk7.lib.dir"          location="${build.jdk7.dir}"/>
40 >  <property name="build.jdk7.classes.dir"      location="${build.jdk7.dir}/classes"/>
41 >  <property name="build.jdk7.docs.dir"         location="${build.jdk7.dir}/docs"/>
42 >
43 >  <property name="build.jsr166x.dir"           location="${build.dir}/jsr166x"/>
44    <property name="build.jsr166xlib.dir"        location="${build.dir}/jsr166xlib"/>
45    <property name="build.jsr166xjavadocs.dir"   location="${build.dir}/jsr166xjavadocs"/>
46  
47 <  <property name="build.jsr166y.dir"    location="${build.dir}/jsr166y"/>
47 >  <property name="build.jsr166y.dir"           location="${build.dir}/jsr166y"/>
48    <property name="build.jsr166ylib.dir"        location="${build.dir}/jsr166ylib"/>
49    <property name="build.jsr166yjavadocs.dir"   location="${build.dir}/jsr166yjavadocs"/>
50  
51 +  <property name="build.jsr166e.dir"           location="${build.dir}/jsr166e"/>
52 +  <property name="build.jsr166elib.dir"        location="${build.dir}/jsr166elib"/>
53 +  <property name="build.jsr166ejavadocs.dir"   location="${build.dir}/jsr166ejavadocs"/>
54 +
55 +  <property name="build.extra166y.dir"         location="${build.dir}/extra166y"/>
56 +  <property name="build.extra166ylib.dir"      location="${build.dir}/extra166ylib"/>
57 +  <property name="build.extra166yjavadocs.dir" location="${build.dir}/extra166yjavadocs"/>
58 +
59 +  <!-- JDK binary locations -->
60 +  <property name="jdks.home"  location="${user.home}/jdk"/>
61 +  <property name="jdk6.home"  location="${jdks.home}/jdk1.6.0"/>
62 +  <property name="jdk7.home"  location="${jdks.home}/jdk1.7.0"/>
63 +  <property name="jdk8.home"  location="${jdks.home}/jdk1.8.0"/>
64 +  <property name="javac6"     location="${jdk6.home}/bin/javac"/>
65 +  <property name="javac7"     location="${jdk7.home}/bin/javac"/>
66 +  <property name="javac8"     location="${jdk8.home}/bin/javac"/>
67 +  <property name="javadoc6"   location="${jdk6.home}/bin/javadoc"/>
68 +  <property name="javadoc7"   location="${jdk7.home}/bin/javadoc"/>
69 +  <property name="javadoc8"   location="${jdk8.home}/bin/javadoc"/>
70 +  <property name="bootdir6"   location="${jdk6.home}/jre/lib"/>
71 +  <property name="bootdir7"   location="${jdk7.home}/jre/lib"/>
72 +  <property name="bootdir8"   location="${jdk8.home}/jre/lib"/>
73 +  <property name="bootclasspath6"   value="${bootdir6}/resources.jar:${bootdir6}/rt.jar:${bootdir6}/jsse.jar:${bootdir6}/jce.jar:${bootdir6}/:${bootdir6}/charsets.jar"/>
74 +  <property name="bootclasspath7"   value="${bootdir7}/resources.jar:${bootdir7}/rt.jar:${bootdir7}/jsse.jar:${bootdir7}/jce.jar:${bootdir7}/:${bootdir7}/charsets.jar"/>
75 +  <property name="bootclasspath8"   value="${bootdir8}/resources.jar:${bootdir8}/rt.jar:${bootdir8}/jsse.jar:${bootdir8}/jce.jar:${bootdir8}/:${bootdir8}/charsets.jar"/>
76 +
77    <!-- Source locations -->
78    <property name="src.dir"              location="${basedir}/src/main"/>
79    <property name="test.src.dir"         location="${basedir}/src/test"/>
54  <property name="j1.src.dir"           location="${basedir}/src/javaone"/>
80    <property name="loops.src.dir"        location="${basedir}/src/loops"/>
81    <property name="tck.src.dir"          location="${test.src.dir}/tck"/>
82    <property name="jtreg.src.dir"        location="${test.src.dir}/jtreg"/>
58  <property name="ant.src.dir"          location="${basedir}/etc/ant"/>
59  <property name="stylesheet.dir"       location="${basedir}/etc/xsl"/>
83    <property name="lib.dir"              location="${basedir}/lib"/>
84    <property name="dist.dir"             location="${basedir}/dist"/>
85    <property name="topsrc.dir"           location="${basedir}/src"/>
86 <  <property name="jsr166xsrc.dir"       location="${basedir}/src/jsr166x"/>
87 <  <property name="jsr166ysrc.dir"       location="${basedir}/src/jsr166y"/>
86 >  <property name="jdk7src.dir"          location="${topsrc.dir}/jdk7"/>
87 >  <property name="jsr166xsrc.dir"       location="${topsrc.dir}/jsr166x"/>
88 >  <property name="jsr166ysrc.dir"       location="${topsrc.dir}/jsr166y"/>
89 >  <property name="jsr166esrc.dir"       location="${topsrc.dir}/jsr166e"/>
90 >  <property name="extra166ysrc.dir"     location="${topsrc.dir}/extra166y"/>
91 >  <property name="jdksrc.dir"           location="/home/dl/1.6.0/j2se/martin/j2se/src/share/classes"/>
92  
93    <!-- Distribution locations -->
94 <  <property name="dist.javadocs.dir"    location="${dist.dir}/docs"/>
94 >  <property name="dist.javadocs.dir"           location="${dist.dir}/docs"/>
95 >  <property name="dist.jdk7.docs.dir"          location="${dist.dir}/jsr166-jdk7docs"/>
96    <property name="dist.jsr166xjavadocs.dir"    location="${dist.dir}/jsr166xdocs"/>
97    <property name="dist.jsr166yjavadocs.dir"    location="${dist.dir}/jsr166ydocs"/>
98 +  <property name="dist.jsr166ejavadocs.dir"    location="${dist.dir}/jsr166edocs"/>
99 +  <property name="dist.extra166yjavadocs.dir"  location="${dist.dir}/extra166ydocs"/>
100  
101    <!-- Jar locations -->
102    <property name="product.jar"          location="${build.lib.dir}/jsr166.jar"/>
103 +  <property name="jdk7product.jar"      location="${build.jdk7.lib.dir}/jsr166-jdk7.jar"/>
104    <property name="jsr166xproduct.jar"   location="${build.jsr166xlib.dir}/jsr166x.jar"/>
105    <property name="jsr166yproduct.jar"   location="${build.jsr166ylib.dir}/jsr166y.jar"/>
106 +  <property name="jsr166eproduct.jar"   location="${build.jsr166elib.dir}/jsr166e.jar"/>
107 +  <property name="extra166yproduct.jar" location="${build.extra166ylib.dir}/extra166y.jar"/>
108    <property name="junit.jar"            location="${lib.dir}/junit.jar"/>
76  <property name="concurrent.jar"       location="${lib.dir}/concurrent.jar"/>
109  
110    <!-- Bootclasspath argument -->
111    <property name="bootclasspath.args"   value="-Xbootclasspath/p:${product.jar}"/>
112  
113 +  <!-- Canonical location of jdk API docs, to use with javadoc link attribute -->
114 +  <property name="jdkapi5docs.url"      value="http://docs.oracle.com/javase/1.5.0/docs/api/"/>
115 +  <property name="jdkapi6docs.url"      value="http://docs.oracle.com/javase/6/docs/api/"/>
116 +  <property name="jdkapi7docs.url"      value="http://docs.oracle.com/javase/7/docs/api/"/>
117 +
118 +  <property name="jdkapi8docs.url"      value="http://download.java.net/jdk8/docs/api/"/>
119 +  <!-- The below does not yet exist as of 2012-11 -->
120 +  <!-- <property name="jdkapi8docs.url" value="http://docs.oracle.com/javase/8/docs/api/"/> -->
121 +  <property name="jdkapidocs.url"       value="${jdkapi7docs.url}"/>
122 +
123    <!-- Test classpath -->
124    <path id="test.classpath">
125      <pathelement location="${build.testcases.dir}"/>
# Line 89 | Line 131
131      <pathelement location="${build.loops.dir}"/>
132    </path>
133  
92  <!-- J1 classpath -->
93  <path id="j1.classpath">
94    <pathelement location="${build.classes.dir}"/>
95    <pathelement location="${build.j1.dir}"/>
96    <pathelement location="${junit.jar}"/>
97
98    <!-- Include dl.u.c for BoundedBuffer comparison -->
99    <pathelement location="${concurrent.jar}"/>
100  </path>
101
134  
135    <!-- Main targets -->
136  
137 +  <target name="dists"
138 +          depends="dist, jsr166xdist, jsr166ydist,jsr166edist,  extra166ydist"
139 +          description="Builds all public jars and docs"/>
140  
141    <target name="compile"
142            depends="init, configure-compiler"
# Line 118 | Line 153
153               fork="true">
154  
155        <include name="**/*.java"/>
156 <      <compilerarg value="-XDignore.symbol.file"/>
156 >      <compilerarg value="-XDignore.symbol.file=true"/>
157  
158   <!--
159        <exclude name="java/lang/**"/>
# Line 158 | Line 193
193      <delete dir="${build.javadocs.dir}"/>
194      <mkdir dir="${build.javadocs.dir}"/>
195  
196 <    <javadoc destdir="${build.javadocs.dir}"
197 <                link="http://java.sun.com/javase/6/docs/api/"
163 <            overview="${src.dir}/intro.html"
164 <            sourcepath="${src.dir}:/home/dl/1.6.0/j2se/martin/j2se/src/share/classes"
165 <    >          
166 <
167 <      <packageset dir="${src.dir}"/>
168 <
169 <    </javadoc>
196 >    <!-- the packagenames="none" hack below prevents scanning the -->
197 >    <!-- sourcepath for packages -->
198  
199 <  </target>
200 <
201 <
202 <
203 <  <target name="doccheck"
204 <          depends="filter-doccheck"
205 <          description="Reports on javadoc style errors">
206 <
207 <    <delete dir="${build.doccheck.dir}"/>
180 <    <mkdir dir="${build.doccheck.dir}"/>
181 <
182 <    <javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck"
183 <         docletpath="${lib.dir}/doccheck.jar"
184 <            destdir="${build.doccheck.dir}">
185 <      <packageset dir="${build.dc-filter.dir}"/>
199 >    <javadoc destdir="${build.javadocs.dir}"
200 >             packagenames="none"
201 >             link="${jdkapidocs.url}"
202 >             overview="${src.dir}/intro.html"
203 >             sourcepath="${src.dir}:${jdksrc.dir}"
204 >             additionalparam="-XDignore.symbol.file=true" >
205 >      <fileset dir="${src.dir}" defaultexcludes="yes">
206 >        <include name="**/*.java"/>
207 >      </fileset>
208      </javadoc>
209  
188    <echo>DocCheck output is in ${build.doccheck.dir}</echo>
189
190  </target>
191
192
193
194  <target name="checkstyle"
195          depends="filter-src"
196          description="Reports on style errors in Java source (verbose, mostly chaff)">
197
198    <taskdef resource="checkstyletask.properties"
199            classpath="${lib.dir}/checkstyle-all-3.1.jar"/>
200
201    <mkdir dir="${build.checkstyle.dir}"/>
202
203    <checkstyle config="etc/checkstyle/sun_checks.xml"
204       failOnViolation="false">
205      <formatter type="xml" toFile="${build.checkstyle.dir}/checkstyle-report.xml"/>
206      <fileset dir="${build.filter.src.dir}" includes="**/*.java"/>
207    </checkstyle>
208
209    <style in="${build.checkstyle.dir}/checkstyle-report.xml"
210          out="${build.checkstyle.dir}/checkstyle-report.html"
211        style="${stylesheet.dir}/checkstyle-frames.xsl"/>
212
210    </target>
211  
212  
# Line 219 | Line 216
216            description="Puts all distributable products in single hierarchy"/>
217  
218  
222
219    <target name="release"
220            depends="dist"
221            description="Puts entire CVS tree, plus distribution productions, in a jar">
# Line 266 | Line 262
262      <delete dir="${dist.javadocs.dir}"/>
263      <mkdir dir="${dist.javadocs.dir}"/>
264  
265 <    <javadoc destdir="${dist.javadocs.dir}"
266 <            link="http://java.sun.com/javase/6/docs/api/"
271 <            overview="${src.dir}/intro.html"
265 >    <!-- the packagenames="none" hack below prevents scanning the -->
266 >    <!-- sourcepath for packages -->
267  
268 <            sourcepath="${src.dir}:/home/dl/1.6.0/j2se/martin/j2se/src/share/classes"
269 <     >
270 < <!--
271 <      <packageset dir="${src.dir}" defaultexcludes="yes">
272 <      <include name="java/util/concurrent"/>
273 <      <include name="java/util/concurrent/atomic"/>
274 <      <include name="java/util/concurrent/locks"/>
275 <      </packageset>
281 < -->
282 <      <fileset dir="${topsrc.dir}" defaultexcludes="yes">
283 <      <include name="main/java/util/concurrent/*.java"/>
284 <      <include name="main/java/util/concurrent/atomic/*.java"/>
285 <      <include name="main/java/util/concurrent/locks/*.java"/>
286 <      <include name="main/java/util/*.java"/>
287 < <!--
288 <      <include name="main/java/util/concurrent/*.html"/>
289 <      <include name="main/java/util/concurrent/atomic/*.html"/>
290 <      <include name="main/java/util/concurrent/locks/*.html"/>
291 <      <include name="main/java/util/*.html"/>
292 < -->
293 < <!--      <include name="jsr166x/*.java"/> -->
268 >    <javadoc destdir="${dist.javadocs.dir}"
269 >             packagenames="none"
270 >             link="${jdkapidocs.url}"
271 >             overview="${src.dir}/intro.html"
272 >             sourcepath="${src.dir}:${jdksrc.dir}"
273 >             additionalparam="-XDignore.symbol.file=true" >
274 >      <fileset dir="${src.dir}" defaultexcludes="yes">
275 >        <include name="**/*.java"/>
276        </fileset>
277      </javadoc>
278  
# Line 319 | Line 301
301    </target>
302  
303  
322  <target name="compile-ant-filter"
323          depends="init">
324
325    <mkdir dir="${build.ant.dir}"/>
326
327    <javac srcdir="${ant.src.dir}"
328          destdir="${build.ant.dir}"
329           source="1.4"/>
330
331  </target>
332
333
334  <target name="filter-src"
335          depends="compile-ant-filter">
336
337    <mkdir dir="${build.filter.src.dir}"/>
338
339    <copy todir="${build.filter.src.dir}">
340      <fileset dir="${src.dir}">
341        <include name="**/*.html"/>
342      </fileset>
343    </copy>
344
345    <copy todir="${build.filter.src.dir}">
346      <fileset dir="${src.dir}">
347        <exclude name="**/*.html"/>
348        <!-- Files excluded from dist-docs -->
349        <exclude name="java/util/Random.*"/>
350        <exclude name="sun/misc/Unsafe.*"/>
351      </fileset>
352      <!--
353      <filterchain>
354      -->
355
356        <!--
357         # This filter gets rid of angle-bracketed type parameters
358         # so that javadoc can run on the result. The following
359         # heuristic seems to work:
360         #
361         # For all lines not starting with space(s)-asterisk-space(s),
362         #   replace <something> with a space, where there may be more
363         #   than one right angle bracket at the end, and "something"
364         #   must not contain parens or pipes. (This may need some
365         #   tweaking.)
366         -->
367
368        <!--
369        <filterreader classname="jsr166.ant.filters.ReplaceFilter"
370                      classpath="${build.ant.dir}">
371          <param name="notmatching" value="^\s+\*\s.*$"/>
372          <param name="pattern"     value="&lt;[^|>()]+?>+"/>
373          <param name="replacement" value=" "/>
374        </filterreader>
375        -->
376
377      <!--
378      </filterchain>
379      -->
380    </copy>
381
382  </target>
383
384
385  <target name="filter-doccheck"
386          depends="filter-src">
387
388    <mkdir dir="${build.dc-filter.dir}"/>
389
390    <copy todir="${build.dc-filter.dir}">
391      <fileset dir="${build.filter.src.dir}">
392        <include name="**/*.html"/>
393      </fileset>
394    </copy>
395
396    <property name="generic.declarations"
397             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 {}"
398    />
399
400    <copy todir="${build.dc-filter.dir}">
401      <fileset dir="${build.filter.src.dir}">
402        <exclude name="**/*.html"/>
403      </fileset>
404      <filterchain>
405        <!--
406         # These two filters try to make the source look like
407         # something that doccheck can process. The first removes
408         # -source 1.4 assertions and the second adds in a bunch
409         # of single letter public nested marker interfaces so that
410         # the generic type parameters are recognized.
411         -->
412
413        <filterreader classname="jsr166.ant.filters.ReplaceFilter"
414                      classpath="${build.ant.dir}">
415          <param name="matching"    value="^\s*assert[\s ].*$"/>
416          <param name="pattern"     value="assert"/>
417          <param name="replacement" value="//assert"/>
418        </filterreader>
419
420        <filterreader classname="jsr166.ant.filters.ReplaceFilter"
421                      classpath="${build.ant.dir}">
422          <param name="matching"    value="^([^*]*(class|interface|implements) .*|)\{.*$"/>
423          <param name="pattern"     value="$"/>
424          <param name="replacement" value=" ${generic.declarations}"/>
425        </filterreader>
426
427      </filterchain>
428    </copy>
429
430  </target>
431
432
304    <target name="compile-tests"
305            depends="jar">
306  
# Line 445 | Line 316
316  
317        <compilerarg value="${bootclasspath.args}"/>
318        <compilerarg line="${build.args}"/>
319 +      <compilerarg value="-XDignore.symbol.file=true"/>
320  
321        <classpath refid="test.classpath"/>
322  
# Line 462 | Line 334
334  
335        <compilerarg value="${bootclasspath.args}"/>
336        <compilerarg line="${build.args}"/>
337 +      <compilerarg value="-XDignore.symbol.file=true"/>
338  
339        <classpath refid="test.classpath"/>
340  
# Line 478 | Line 351
351  
352        <compilerarg value="${bootclasspath.args}"/>
353        <compilerarg line="${build.args}"/>
354 +      <compilerarg value="-XDignore.symbol.file=true"/>
355  
356        <classpath refid="test.classpath"/>
357  
# Line 550 | Line 424
424        <fileset dir="${build.reports.dir}">
425          <include name="TEST-*.xml"/>
426        </fileset>
427 <      <report styledir="${stylesheet.dir}"
554 <                format="${junit.report.format}"
555 <                 todir="${build.reports.dir}"
427 >      <report format="${junit.report.format}" todir="${build.reports.dir}"
428        />
429      </junitreport>
430  
# Line 602 | Line 474
474    </target>
475  
476  
605
606  <!-- Anthill targets -->
607
608  <target name="anthill-build">
609
610    <!-- Override this in user.properties -->
611    <property name="tiger.home" location="e:/j2sdk1.5.0"/>
612
613    <exec resultproperty="result.property" dir="${basedir}" executable="${tiger.home}/bin/java">
614      <arg value="-Xmx256000000"/>
615      <!-- classpath of new JVM -->
616      <arg value="-classpath"/> <arg path="${java.class.path}"/>
617      <!-- location of Ant home directory -->
618      <arg value="-Dant.home=${ant.home}"/>
619      <!-- the Ant main class -->
620      <arg value="org.apache.tools.ant.Main"/>
621      <!-- The build file -->
622      <arg value="-buildfile"/>  <arg value="build.xml"/>
623      <!-- the target to build on the new Ant instance -->
624      <arg value="-DJAVA_HOME=${tiger.home}"/>
625      <arg value="do-anthill-build"/>
626    </exec>
627  </target>
628
629  <target name="do-anthill-build"
630          depends="jar, test, docs, dist-docs"/>
631
632  <target name="anthill-publish">
633
634    <copy todir="${deployDir}/docs/private">
635      <fileset dir="${build.javadocs.dir}"/>
636    </copy>
637
638    <copy todir="${deployDir}/docs/public">
639      <fileset dir="${dist.javadocs.dir}"/>
640    </copy>
641
642    <copy tofile="${deployDir}/index.html"
643          file="${basedir}/etc/anthill-index.html"/>
644
645    <copy todir="${deployDir}/notes">
646      <fileset dir="${basedir}/etc/notes"/>
647    </copy>
648
649  </target>
650
651
652
477    <!-- Various demos and test programs -->
478  
479  
656  <target name="sample" depends="init, configure-compiler"
657          description="Standalone demo program">
658
659    <mkdir dir="${build.testcases.dir}"/>
660
661    <javac srcdir="${test.src.dir}"
662          destdir="${build.testcases.dir}"
663            debug="${build.debug}"
664       debuglevel="${build.debuglevel}"
665      deprecation="${build.deprecation}"
666           source="${build.sourcelevel}"
667             fork="true">
668
669      <include name="jsr166/test/Sample.java"/>
670
671    </javac>
672
673    <copy todir="${build.testcases.dir}">
674      <fileset dir="${test.src.dir}">
675        <include name="**/*.properties"/>
676      </fileset>
677    </copy>
678
679
680    <java classname="jsr166.test.Sample" fork="true">
681      <classpath refid="test.classpath"/>
682      <!-- <jvmarg value="-ea"/> -->
683      <!-- <jvmarg value="-server"/> -->
684      <!-- <arg value="1000"/> -->
685    </java>
686  </target>
687
688
480    <target name="loops" depends="init, configure-compiler"
481            description="Benchmark from Doug Lea's AQS paper">
482  
# Line 701 | Line 492
492  
493        <compilerarg line="${build.args}"/>
494        <classpath refid="loops.classpath"/>
495 +      <compilerarg value="-XDignore.symbol.file=true"/>
496  
497      </javac>
498  
# Line 711 | Line 503
503    </target>
504  
505  
506 <  <target name="compile-j1" depends="init, configure-compiler, compile">
506 >  <!-- jdk7 -->
507  
716    <mkdir dir="${build.j1.dir}"/>
508  
509 <    <javac srcdir="${j1.src.dir}"
510 <          destdir="${build.j1.dir}"
511 <            debug="${build.debug}"
512 <       debuglevel="${build.debuglevel}"
513 <      deprecation="${build.deprecation}"
514 <           source="${build.sourcelevel}" >
509 >  <target name="jdk7compile"
510 >          depends="configure-compiler"
511 >          description="Compiles src/jdk7 sources">
512 >
513 >    <mkdir dir="${build.jdk7.classes.dir}"/>
514 >
515 >    <javac srcdir="${jdk7src.dir}"
516 >           destdir="${build.jdk7.classes.dir}"
517 >           debug="${build.debug}"
518 >           debuglevel="${build.debuglevel}"
519 >           deprecation="${build.deprecation}"
520 >           source="1.6"
521 >           classpath=""
522 >           bootclasspath="${bootclasspath6}"
523 >           includeAntRuntime="false"
524 >           includeJavaRuntime="false"
525 >           executable="${javac6}"
526 >           fork="true">
527  
528        <include name="**/*.java"/>
726      <exclude name="**/dijkstra/**"/>
727
529        <compilerarg line="${build.args}"/>
530 <      <classpath refid="j1.classpath"/>
530 >      <compilerarg value="-XDignore.symbol.file=true"/>
531 >      <compilerarg value="-Xlint:all"/>
532  
533      </javac>
534  
535    </target>
536  
537  
736  <target name="sw" depends="compile-j1"
737          description="Runs the SwingWorker demo">
738
739    <!--
740    <java classname="jsr166.swing.SwingWorkerDemo" fork="true">
741      <classpath refid="j1.classpath"/>
742    </java>
743    -->
744
745    <copy todir="${build.j1.dir}" file="${j1.src.dir}/jsr166/swing/SwingWorker.html"/>
746
747    <exec dir="${build.j1.dir}" executable="appletviewer.exe">
748      <arg value="${build.j1.dir}/SwingWorker.html"/>
749    </exec>
750
751  </target>
752
753  <target name="j1" depends="compile-j1"
754          description="Runs a standalone JavaOne program">
538  
539 <    <java classname="${j1.test}" fork="true">
540 <      <classpath refid="j1.classpath"/>
541 <      <jvmarg value="-client"/>
759 <
760 <      <!-- TestPseudoRandom args -->
761 <      <arg value="2"/>
762 <      <arg value="25"/>
763 <      <arg value="100000"/>
539 >  <target name="jdk7jar"
540 >          depends="jdk7compile"
541 >          description="Builds library jar from compiled sources">
542  
543 <      <!-- WebCrawler args -->
766 <      <!--
767 <      <arg value="jsr166.webcrawler.WebCrawler3"/>
768 <      <arg value="http://www.priorartisans.com"/>
769 <      <arg value="25"/>
770 <      -->
543 >    <mkdir dir="${build.jdk7.lib.dir}"/>
544  
545 <    </java>
545 >    <jar destfile="${jdk7product.jar}" index="true">
546 >      <fileset dir="${build.jdk7.classes.dir}"/>
547 >    </jar>
548  
549    </target>
550  
551  
777  <target name="test-j1" depends="compile-j1"
778          description="Runs testcases from the JavaOne source directories">
779
780    <junit printsummary="true"
781             showoutput="true"
782          errorProperty="junit.failed"
783        failureProperty="junit.failed"
784                    dir="${build.j1.dir}"
785                   fork="true">
786
787      <!-- <jvmarg value="-server"/> -->
788      <classpath refid="j1.classpath"/>
789      <formatter type="xml"/>
790
791      <batchtest todir="${build.j1.dir}">
792        <fileset dir="${j1.src.dir}">
793          <include name="**/*Test.java"/>
794        </fileset>
795      </batchtest>
552  
553 <    </junit>
553 >  <target name="jdk7docs"
554 >          description="Builds javadocs with custom tags to build folder">
555  
556 <    <available property="junit.report.format"
557 <                  value="frames"
801 <              classname="org.apache.xalan.lib.Redirect"/>
802 <    <property name="junit.report.format" value="noframes"/>
556 >    <delete dir="${build.jdk7.docs.dir}"/>
557 >    <mkdir dir="${build.jdk7.docs.dir}"/>
558  
559 <    <junitreport todir="${build.j1.dir}">
560 <      <fileset dir="${build.j1.dir}">
561 <        <include name="TEST-*.xml"/>
559 >    <javadoc destdir="${build.jdk7.docs.dir}"
560 >             packagenames="none"
561 >             link="${jdkapi7docs.url}"
562 >             overview="${jdk7src.dir}/intro.html"
563 >             sourcepath="${jdk7src.dir}"
564 >             bootclasspath="${bootclasspath6}"
565 >             classpath=""
566 >             source="1.6"
567 >             executable="${javadoc7}"
568 >             additionalparam="-XDignore.symbol.file=true" >
569 >      <fileset dir="${jdk7src.dir}" defaultexcludes="yes">
570 >        <include name="**/*.java"/>
571        </fileset>
572 <      <report styledir="${stylesheet.dir}"
809 <                format="${junit.report.format}"
810 <                 todir="${build.j1.dir}"
811 <      />
812 <    </junitreport>
813 <
814 <    <fail message="Test Cases Failed" if="junit.failed"/>
815 <
816 <  </target>
817 <
818 <
819 <
820 <  <!-- C++ and JNI definitions and demos -->
821 <
822 <  <target name="configure-cpp">
823 <
824 <    <!-- Define tasks and types -->
825 <
826 <    <path id="cpptasks.path">
827 <      <pathelement location="${lib.dir}/cpptasks.jar"/>
828 <    </path>
829 <    <taskdef resource="cpptasks.tasks" classpathref="cpptasks.path"/>
830 <    <typedef resource="cpptasks.types" classpathref="cpptasks.path"/>
831 <
832 <    <!-- Set platform property for JNI includes -->
833 <
834 <    <condition property="platform" value="linux">
835 <      <os name="Linux"/>
836 <    </condition>
837 <    <condition property="platform" value="win32">
838 <      <os family="windows"/>
839 <    </condition>
840 <    <condition property="platform" value="solaris">
841 <      <os name="SunOS"/>
842 <    </condition>
572 >    </javadoc>
573  
574    </target>
575  
576  
577 <  <target name="cppdemo" depends="configure-cpp">
578 <
579 <    <mkdir dir="${build.dir}"/>
850 <
851 <    <cc multithreaded="true"
852 <                 name="g++"
853 <               objdir="${build.dir}"
854 <              outfile="${build.dir}/CppDemo">
855 <      <fileset dir="${test.src.dir}" includes="CppDemo.cpp"/>
856 <      <libset libs="stdc++"/>
857 <    </cc>
858 <
859 <    <exec executable="${build.dir}/CppDemo">
860 <      <arg line="count in word frequency of word in command line count"/>
861 <    </exec>
862 <
863 <  </target>
864 <
577 >  <target name="jdk7dist"
578 >          depends="jdk7dist-clean, jdk7dist-jar, jdk7dist-docs"
579 >          description="Puts all distributable products in single hierarchy"/>
580  
866  <target name="jnidemo" depends="init, configure-compiler, configure-cpp">
581  
868    <mkdir dir="${build.testcases.dir}"/>
582  
583 <    <javac srcdir="${test.src.dir}"
584 <          destdir="${build.testcases.dir}"
872 <            debug="${build.debug}"
873 <       debuglevel="${build.debuglevel}"
874 <      deprecation="${build.deprecation}"
875 <           source="${build.sourcelevel}"
876 <             fork="true">
877 <      <compilerarg value="${bootclasspath.args}"/>
878 <      <compilerarg line="${build.args}"/>
879 <      <classpath refid="test.classpath"/>
880 <      <include name="JniDemo.java"/>
881 <    </javac>
583 >  <target name="jdk7clean"
584 >          description="Removes all build products">
585  
586 <    <javah destdir="${build.testcases.dir}"
884 <      classpathref="test.classpath">
885 <      <class name="JniDemo"/>
886 <    </javah>
887 <
888 <    <cc multithreaded="true"
889 <                 name="g++"
890 <               objdir="${build.dir}"
891 <              outfile="${build.dir}/JniDemo"
892 <              outtype="shared">
893 <
894 <      <compiler>
895 <        <defineset>
896 <          <define name="__int64" value="long long"/>
897 <        </defineset>
898 <        <includepath location="${java.home}/../include"/>
899 <        <includepath location="${java.home}/../include/${platform}"/>
900 <        <compilerarg value="-mno-cygwin"/>
901 <      </compiler>
902 <
903 <      <linker>
904 <        <linkerarg value="--add-stdcall-alias"/>
905 <      </linker>
906 <
907 <      <includepath location="${build.testcases.dir}"/>
908 <
909 <      <fileset dir="${test.src.dir}" includes="JniDemo.cpp"/>
910 <
911 <      <libset libs="stdc++"/>
912 <
913 <    </cc>
914 <
915 <    <!-- Necessary if windows, harmless if not -->
916 <    <copy file="${build.dir}/libJniDemo.so" tofile="${build.dir}/JniDemo.dll"/>
917 <
918 <    <java classname="JniDemo" fork="true">
919 <      <!-- Watch out: path separator hardwired to semicolon here! -->
920 <      <sysproperty key="java.library.path" path="${java.library.path};${build.dir}"/>
921 <      <classpath refid="test.classpath"/>
922 <      <arg line="count in word frequency of word in command line count"/>
923 <    </java>
586 >    <delete dir="${build.jdk7.dir}"/>
587  
588    </target>
589  
590  
591  
592 <  <!-- Backward compatibility, work in progress (some files not checked in) -->
593 <
931 <
932 <
933 <  <property name="pretiger.src.dir"     location="${build.dir}/pretiger/src"/>
934 <  <property name="build.pretiger.dir"   location="${build.dir}/pretiger/classes"/>
935 <  <property name="pretiger.jar"         location="${build.lib.dir}/jsr166-pretiger.jar"/>
936 <  <property name="pretiger.sourcelevel" value="1.4"/>
937 <
938 <  <target name="defang"
939 <       depends="init"
940 <   description="Generates pre-Tiger compatible source">
941 <
942 <    <delete dir="${pretiger.src.dir}"/>
943 <    <mkdir dir="${pretiger.src.dir}"/>
944 <
945 <    <exec executable="perl">
946 <      <arg file="etc/defang.pl"/>
947 <      <!-- <arg value="-v"/> -->
948 <      <arg value="-s"/> <arg file="${src.dir}"/>
949 <      <arg value="-t"/> <arg file="${pretiger.src.dir}"/>
950 <    </exec>
592 >  <target name="jdk7dist-clean"
593 >          description="Removes all build and distribution products">
594  
595    </target>
596  
597 <  <target name="compile-pretiger"
598 <          depends="init, configure-compiler, defang"
956 <          description="Compiles pre-Tiger sources to build folder">
957 <
958 <    <mkdir dir="${build.pretiger.dir}"/>
959 <
960 <    <javac srcdir="${pretiger.src.dir}"
961 <          destdir="${build.pretiger.dir}"
962 <            debug="${build.debug}"
963 <       debuglevel="${build.debuglevel}"
964 <      deprecation="${build.deprecation}"
965 <           source="${pretiger.sourcelevel}"
966 <             fork="true">
597 >  <target name="jdk7dist-docs"
598 >          description="Builds javadocs without custom tags to dist folder">
599  
600 <      <compilerarg line="${build.args}"/>
601 <      <exclude name="**/Thread.java"/>
600 >    <delete dir="${dist.jdk7.docs.dir}"/>
601 >    <mkdir dir="${dist.jdk7.docs.dir}"/>
602  
603 <    </javac>
603 >    <javadoc destdir="${dist.jdk7.docs.dir}"
604 >             packagenames="none"
605 >             link="${jdkapi7docs.url}"
606 >             overview="${jdk7src.dir}/intro.html"
607 >             sourcepath="${jdk7src.dir}"
608 >             classpath=""
609 >             executable="${javadoc7}"
610 >             bootclasspath="${bootclasspath6}"
611 >             source="1.6">
612 >      <arg value="-XDignore.symbol.file=true"/>
613 >      <fileset dir="${jdk7src.dir}" defaultexcludes="yes">
614 >        <include name="**/*.java"/>
615 >      </fileset>
616 >    </javadoc>
617  
618    </target>
619  
620 <  <target name="pretiger" depends="compile-pretiger">
620 >  <target name="jdk7dist-jar"
621 >          depends="jdk7clean, jdk7jar">
622  
623 <    <mkdir dir="${build.lib.dir}"/>
978 <
979 <    <jar destfile="${pretiger.jar}">
980 <      <fileset dir="${build.pretiger.dir}">
981 <      </fileset>
982 <    </jar>
623 >    <copy file="${jdk7product.jar}" todir="${dist.dir}"/>
624  
625    </target>
626  
# Line 1002 | Line 643
643  
644        <include name="**/*.java"/>
645        <compilerarg line="${build.args}"/>
646 +      <compilerarg value="-XDignore.symbol.file=true"/>
647  
648      </javac>
649  
# Line 1030 | Line 672
672      <mkdir dir="${build.jsr166xjavadocs.dir}"/>
673  
674      <javadoc destdir="${build.jsr166xjavadocs.dir}"
675 <             link="http://java.sun.com/javase/6/docs/api/"
676 <
677 <            sourcepath="${jsr166xsrc.dir}:/home/dl/1.5.0/j2se/martin/j2se/src/share/classes"
678 <
679 <    >
1038 <      <packageset dir="${topsrc.dir}" defaultexcludes="yes">
1039 <      <include name="jsr166x"/>
1040 <      </packageset>
1041 <
1042 <
1043 <    </javadoc>
675 >             packagenames="jsr166x"
676 >             link="${jdkapidocs.url}"
677 >             source="${build.sourcelevel}"
678 >             sourcepath="${topsrc.dir}:${jdksrc.dir}"
679 >             additionalparam="-XDignore.symbol.file=true" />
680  
681    </target>
682  
# Line 1075 | Line 711
711      <mkdir dir="${dist.jsr166xjavadocs.dir}"/>
712  
713      <javadoc destdir="${dist.jsr166xjavadocs.dir}"
714 <                link="http://java.sun.com/javase/6/docs/api/"
715 <              source="${build.sourcelevel}">
716 <
717 <      <packageset dir="${topsrc.dir}" defaultexcludes="yes">
718 <      <include name="jsr166x"/>
1083 <      </packageset>
1084 <
1085 <    </javadoc>
714 >             packagenames="jsr166x"
715 >             link="${jdkapidocs.url}"
716 >             source="${build.sourcelevel}"
717 >             sourcepath="${topsrc.dir}:${jdksrc.dir}"
718 >             additionalparam="-XDignore.symbol.file=true" />
719  
720    </target>
721  
# Line 1112 | Line 745
745  
746        <include name="**/*.java"/>
747        <compilerarg line="${build.args}"/>
748 +      <compilerarg value="-XDignore.symbol.file=true"/>
749        <compilerarg value="${bootclasspath.args}"/>
750  
751   <!--       <compilerarg line="-Xlint -Xmaxwarns 1000"/> -->
# Line 1128 | Line 762
762  
763      <mkdir dir="${build.jsr166ylib.dir}"/>
764  
765 <    <jar destfile="${jsr166yproduct.jar}">
765 >    <jar destfile="${jsr166yproduct.jar}" index="true">
766        <fileset dir="${build.jsr166y.dir}"/>
767      </jar>
768  
# Line 1143 | Line 777
777      <mkdir dir="${build.jsr166yjavadocs.dir}"/>
778  
779      <javadoc destdir="${build.jsr166yjavadocs.dir}"
780 <                link="http://java.sun.com/javase/6/docs/api/"
781 <            sourcepath="${jsr166ysrc.dir}:/home/dl/1.5.0/j2se/martin/j2se/src/share/classes"
782 <
783 <    >
784 <      <packageset dir="${topsrc.dir}" defaultexcludes="no">
1151 <      <include name="jsr166y"/>
1152 <      </packageset>
1153 <
1154 <
1155 <    </javadoc>
780 >             packagenames="jsr166y"
781 >             link="${jdkapidocs.url}"
782 >             source="${build.sourcelevel}"
783 >             sourcepath="${topsrc.dir}:${jdksrc.dir}"
784 >             additionalparam="-XDignore.symbol.file=true" />
785  
786    </target>
787  
# Line 1185 | Line 814
814      <mkdir dir="${dist.jsr166yjavadocs.dir}"/>
815  
816      <javadoc destdir="${dist.jsr166yjavadocs.dir}"
817 <                link="http://java.sun.com/javase/6/docs/api/"
818 <              source="${build.sourcelevel}">
819 <      <fileset dir="${topsrc.dir}" defaultexcludes="yes">
820 <      <include name="jsr166y/*.java"/>
821 <      <include name="jsr166y/forkjoin/*.java"/>
1193 <            </fileset>
1194 <    </javadoc>
817 >             packagenames="jsr166y"
818 >             link="${jdkapidocs.url}"
819 >             source="${build.sourcelevel}"
820 >             sourcepath="${topsrc.dir}:${jdksrc.dir}"
821 >             additionalparam="-XDignore.symbol.file=true" />
822  
823    </target>
824  
# Line 1202 | Line 829
829  
830    </target>
831  
832 +
833 +  <!-- extra166y -->
834 +
835 +
836 +  <target name="extra166ycompile"
837 +          depends="init, configure-compiler, jsr166ycompile"
838 +          description="Compiles extra166y sources">
839 +
840 +    <mkdir dir="${build.extra166y.dir}"/>
841 +
842 +    <javac srcdir="${extra166ysrc.dir}"
843 +          destdir="${build.extra166y.dir}"
844 +            debug="${build.debug}"
845 +            classpath="${jsr166yproduct.jar}"
846 +       debuglevel="${build.debuglevel}"
847 +      deprecation="${build.deprecation}"
848 +           source="${build.sourcelevel}"
849 +             fork="true">
850 +
851 +      <include name="**/*.java"/>
852 +      <compilerarg line="${build.args}"/>
853 +      <compilerarg value="-XDignore.symbol.file=true"/>
854 +      <compilerarg value="${bootclasspath.args}"/>
855 +
856 + <!--       <compilerarg line="-Xlint -Xmaxwarns 1000"/> -->
857 +
858 +    </javac>
859 +
860 +  </target>
861 +
862 +
863 +
864 +  <target name="extra166yjar"
865 +          depends="extra166ycompile"
866 +          description="Builds library jar from compiled sources">
867 +
868 +    <mkdir dir="${build.extra166ylib.dir}"/>
869 +
870 +    <jar destfile="${extra166yproduct.jar}" index="true">
871 +      <fileset dir="${build.extra166y.dir}"/>
872 +    </jar>
873 +
874 +  </target>
875 +
876 +
877 +
878 +  <target name="extra166ydocs"
879 +          description="Builds javadocs with custom tags to build folder">
880 +
881 +    <delete dir="${build.extra166yjavadocs.dir}"/>
882 +    <mkdir dir="${build.extra166yjavadocs.dir}"/>
883 +
884 +    <javadoc destdir="${build.extra166yjavadocs.dir}"
885 +             packagenames="extra166y"
886 +             link="${jdkapidocs.url}"
887 +             source="${build.sourcelevel}"
888 +             sourcepath="${topsrc.dir}:${jdksrc.dir}"
889 +             additionalparam="-XDignore.symbol.file=true" />
890 +
891 +  </target>
892 +
893 +
894 +  <target name="extra166ydist"
895 +          depends="extra166ydist-clean, extra166ydist-jar, extra166ydist-docs"
896 +          description="Puts all distributable products in single hierarchy"/>
897 +
898 +
899 +
900 +  <target name="extra166yclean"
901 +          description="Removes all build products">
902 +
903 +    <delete dir="${build.extra166y.dir}"/>
904 +    <delete dir="${build.extra166ylib.dir}"/>
905 +
906 +  </target>
907 +
908 +
909 +
910 +  <target name="extra166ydist-clean"
911 +          description="Removes all build and distribution products">
912 +
913 +  </target>
914 +
915 +  <target name="extra166ydist-docs"
916 +          description="Builds javadocs without custom tags to dist folder">
917 +
918 +    <delete dir="${dist.extra166yjavadocs.dir}"/>
919 +    <mkdir dir="${dist.extra166yjavadocs.dir}"/>
920 +
921 +    <javadoc destdir="${dist.extra166yjavadocs.dir}"
922 +             packagenames="extra166y"
923 +             link="${jdkapidocs.url}"
924 +             source="${build.sourcelevel}"
925 +             sourcepath="${topsrc.dir}:${jdksrc.dir}"
926 +             additionalparam="-XDignore.symbol.file=true" />
927 +
928 +  </target>
929 +
930 +  <target name="extra166ydist-jar"
931 +          depends="extra166yclean, extra166yjar">
932 +
933 +    <copy file="${extra166yproduct.jar}" todir="${dist.dir}"/>
934 +
935 +  </target>
936 +
937 +  <!-- jsr166e -->
938 +
939 +
940 +  <target name="jsr166ecompile"
941 +          depends="init, configure-compiler"
942 +          description="Compiles jsr166e sources">
943 +
944 +    <mkdir dir="${build.jsr166e.dir}"/>
945 +
946 +    <javac srcdir="${jsr166esrc.dir}"
947 +          destdir="${build.jsr166e.dir}"
948 +            debug="${build.debug}"
949 +       debuglevel="${build.debuglevel}"
950 +      deprecation="${build.deprecation}"
951 +           source="1.7"
952 +             fork="true">
953 +
954 +      <include name="**/*.java"/>
955 +      <compilerarg line="${build.args}"/>
956 +      <compilerarg value="-XDignore.symbol.file=true"/>
957 +      <compilerarg value="${bootclasspath.args}"/>
958 +
959 + <!--       <compilerarg line="-Xlint -Xmaxwarns 1000"/> -->
960 +
961 +    </javac>
962 +
963 +  </target>
964 +
965 +
966 +
967 +  <target name="jsr166ejar"
968 +          depends="jsr166ecompile"
969 +          description="Builds library jar from compiled sources">
970 +
971 +    <mkdir dir="${build.jsr166elib.dir}"/>
972 +
973 +    <jar destfile="${jsr166eproduct.jar}" index="true">
974 +      <fileset dir="${build.jsr166e.dir}"/>
975 +    </jar>
976 +
977 +  </target>
978 +
979 +
980 +
981 +  <target name="jsr166edocs"
982 +          description="Builds javadocs with custom tags to build folder">
983 +
984 +    <delete dir="${build.jsr166ejavadocs.dir}"/>
985 +    <mkdir dir="${build.jsr166ejavadocs.dir}"/>
986 +
987 +    <javadoc destdir="${build.jsr166ejavadocs.dir}"
988 +             packagenames="jsr166e,jsr166e.extra"
989 +             link="${jdkapidocs.url}"
990 +             source="1.7"
991 +             sourcepath="${topsrc.dir}:${jdksrc.dir}"
992 +             additionalparam="-XDignore.symbol.file=true" />
993 +
994 +  </target>
995 +
996 +
997 +  <target name="jsr166edist"
998 +          depends="jsr166edist-clean, jsr166edist-jar, jsr166edist-docs"
999 +          description="Puts all distributable products in single hierarchy"/>
1000 +
1001 +
1002 +
1003 +  <target name="jsr166eclean"
1004 +          description="Removes all build products">
1005 +
1006 +    <delete dir="${build.jsr166e.dir}"/>
1007 +    <delete dir="${build.jsr166elib.dir}"/>
1008 +
1009 +  </target>
1010 +
1011 +
1012 +
1013 +  <target name="jsr166edist-clean"
1014 +          description="Removes all build and distribution products">
1015 +
1016 +  </target>
1017 +
1018 +  <target name="jsr166edist-docs"
1019 +          description="Builds javadocs without custom tags to dist folder">
1020 +
1021 +    <delete dir="${dist.jsr166ejavadocs.dir}"/>
1022 +    <mkdir dir="${dist.jsr166ejavadocs.dir}"/>
1023 +
1024 +    <javadoc destdir="${dist.jsr166ejavadocs.dir}"
1025 +             packagenames="jsr166e,jsr166e.extra"
1026 +             link="${jdkapidocs.url}"
1027 +             source="1.7"
1028 +             sourcepath="${topsrc.dir}:${jdksrc.dir}"
1029 +             additionalparam="-XDignore.symbol.file=true" />
1030 +
1031 +  </target>
1032 +
1033 +  <target name="jsr166edist-jar"
1034 +          depends="jsr166eclean, jsr166ejar">
1035 +
1036 +    <copy file="${jsr166eproduct.jar}" todir="${dist.dir}"/>
1037 +
1038 +  </target>
1039 +
1040   </project>

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines