[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.200, Sat Mar 26 06:22:49 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 350  Line 360 
360    <property name="build.main.javac" value="${javac9}"/>    <property name="build.main.javac" value="${javac9}"/>
361    
362    <target name="dists"    <target name="dists"
363            depends="dist, 4jdk7dist, jsr166edist, jsr166ydist, extra166ydist, jsr166xdist"            depends="dist, 4jdk8dist, 4jdk7dist, jsr166edist, jsr166ydist, extra166ydist, jsr166xdist"
364            description="Builds all public jars and docs"/>            description="Builds all public jars and docs"/>
365    
366    <target name="compile"    <target name="compile"
# Line 427  Line 437 
437               link="${java9.api.url}"               link="${java9.api.url}"
438               overview="${src.dir}/intro.html"               overview="${src.dir}/intro.html"
439               access="${build.javadoc.access}"               access="${build.javadoc.access}"
440               sourcepath="${src.dir}:${jdk9src.dir}"               sourcepath="${src.dir}:${jdk9.src.dir}"
441               classpath=""               classpath=""
442               executable="${javadoc9}">               executable="${javadoc9}">
443        <fileset dir="${src.dir}" defaultexcludes="yes">        <fileset dir="${src.dir}" defaultexcludes="yes">
# Line 445  Line 455 
455        <arg value="implSpec:a:&lt;em&gt;Implementation Requirements:&lt;/em&gt;"/>        <arg value="implSpec:a:&lt;em&gt;Implementation Requirements:&lt;/em&gt;"/>
456        <arg value="-tag"/>        <arg value="-tag"/>
457        <arg value="implNote:a:&lt;em&gt;Implementation Note:&lt;/em&gt;"/>        <arg value="implNote:a:&lt;em&gt;Implementation Note:&lt;/em&gt;"/>
458    <!-- tags added in jdk9 -->
459          <arg value="-tag"/>
460          <arg value="revised:X"/>
461          <arg value="-tag"/>
462          <arg value="spec:X"/>
463      </javadoc>      </javadoc>
464    </target>    </target>
465    
# Line 648  Line 663 
663    </target>    </target>
664    
665    
666      <!-- jsr166 4jdk8 -->
667    
668      <target name="4jdk8compile"
669              depends="configure-compiler"
670              description="Compiles src/jdk8 sources, targeting jdk8">
671    
672        <mkdir dir="${build.4jdk8.classes.dir}"/>
673    
674        <javac srcdir="${4jdk8src.dir}"
675               destdir="${build.4jdk8.classes.dir}"
676               debug="${build.debug}"
677               debuglevel="${build.debuglevel}"
678               deprecation="${build.deprecation}"
679               source="8"
680               target="8"
681               classpath=""
682               bootclasspath="${bootclasspath8}"
683               includeAntRuntime="false"
684               includeJavaRuntime="false"
685               executable="${javac8}"
686               fork="true">
687    
688          <include name="**/*.java"/>
689          <compilerarg value="-Xprefer:source"/>
690          <compilerarg value="-XDignore.symbol.file=true"/>
691          <compilerarg value="-Xlint:all"/>
692          <compilerarg value="-Werror"/>
693          <compilerarg line="${build.args}"/>
694    
695        </javac>
696      </target>
697    
698      <target name="4jdk8doclint"
699              depends="configure-compiler"
700              description="Finds doclint warnings">
701    
702        <mkdir dir="${build.4jdk8.classes.dir}"/>
703    
704        <javac srcdir="${4jdk8src.dir}"
705               destdir="${build.4jdk8.classes.dir}"
706               debug="${build.debug}"
707               debuglevel="${build.debuglevel}"
708               deprecation="${build.deprecation}"
709               source="8"
710               target="8"
711               classpath=""
712               bootclasspath="${bootclasspath8}"
713               includeAntRuntime="false"
714               includeJavaRuntime="false"
715               executable="${javac8}"
716               fork="true">
717    
718          <include name="**/*.java"/>
719          <compilerarg value="-Xprefer:source"/>
720          <compilerarg value="-XDignore.symbol.file=true"/>
721          <compilerarg value="-Xlint:all"/>
722          <compilerarg value="-Xdoclint:all/protected"/>
723          <compilerarg line="${build.args}"/>
724    
725        </javac>
726      </target>
727    
728    
729      <target name="4jdk8jar"
730              depends="4jdk8compile"
731              description="Builds library jar from compiled sources">
732    
733        <jar destfile="${4jdk8product.jar}">
734          <fileset dir="${build.4jdk8.classes.dir}"/>
735          <manifest>
736            <attribute name="Built-By" value="${user.name}"/>
737            <attribute name="Implementation-Vendor" value="JCP JSR-166 Expert Group."/>
738          </manifest>
739        </jar>
740    
741      </target>
742    
743    
744      <target name="4jdk8-tck"
745              depends="4jdk8jar"
746              description="Runs tck tests for jsr166-4jdk8 directly">
747    
748        <run-tck-tests
749          target="8"
750          workdir="${build.4jdk8.dir}"
751          classes="${4jdk8product.jar}">
752          <javac-elements>
753            <!-- JDK9+ test classes -->
754            <exclude name="*9Test.java"/>
755            <exclude name="*10Test.java"/>
756          </javac-elements>
757        </run-tck-tests>
758      </target>
759    
760    
761      <target name="4jdk8-jtreg"
762              depends="4jdk8jar"
763              description="Runs jtreg tests for jsr166-4jdk8 using the jtreg ant task">
764        <run-jtreg-tests
765           target="8"
766           workdir="${build.4jdk8.dir}"
767           classes="${4jdk8product.jar}"/>
768      </target>
769    
770    
771      <target name="4jdk8-test"
772              depends="4jdk8-tck, 4jdk8-jtreg"
773              description="Runs tck and jtreg tests for jsr166-4jdk8">
774      </target>
775    
776    
777      <target name="4jdk8docs"
778              description="Builds javadocs for src/jdk8 to dist dir">
779    
780        <delete dir="${4jdk8docs.dir}"/>
781        <mkdir dir="${4jdk8docs.dir}"/>
782    
783        <javadoc destdir="${4jdk8docs.dir}"
784                 packagenames="none"
785                 link="${java8.api.url}"
786                 overview="${4jdk8src.dir}/intro.html"
787                 access="${build.javadoc.access}"
788                 sourcepath="${4jdk8src.dir}:${jdk8.src.dir}"
789                 classpath=""
790                 executable="${javadoc8}">
791          <fileset dir="${4jdk8src.dir}" defaultexcludes="yes">
792            <include name="**/*.java"/>
793          </fileset>
794          <arg line="-Xdocrootparent ${java8.docroot.url}"/>
795          <arg value="-XDignore.symbol.file=true"/>
796          <arg value="-tag"/>
797          <arg value="${javadoc.jls.option}"/>
798          <arg value="-tag"/>
799          <arg value="apiNote:a:&lt;em&gt;API Note:&lt;/em&gt;"/>
800          <arg value="-tag"/>
801          <arg value="implSpec:a:&lt;em&gt;Implementation Requirements:&lt;/em&gt;"/>
802          <arg value="-tag"/>
803          <arg value="implNote:a:&lt;em&gt;Implementation Note:&lt;/em&gt;"/>
804        </javadoc>
805      </target>
806    
807    
808      <target name="4jdk8dist"
809              depends="4jdk8dist-jar, 4jdk8dist-docs"
810              description="Puts all distributable products in single hierarchy"/>
811    
812    
813      <target name="4jdk8clean"
814              description="Removes all 4jdk8 build products">
815    
816        <delete dir="${build.4jdk8.dir}"/>
817    
818      </target>
819    
820    
821      <target name="4jdk8dist-jar"
822              depends="4jdk8clean, 4jdk8jar">
823        <copy file="${4jdk8product.jar}" todir="${dist.dir}"/>
824      </target>
825    
826    
827      <target name="4jdk8dist-docs"
828              depends="4jdk8clean, 4jdk8docs">
829        <mirror-dir src="${4jdk8docs.dir}" dst="${dist.4jdk8docs.dir}"/>
830      </target>
831    
832    
833    
834    <!-- jsr166 4jdk7 -->    <!-- jsr166 4jdk7 -->
835    
836    <target name="4jdk7compile"    <target name="4jdk7compile"
# Line 807  Line 990 
990               link="${java7.api.url}"               link="${java7.api.url}"
991               overview="${4jdk7src.dir}/intro.html"               overview="${4jdk7src.dir}/intro.html"
992               access="${build.javadoc.access}"               access="${build.javadoc.access}"
993               sourcepath="${4jdk7src.dir}:${jdk7src.dir}"               sourcepath="${4jdk7src.dir}:${jdk7.src.dir}"
994               classpath=""               classpath=""
995               executable="${javadoc7}">               executable="${javadoc7}">
996        <fileset dir="${4jdk7src.dir}" defaultexcludes="yes">        <fileset dir="${4jdk7src.dir}" defaultexcludes="yes">
# Line 901  Line 1084 
1084               packagenames="jsr166x.*"               packagenames="jsr166x.*"
1085               link="${java.api.url}"               link="${java.api.url}"
1086               access="${build.javadoc.access}"               access="${build.javadoc.access}"
1087               sourcepath="${topsrc.dir}:${jdk6src.dir}"               sourcepath="${topsrc.dir}:${jdk6.src.dir}"
1088               bootclasspath="${bootclasspath6}"               bootclasspath="${bootclasspath6}"
1089               source="5"               source="5"
1090               executable="${javadoc7}">               executable="${javadoc7}">
# Line 993  Line 1176 
1176               packagenames="jsr166y.*"               packagenames="jsr166y.*"
1177               link="${java.api.url}"               link="${java.api.url}"
1178               access="${build.javadoc.access}"               access="${build.javadoc.access}"
1179               sourcepath="${topsrc.dir}:${jdk6src.dir}"               sourcepath="${topsrc.dir}:${jdk6.src.dir}"
1180               bootclasspath="${bootclasspath6}"               bootclasspath="${bootclasspath6}"
1181               source="6"               source="6"
1182               executable="${javadoc7}">               executable="${javadoc7}">
# Line 1086  Line 1269 
1269               packagenames="extra166y.*"               packagenames="extra166y.*"
1270               link="${java.api.url}"               link="${java.api.url}"
1271               access="${build.javadoc.access}"               access="${build.javadoc.access}"
1272               sourcepath="${topsrc.dir}:${jdk6src.dir}"               sourcepath="${topsrc.dir}:${jdk6.src.dir}"
1273               bootclasspath="${bootclasspath6}"               bootclasspath="${bootclasspath6}"
1274               source="6"               source="6"
1275               executable="${javadoc7}">               executable="${javadoc7}">
# Line 1207  Line 1390 
1390               packagenames="jsr166e.*"               packagenames="jsr166e.*"
1391               link="${java.api.url}"               link="${java.api.url}"
1392               access="${build.javadoc.access}"               access="${build.javadoc.access}"
1393               sourcepath="${topsrc.dir}:${jdk6src.dir}"               sourcepath="${topsrc.dir}:${jdk6.src.dir}"
1394               source="${build.jsr166e.java.version}"               source="${build.jsr166e.java.version}"
1395               executable="${javadoc7}">               executable="${javadoc7}">
1396        <arg line="-Xdocrootparent ${java.docroot.url}"/>        <arg line="-Xdocrootparent ${java.docroot.url}"/>

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

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8