[cvs] / jsr166 / build.xml Repository:
ViewVC logotype

Diff of /jsr166/build.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.197, Fri Mar 4 21:00:45 2016 UTC revision 1.201, Sat Mar 26 12:35:25 2016 UTC
# Line 27  Line 27 
27    (e.g. mercurial forest) or a symlink to same.    (e.g. mercurial forest) or a symlink to same.
28    
29    Alternatively, define ant variables thus:    Alternatively, define ant variables thus:
30    ant -Djdk$N.home=...    ant -Djdk$N.home=... -Djdk$N.src.home=...
31    for $N in 6 7 8 9 ...    for $N in 6 7 8 9 ...
32    
33    As of 2015-09, there is incomplete hacky support for jigsaw    As of 2015-09, there is incomplete hacky support for jigsaw
34    Build for jigsaw using something like:    Build for jigsaw using something like:
35    ant -Djdk9.home="$HOME/jdk/jigsaw" -Djdk9.src.dir="$HOME/jdk/src/jigsaw" clean test dist    ant -Djdk9.home="$HOME/jdk/jigsaw" -Djdk9.src.home="$HOME/jdk/src/jigsaw" clean test dist
36    "docs" target is still broken.    "docs" target is still broken.
37  ------------------------------------------------------------------------------  ------------------------------------------------------------------------------
38    </description>    </description>
# Line 69  Line 69 
69    <property name="build.4jdk7.tck.classes.dir" location="${build.4jdk7.dir}/tck-classes"/>    <property name="build.4jdk7.tck.classes.dir" location="${build.4jdk7.dir}/tck-classes"/>
70    <property name="build.4jdk7.docs.dir"        location="${build.4jdk7.dir}/docs"/>    <property name="build.4jdk7.docs.dir"        location="${build.4jdk7.dir}/docs"/>
71    
72      <property name="build.4jdk8.dir"             location="${build.dir}/jsr166-4jdk8"/>
73      <property name="build.4jdk8.classes.dir"     location="${build.4jdk8.dir}/classes"/>
74      <property name="build.4jdk8.tck.classes.dir" location="${build.4jdk8.dir}/tck-classes"/>
75      <property name="build.4jdk8.docs.dir"        location="${build.4jdk8.dir}/docs"/>
76    
77    <property name="build.jsr166x.dir"           location="${build.dir}/jsr166x"/>    <property name="build.jsr166x.dir"           location="${build.dir}/jsr166x"/>
78    <property name="build.jsr166y.dir"           location="${build.dir}/jsr166y"/>    <property name="build.jsr166y.dir"           location="${build.dir}/jsr166y"/>
79    <property name="build.jsr166e.dir"           location="${build.dir}/jsr166e"/>    <property name="build.jsr166e.dir"           location="${build.dir}/jsr166e"/>
# Line 89  Line 94 
94      <property name="java@{v}"       location="${jdk@{v}.home}/bin/java"/>      <property name="java@{v}"       location="${jdk@{v}.home}/bin/java"/>
95      <property name="javac@{v}"      location="${jdk@{v}.home}/bin/javac"/>      <property name="javac@{v}"      location="${jdk@{v}.home}/bin/javac"/>
96      <property name="javadoc@{v}"    location="${jdk@{v}.home}/bin/javadoc"/>      <property name="javadoc@{v}"    location="${jdk@{v}.home}/bin/javadoc"/>
97        <property name="jdk@{v}.src.home" location="${jdks.home}/src/jdk@{v}"/>
98      <local name="have.java.base"/>      <local name="have.java.base"/>
99      <available property="have.java.base"      <available property="have.java.base"
100        file="${jdks.home}/src/jdk@{v}/jdk/src/java.base/share/classes" type="dir"/>        file="${jdk@{v}.src.home}/jdk/src/java.base/share/classes" type="dir"/>
101      <property name="jdk@{v}src.dir" location="${jdks.home}/src/jdk@{v}/jdk/src/java.base/share/classes"      <property name="jdk@{v}.src.dir" location="${jdk@{v}.src.home}/jdk/src/java.base/share/classes"
102        if:set="have.java.base"/>        if:set="have.java.base"/>
103      <property name="jdk@{v}src.dir" location="${jdks.home}/src/jdk@{v}/jdk/src/share/classes"      <property name="jdk@{v}.src.dir" location="${jdk@{v}.src.home}/jdk/src/share/classes"
104        unless:set="have.java.base"/>        unless:set="have.java.base"/>
105      <local name="modules"/>      <local name="modules"/>
106      <available property="modules" file="${jdk@{v}.home}/jmods" type="dir"/>      <available property="modules" file="${jdk@{v}.home}/jmods" type="dir"/>
# Line 134  Line 140 
140    <property name="loops.src.dir"        location="${basedir}/src/loops"/>    <property name="loops.src.dir"        location="${basedir}/src/loops"/>
141    <property name="tck.src.dir"          location="${test.src.dir}/tck"/>    <property name="tck.src.dir"          location="${test.src.dir}/tck"/>
142    <property name="jtreg7.src.dir"       location="${test.src.dir}/jtreg-jdk7"/>    <property name="jtreg7.src.dir"       location="${test.src.dir}/jtreg-jdk7"/>
143    <property name="jtreg8.src.dir"       location="${test.src.dir}/jtreg"/>    <property name="jtreg8.src.dir"       location="${test.src.dir}/jtreg-jdk8"/>
144    <property name="jtreg9.src.dir"       location="${test.src.dir}/jtreg"/>    <property name="jtreg9.src.dir"       location="${test.src.dir}/jtreg"/>
145    <property name="jtreg.src.dir"        location="${jtreg9.src.dir}"/>    <property name="jtreg.src.dir"        location="${jtreg9.src.dir}"/>
146    <property name="lib.dir"              location="${basedir}/lib"/>    <property name="lib.dir"              location="${basedir}/lib"/>
147    <property name="dist.dir"             location="${basedir}/dist"/>    <property name="dist.dir"             location="${basedir}/dist"/>
148    <property name="topsrc.dir"           location="${basedir}/src"/>    <property name="topsrc.dir"           location="${basedir}/src"/>
149    <property name="4jdk7src.dir"         location="${topsrc.dir}/jdk7"/>    <property name="4jdk7src.dir"         location="${topsrc.dir}/jdk7"/>
150      <property name="4jdk8src.dir"         location="${topsrc.dir}/jdk8"/>
151    <property name="jsr166xsrc.dir"       location="${topsrc.dir}/jsr166x"/>    <property name="jsr166xsrc.dir"       location="${topsrc.dir}/jsr166x"/>
152    <property name="jsr166ysrc.dir"       location="${topsrc.dir}/jsr166y"/>    <property name="jsr166ysrc.dir"       location="${topsrc.dir}/jsr166y"/>
153    <property name="jsr166esrc.dir"       location="${topsrc.dir}/jsr166e"/>    <property name="jsr166esrc.dir"       location="${topsrc.dir}/jsr166e"/>
# Line 149  Line 156 
156    <!-- Javadoc locations -->    <!-- Javadoc locations -->
157    <property name="docs.dir"          location="${build.dir}/docs"/>    <property name="docs.dir"          location="${build.dir}/docs"/>
158    <property name="4jdk7docs.dir"     location="${build.4jdk7.dir}/docs"/>    <property name="4jdk7docs.dir"     location="${build.4jdk7.dir}/docs"/>
159      <property name="4jdk8docs.dir"     location="${build.4jdk8.dir}/docs"/>
160    <property name="jsr166xdocs.dir"   location="${build.jsr166x.dir}/docs"/>    <property name="jsr166xdocs.dir"   location="${build.jsr166x.dir}/docs"/>
161    <property name="jsr166ydocs.dir"   location="${build.jsr166y.dir}/docs"/>    <property name="jsr166ydocs.dir"   location="${build.jsr166y.dir}/docs"/>
162    <property name="jsr166edocs.dir"   location="${build.jsr166e.dir}/docs"/>    <property name="jsr166edocs.dir"   location="${build.jsr166e.dir}/docs"/>
# Line 156  Line 164 
164    
165    <property name="dist.docs.dir"          location="${dist.dir}/docs"/>    <property name="dist.docs.dir"          location="${dist.dir}/docs"/>
166    <property name="dist.4jdk7docs.dir"     location="${dist.dir}/jsr166-4jdk7docs"/>    <property name="dist.4jdk7docs.dir"     location="${dist.dir}/jsr166-4jdk7docs"/>
167      <property name="dist.4jdk8docs.dir"     location="${dist.dir}/jsr166-4jdk8docs"/>
168    <property name="dist.jsr166xdocs.dir"   location="${dist.dir}/jsr166xdocs"/>    <property name="dist.jsr166xdocs.dir"   location="${dist.dir}/jsr166xdocs"/>
169    <property name="dist.jsr166ydocs.dir"   location="${dist.dir}/jsr166ydocs"/>    <property name="dist.jsr166ydocs.dir"   location="${dist.dir}/jsr166ydocs"/>
170    <property name="dist.jsr166edocs.dir"   location="${dist.dir}/jsr166edocs"/>    <property name="dist.jsr166edocs.dir"   location="${dist.dir}/jsr166edocs"/>
# Line 164  Line 173 
173    <!-- Jar locations -->    <!-- Jar locations -->
174    <property name="product.jar"      location="${build.dir}/jsr166.jar"/>    <property name="product.jar"      location="${build.dir}/jsr166.jar"/>
175    <property name="4jdk7product.jar" location="${build.4jdk7.dir}/jsr166-4jdk7.jar"/>    <property name="4jdk7product.jar" location="${build.4jdk7.dir}/jsr166-4jdk7.jar"/>
176      <property name="4jdk8product.jar" location="${build.4jdk8.dir}/jsr166-4jdk8.jar"/>
177    <property name="jsr166x.jar"      location="${build.jsr166x.dir}/jsr166x.jar"/>    <property name="jsr166x.jar"      location="${build.jsr166x.dir}/jsr166x.jar"/>
178    <property name="jsr166y.jar"      location="${build.jsr166y.dir}/jsr166y.jar"/>    <property name="jsr166y.jar"      location="${build.jsr166y.dir}/jsr166y.jar"/>
179    <property name="jsr166e.jar"      location="${build.jsr166e.dir}/jsr166e.jar"/>    <property name="jsr166e.jar"      location="${build.jsr166e.dir}/jsr166e.jar"/>
# Line 175  Line 185 
185    <property name="java6.docroot.url"      value="http://docs.oracle.com/javase/6/docs"/>    <property name="java6.docroot.url"      value="http://docs.oracle.com/javase/6/docs"/>
186    <property name="java7.docroot.url"      value="http://docs.oracle.com/javase/7/docs"/>    <property name="java7.docroot.url"      value="http://docs.oracle.com/javase/7/docs"/>
187    <property name="java8.docroot.url"      value="http://docs.oracle.com/javase/8/docs"/>    <property name="java8.docroot.url"      value="http://docs.oracle.com/javase/8/docs"/>
188    <!-- The expected canonical location does not yet exist as of 2015-11 -->    <!-- The expected canonical location does not yet exist as of 2016-03 -->
189    <!-- <property name="java9.docroot.url" value="http://docs.oracle.com/javase/9/docs"/> -->    <!-- <property name="java9.docroot.url" value="http://docs.oracle.com/javase/9/docs"/> -->
190    <property name="java9.docroot.url"      value="http://download.java.net/jdk9/docs"/>    <property name="java9.docroot.url"      value="http://download.java.net/jdk9/docs"/>
191    <!-- Default jdk doc location (latest stable release seems best) -->    <!-- Default jdk doc location (latest stable release seems best) -->
# Line 209  Line 219 
219      <attribute name="compile-target" default="@{target}"/>      <attribute name="compile-target" default="@{target}"/>
220      <attribute name="workdir"/>      <attribute name="workdir"/>
221      <attribute name="classes"/>      <attribute name="classes"/>
222        <!--
223            <attribute name="jvmflags" default="-XX:+UseParallelGC -XX:-UseBiasedLocking -ea -esa -Djsr166.testImplementationDetails=true"/>
224        -->
225      <attribute name="jvmflags" default="-ea -esa -Djsr166.testImplementationDetails=true"/>      <attribute name="jvmflags" default="-ea -esa -Djsr166.testImplementationDetails=true"/>
226      <element name="javac-elements" optional="true"/>      <element name="javac-elements" optional="true"/>
227    
# Line 350  Line 363 
363    <property name="build.main.javac" value="${javac9}"/>    <property name="build.main.javac" value="${javac9}"/>
364    
365    <target name="dists"    <target name="dists"
366            depends="dist, 4jdk7dist, jsr166edist, jsr166ydist, extra166ydist, jsr166xdist"            depends="dist, 4jdk8dist, 4jdk7dist, jsr166edist, jsr166ydist, extra166ydist, jsr166xdist"
367            description="Builds all public jars and docs"/>            description="Builds all public jars and docs"/>
368    
369    <target name="compile"    <target name="compile"
# Line 395  Line 408 
408      </javac>      </javac>
409    
410      <!-- We need jdk9's Contended annotation, but at compile time only -->      <!-- We need jdk9's Contended annotation, but at compile time only -->
411        <!--
412      <delete file="${destdir}/jdk/internal/vm/annotation/Contended.class"/>      <delete file="${destdir}/jdk/internal/vm/annotation/Contended.class"/>
413        -->
414    </target>    </target>
415    
416    
# Line 427  Line 442 
442               link="${java9.api.url}"               link="${java9.api.url}"
443               overview="${src.dir}/intro.html"               overview="${src.dir}/intro.html"
444               access="${build.javadoc.access}"               access="${build.javadoc.access}"
445               sourcepath="${src.dir}:${jdk9src.dir}"               sourcepath="${src.dir}:${jdk9.src.dir}"
446               classpath=""               classpath=""
447               executable="${javadoc9}">               executable="${javadoc9}">
448        <fileset dir="${src.dir}" defaultexcludes="yes">        <fileset dir="${src.dir}" defaultexcludes="yes">
# Line 445  Line 460 
460        <arg value="implSpec:a:&lt;em&gt;Implementation Requirements:&lt;/em&gt;"/>        <arg value="implSpec:a:&lt;em&gt;Implementation Requirements:&lt;/em&gt;"/>
461        <arg value="-tag"/>        <arg value="-tag"/>
462        <arg value="implNote:a:&lt;em&gt;Implementation Note:&lt;/em&gt;"/>        <arg value="implNote:a:&lt;em&gt;Implementation Note:&lt;/em&gt;"/>
463    <!-- tags added in jdk9 -->
464          <arg value="-tag"/>
465          <arg value="revised:X"/>
466          <arg value="-tag"/>
467          <arg value="spec:X"/>
468      </javadoc>      </javadoc>
469    </target>    </target>
470    
# Line 648  Line 668 
668    </target>    </target>
669    
670    
671      <!-- jsr166 4jdk8 -->
672    
673      <target name="4jdk8compile"
674              depends="configure-compiler"
675              description="Compiles src/jdk8 sources, targeting jdk8">
676    
677        <mkdir dir="${build.4jdk8.classes.dir}"/>
678    
679        <javac srcdir="${4jdk8src.dir}"
680               destdir="${build.4jdk8.classes.dir}"
681               debug="${build.debug}"
682               debuglevel="${build.debuglevel}"
683               deprecation="${build.deprecation}"
684               source="8"
685               target="8"
686               classpath=""
687               bootclasspath="${bootclasspath8}"
688               includeAntRuntime="false"
689               includeJavaRuntime="false"
690               executable="${javac8}"
691               fork="true">
692    
693          <include name="**/*.java"/>
694          <compilerarg value="-Xprefer:source"/>
695          <compilerarg value="-XDignore.symbol.file=true"/>
696          <compilerarg value="-Xlint:all"/>
697          <compilerarg value="-Werror"/>
698          <compilerarg line="${build.args}"/>
699    
700        </javac>
701      </target>
702    
703      <target name="4jdk8doclint"
704              depends="configure-compiler"
705              description="Finds doclint warnings">
706    
707        <mkdir dir="${build.4jdk8.classes.dir}"/>
708    
709        <javac srcdir="${4jdk8src.dir}"
710               destdir="${build.4jdk8.classes.dir}"
711               debug="${build.debug}"
712               debuglevel="${build.debuglevel}"
713               deprecation="${build.deprecation}"
714               source="8"
715               target="8"
716               classpath=""
717               bootclasspath="${bootclasspath8}"
718               includeAntRuntime="false"
719               includeJavaRuntime="false"
720               executable="${javac8}"
721               fork="true">
722    
723          <include name="**/*.java"/>
724          <compilerarg value="-Xprefer:source"/>
725          <compilerarg value="-XDignore.symbol.file=true"/>
726          <compilerarg value="-Xlint:all"/>
727          <compilerarg value="-Xdoclint:all/protected"/>
728          <compilerarg line="${build.args}"/>
729    
730        </javac>
731      </target>
732    
733    
734      <target name="4jdk8jar"
735              depends="4jdk8compile"
736              description="Builds library jar from compiled sources">
737    
738        <jar destfile="${4jdk8product.jar}">
739          <fileset dir="${build.4jdk8.classes.dir}"/>
740          <manifest>
741            <attribute name="Built-By" value="${user.name}"/>
742            <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
743          </manifest>
744        </jar>
745    
746      </target>
747    
748    
749      <target name="4jdk8-tck"
750              depends="4jdk8jar"
751              description="Runs tck tests for jsr166-4jdk8 directly">
752    
753        <run-tck-tests
754          target="8"
755          workdir="${build.4jdk8.dir}"
756          classes="${4jdk8product.jar}">
757          <javac-elements>
758            <!-- JDK9+ test classes -->
759            <exclude name="*9Test.java"/>
760            <exclude name="*10Test.java"/>
761          </javac-elements>
762        </run-tck-tests>
763      </target>
764    
765    
766      <target name="4jdk8-jtreg"
767              depends="4jdk8jar"
768              description="Runs jtreg tests for jsr166-4jdk8 using the jtreg ant task">
769        <run-jtreg-tests
770           target="8"
771           workdir="${build.4jdk8.dir}"
772           classes="${4jdk8product.jar}"/>
773      </target>
774    
775    
776      <target name="4jdk8-test"
777              depends="4jdk8-tck, 4jdk8-jtreg"
778              description="Runs tck and jtreg tests for jsr166-4jdk8">
779      </target>
780    
781    
782      <target name="4jdk8docs"
783              description="Builds javadocs for src/jdk8 to dist dir">
784    
785        <delete dir="${4jdk8docs.dir}"/>
786        <mkdir dir="${4jdk8docs.dir}"/>
787    
788        <javadoc destdir="${4jdk8docs.dir}"
789                 packagenames="none"
790                 link="${java8.api.url}"
791                 overview="${4jdk8src.dir}/intro.html"
792                 access="${build.javadoc.access}"
793                 sourcepath="${4jdk8src.dir}:${jdk8.src.dir}"
794                 classpath=""
795                 executable="${javadoc8}">
796          <fileset dir="${4jdk8src.dir}" defaultexcludes="yes">
797            <include name="**/*.java"/>
798          </fileset>
799          <arg line="-Xdocrootparent ${java8.docroot.url}"/>
800          <arg value="-XDignore.symbol.file=true"/>
801          <arg value="-tag"/>
802          <arg value="${javadoc.jls.option}"/>
803          <arg value="-tag"/>
804          <arg value="apiNote:a:&lt;em&gt;API Note:&lt;/em&gt;"/>
805          <arg value="-tag"/>
806          <arg value="implSpec:a:&lt;em&gt;Implementation Requirements:&lt;/em&gt;"/>
807          <arg value="-tag"/>
808          <arg value="implNote:a:&lt;em&gt;Implementation Note:&lt;/em&gt;"/>
809        </javadoc>
810      </target>
811    
812    
813      <target name="4jdk8dist"
814              depends="4jdk8dist-jar, 4jdk8dist-docs"
815              description="Puts all distributable products in single hierarchy"/>
816    
817    
818      <target name="4jdk8clean"
819              description="Removes all 4jdk8 build products">
820    
821        <delete dir="${build.4jdk8.dir}"/>
822    
823      </target>
824    
825    
826      <target name="4jdk8dist-jar"
827              depends="4jdk8clean, 4jdk8jar">
828        <copy file="${4jdk8product.jar}" todir="${dist.dir}"/>
829      </target>
830    
831    
832      <target name="4jdk8dist-docs"
833              depends="4jdk8clean, 4jdk8docs">
834        <mirror-dir src="${4jdk8docs.dir}" dst="${dist.4jdk8docs.dir}"/>
835      </target>
836    
837    
838    
839    <!-- jsr166 4jdk7 -->    <!-- jsr166 4jdk7 -->
840    
841    <target name="4jdk7compile"    <target name="4jdk7compile"
# Line 807  Line 995 
995               link="${java7.api.url}"               link="${java7.api.url}"
996               overview="${4jdk7src.dir}/intro.html"               overview="${4jdk7src.dir}/intro.html"
997               access="${build.javadoc.access}"               access="${build.javadoc.access}"
998               sourcepath="${4jdk7src.dir}:${jdk7src.dir}"               sourcepath="${4jdk7src.dir}:${jdk7.src.dir}"
999               classpath=""               classpath=""
1000               executable="${javadoc7}">               executable="${javadoc7}">
1001        <fileset dir="${4jdk7src.dir}" defaultexcludes="yes">        <fileset dir="${4jdk7src.dir}" defaultexcludes="yes">
# Line 901  Line 1089 
1089               packagenames="jsr166x.*"               packagenames="jsr166x.*"
1090               link="${java.api.url}"               link="${java.api.url}"
1091               access="${build.javadoc.access}"               access="${build.javadoc.access}"
1092               sourcepath="${topsrc.dir}:${jdk6src.dir}"               sourcepath="${topsrc.dir}:${jdk6.src.dir}"
1093               bootclasspath="${bootclasspath6}"               bootclasspath="${bootclasspath6}"
1094               source="5"               source="5"
1095               executable="${javadoc7}">               executable="${javadoc7}">
# Line 993  Line 1181 
1181               packagenames="jsr166y.*"               packagenames="jsr166y.*"
1182               link="${java.api.url}"               link="${java.api.url}"
1183               access="${build.javadoc.access}"               access="${build.javadoc.access}"
1184               sourcepath="${topsrc.dir}:${jdk6src.dir}"               sourcepath="${topsrc.dir}:${jdk6.src.dir}"
1185               bootclasspath="${bootclasspath6}"               bootclasspath="${bootclasspath6}"
1186               source="6"               source="6"
1187               executable="${javadoc7}">               executable="${javadoc7}">
# Line 1086  Line 1274 
1274               packagenames="extra166y.*"               packagenames="extra166y.*"
1275               link="${java.api.url}"               link="${java.api.url}"
1276               access="${build.javadoc.access}"               access="${build.javadoc.access}"
1277               sourcepath="${topsrc.dir}:${jdk6src.dir}"               sourcepath="${topsrc.dir}:${jdk6.src.dir}"
1278               bootclasspath="${bootclasspath6}"               bootclasspath="${bootclasspath6}"
1279               source="6"               source="6"
1280               executable="${javadoc7}">               executable="${javadoc7}">
# Line 1207  Line 1395 
1395               packagenames="jsr166e.*"               packagenames="jsr166e.*"
1396               link="${java.api.url}"               link="${java.api.url}"
1397               access="${build.javadoc.access}"               access="${build.javadoc.access}"
1398               sourcepath="${topsrc.dir}:${jdk6src.dir}"               sourcepath="${topsrc.dir}:${jdk6.src.dir}"
1399               source="${build.jsr166e.java.version}"               source="${build.jsr166e.java.version}"
1400               executable="${javadoc7}">               executable="${javadoc7}">
1401        <arg line="-Xdocrootparent ${java.docroot.url}"/>        <arg line="-Xdocrootparent ${java.docroot.url}"/>

Legend:
Removed from v.1.197  
changed lines
  Added in v.1.201

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8