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.118 by jsr166, Mon Jan 21 01:05:01 2013 UTC vs.
Revision 1.126 by jsr166, Wed Jan 23 06:46:27 2013 UTC

# Line 57 | Line 57
57    <property name="build.jsr166e.dir"           location="${build.dir}/jsr166e"/>
58    <property name="build.extra166y.dir"         location="${build.dir}/extra166y"/>
59  
60 <  <property name="build.jsr166x.classes.dir"    location="${build.jsr166x.dir}/classes"/>
61 <  <property name="build.jsr166y.classes.dir"    location="${build.jsr166y.dir}/classes"/>
62 <  <property name="build.jsr166e.classes.dir"    location="${build.jsr166e.dir}/classes"/>
63 <  <property name="build.extra166y.classes.dir"  location="${build.extra166y.dir}/classes"/>
60 >  <property name="build.jsr166x.classes.dir"   location="${build.jsr166x.dir}/classes"/>
61 >  <property name="build.jsr166y.classes.dir"   location="${build.jsr166y.dir}/classes"/>
62 >  <property name="build.jsr166e.classes.dir"   location="${build.jsr166e.dir}/classes"/>
63 >  <property name="build.extra166y.classes.dir" location="${build.extra166y.dir}/classes"/>
64  
65    <!-- JDK locations -->
66    <property name="jdks.home"  location="${user.home}/jdk"/>
# Line 86 | Line 86
86      </sequential>
87    </macrodef>
88  
89 +  <macrodef name="mirror-dir">
90 +    <attribute name="src"/>
91 +    <attribute name="dst"/>
92 +    <sequential>
93 +    <delete dir="@{dst}"/>
94 +    <mkdir dir="@{dst}"/>
95 +    <copy todir="@{dst}" preservelastmodified="true">
96 +      <fileset dir="@{src}"/>
97 +    </copy>
98 +    </sequential>
99 +  </macrodef>
100 +
101    <defjdklocations v="6"/>
102    <defjdklocations v="7"/>
103    <defjdklocations v="8"/>
# Line 105 | Line 117
117    <property name="jsr166esrc.dir"       location="${topsrc.dir}/jsr166e"/>
118    <property name="extra166ysrc.dir"     location="${topsrc.dir}/extra166y"/>
119  
120 <  <!-- Distribution locations -->
121 <  <property name="dist.javadocs.dir"          location="${dist.dir}/jsr166.docs"/>
122 <  <property name="dist.4jdk7.docs.dir"        location="${dist.dir}/jsr166-4jdk7.docs"/>
123 <  <property name="dist.jsr166xjavadocs.dir"   location="${dist.dir}/jsr166x.docs"/>
124 <  <property name="dist.jsr166yjavadocs.dir"   location="${dist.dir}/jsr166y.docs"/>
125 <  <property name="dist.jsr166ejavadocs.dir"   location="${dist.dir}/jsr166e.docs"/>
126 <  <property name="dist.extra166yjavadocs.dir" location="${dist.dir}/extra166y.docs"/>
120 >  <!-- Javadoc locations -->
121 >  <property name="javadocs.dir"          location="${build.dir}/javadocs"/>
122 >  <property name="4jdk7javadocs.dir"     location="${build.4jdk7.dir}/javadocs"/>
123 >  <property name="jsr166xjavadocs.dir"   location="${build.jsr166x.dir}/javadocs"/>
124 >  <property name="jsr166yjavadocs.dir"   location="${build.jsr166y.dir}/javadocs"/>
125 >  <property name="jsr166ejavadocs.dir"   location="${build.jsr166e.dir}/javadocs"/>
126 >  <property name="extra166yjavadocs.dir" location="${build.extra166y.dir}/javadocs"/>
127 >
128 >  <property name="dist.javadocs.dir"          location="${dist.dir}/docs"/>
129 >  <property name="dist.4jdk7javadocs.dir"     location="${dist.dir}/jsr166-4jdk7docs"/>
130 >  <property name="dist.jsr166xjavadocs.dir"   location="${dist.dir}/jsr166xdocs"/>
131 >  <property name="dist.jsr166yjavadocs.dir"   location="${dist.dir}/jsr166ydocs"/>
132 >  <property name="dist.jsr166ejavadocs.dir"   location="${dist.dir}/jsr166edocs"/>
133 >  <property name="dist.extra166yjavadocs.dir" location="${dist.dir}/extra166ydocs"/>
134  
135    <!-- Jar locations -->
136    <property name="product.jar"      location="${build.dir}/jsr166.jar"/>
# Line 128 | Line 147
147    <property name="jdkapi7docs.url"      value="http://docs.oracle.com/javase/7/docs/api/"/>
148  
149    <property name="jdkapi8docs.url"      value="http://download.java.net/jdk8/docs/api/"/>
150 <  <!-- The below does not yet exist as of 2012-11 -->
150 >  <!-- The below does not yet exist as of 2013-01 -->
151    <!-- <property name="jdkapi8docs.url" value="http://docs.oracle.com/javase/8/docs/api/"/> -->
152  
153    <!-- Default jdk api doc location (latest stable release seems best) -->
# Line 146 | Line 165
165    </path>
166  
167    <macrodef name="run-tck-tests">
168 +    <attribute name="tck.src.dir" default="${tck.src.dir}"/>
169 +    <attribute name="source" default="6"/>
170      <attribute name="target"/>
171      <attribute name="workdir"/>
172 <    <attribute name="product.jar" default="${product.jar}"/>
172 >    <attribute name="classes"/>
173      <attribute name="jvmflags" default=""/>
174      <sequential>
175  
176      <mkdir dir="@{workdir}/tck-classes"/>
177  
178 <    <javac srcdir="${tck.src.dir}"
178 >    <javac srcdir="@{tck.src.dir}"
179             destdir="@{workdir}/tck-classes"
180             debug="${build.debug}"
181             debuglevel="${build.debuglevel}"
182             deprecation="${build.deprecation}"
183 <           source="6"
183 >           source="@{source}"
184             classpath="${junit.jar}"
185 +           bootclasspath="@{classes}:${bootclasspath@{source}}"
186             includeAntRuntime="false"
187             includeJavaRuntime="false"
188             executable="${javac@{target}}"
189             fork="true">
190  
191 <      <include name="**/*.java"/>
170 <      <bootclasspath path="@{product.jar}"/>
171 <      <bootclasspath path="${bootclasspath6}"/>
191 >      <include name="*.java"/>
192        <compilerarg value="-XDignore.symbol.file=true"/>
193        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation"/>
194        <compilerarg line="${build.args}"/>
# Line 179 | Line 199
199            failonerror="true"
200            jvm="${java@{target}}"
201            fork="true">
202 <        <jvmarg value="-Xbootclasspath/p:@{product.jar}"/>
202 >        <jvmarg value="-Xbootclasspath/p:@{classes}"/>
203          <jvmarg line="@{jvmflags}"/>
204          <classpath>
205            <pathelement location="${junit.jar}"/>
# Line 196 | Line 216
216    </path>
217  
218    <!-- Support @jls tag, used in jdk8+ javadoc -->
219 <  <!-- TODO: How do we get &trade to work? -->
200 <  <!-- TODO: Why isn't @jls a "standard" tag? -->
201 <  <!--   property name="javadoc.jls.cite" value="The Java&trade; Language Specification" -->
202 <  <property name="javadoc.jls.cite" value="The Java Language Specification"/>
219 >  <property name="javadoc.jls.cite" value="The Java&amp;trade; Language Specification"/>
220    <property name="javadoc.jls.option" value="jls:a:See &lt;cite&gt;${javadoc.jls.cite}&lt;/cite&gt;:"/>
221  
222    <!-- Main targets -->
# Line 252 | Line 269
269    <target name="docs"
270            description="Builds javadocs for src/main to dist dir">
271  
272 <    <delete dir="${dist.javadocs.dir}"/>
273 <    <mkdir dir="${dist.javadocs.dir}"/>
272 >    <delete dir="${javadocs.dir}"/>
273 >    <mkdir dir="${javadocs.dir}"/>
274  
275      <!-- the packagenames="none" hack below prevents scanning the -->
276      <!-- sourcepath for packages -->
277  
278 <    <javadoc destdir="${dist.javadocs.dir}"
278 >    <javadoc destdir="${javadocs.dir}"
279               packagenames="none"
280               link="${jdkapi8docs.url}"
281               overview="${src.dir}/intro.html"
282 +             sourcepath="${src.dir}:${jdk8src.dir}"
283               classpath=""
284               executable="${javadoc8}">
267      <sourcepath path="${src.dir}"/>
268      <sourcepath path="${jdk8src.dir}"/>
269      <arg value="-XDignore.symbol.file=true"/>
270      <arg value="-tag"/>
271      <arg value="${javadoc.jls.option}"/>
285        <fileset dir="${src.dir}" defaultexcludes="yes">
286          <include name="**/*.java"/>
287        </fileset>
288 +      <arg value="-XDignore.symbol.file=true"/>
289 +      <arg value="-tag"/>
290 +      <arg value="${javadoc.jls.option}"/>
291      </javadoc>
292    </target>
293  
294  
295    <target name="dist"
296 <          depends="dist-clean, dist-jar, docs"
296 >          depends="dist-clean, dist-jar, dist-docs"
297            description="Puts all distributable products in single hierarchy"/>
298  
299  
# Line 320 | Line 336
336  
337    <target name="dist-jar"
338            depends="clean, jar">
323
339      <copy file="${product.jar}" todir="${dist.dir}"/>
340 +  </target>
341  
342 +  <target name="dist-docs"
343 +          depends="clean, docs">
344 +    <mirror-dir src="${javadocs.dir}" dst="${dist.javadocs.dir}"/>
345    </target>
346  
347  
# Line 338 | Line 357
357             deprecation="${build.deprecation}"
358             source="6"
359             classpath="${junit.jar}"
360 +           bootclasspath="@{product.jar}:${bootclasspath6}"
361             includeAntRuntime="false"
362             includeJavaRuntime="false"
363             executable="${javac8}"
364             fork="true">
365  
366        <include name="**/*.java"/>
347      <bootclasspath path="@{product.jar}"/>
348      <bootclasspath path="${bootclasspath6}"/>
367        <compilerarg value="-XDignore.symbol.file=true"/>
368        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation"/>
369        <compilerarg line="${build.args}"/>
# Line 359 | Line 377
377             deprecation="${build.deprecation}"
378             source="6"
379             classpath=""
380 +           bootclasspath="@{product.jar}:${bootclasspath6}"
381             includeAntRuntime="false"
382             includeJavaRuntime="false"
383             executable="${javac8}"
384             fork="true">
385  
386        <include name="jsr166/test/**/*.java"/>
368      <bootclasspath path="${product.jar}"/>
369      <bootclasspath path="${bootclasspath6}"/>
387        <compilerarg value="-XDignore.symbol.file=true"/>
388        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation"/>
389        <compilerarg line="${build.args}"/>
# Line 550 | Line 567
567             deprecation="${build.deprecation}"
568             source="6"
569             classpath=""
570 +           bootclasspath="${bootclasspath6}"
571             includeAntRuntime="false"
572             includeJavaRuntime="false"
573             executable="${javac7}"
574             fork="true">
575  
576        <include name="**/*.java"/>
559      <bootclasspath path="${bootclasspath6}"/>
577        <compilerarg value="-XDignore.symbol.file=true"/>
578        <compilerarg value="-Xlint:all"/>
579        <compilerarg line="${build.args}"/>
# Line 583 | Line 600
600      <run-tck-tests
601        target="7"
602        workdir="${build.4jdk7.dir}"
603 <      product.jar="${4jdk7product.jar}"/>
603 >      classes="${4jdk7product.jar}"/>
604    </target>
605  
606  
# Line 646 | Line 663
663    <target name="4jdk7docs"
664            description="Builds javadocs for src/jdk7 to dist dir">
665  
666 <    <delete dir="${dist.4jdk7.docs.dir}"/>
667 <    <mkdir dir="${dist.4jdk7.docs.dir}"/>
666 >    <delete dir="${4jdk7javadocs.dir}"/>
667 >    <mkdir dir="${4jdk7javadocs.dir}"/>
668  
669 <    <javadoc destdir="${dist.4jdk7.docs.dir}"
669 >    <javadoc destdir="${4jdk7javadocs.dir}"
670               packagenames="none"
671               link="${jdkapi7docs.url}"
672               overview="${4jdk7src.dir}/intro.html"
673 +             sourcepath="${4jdk7src.dir}:${jdk7src.dir}"
674               classpath=""
675               executable="${javadoc7}">
658      <sourcepath path="${4jdk7src.dir}"/>
659      <sourcepath path="${jdk7src.dir}"/>
660      <arg value="-XDignore.symbol.file=true"/>
676        <fileset dir="${4jdk7src.dir}" defaultexcludes="yes">
677          <include name="**/*.java"/>
678        </fileset>
679 +      <arg value="-XDignore.symbol.file=true"/>
680      </javadoc>
681    </target>
682  
683  
684    <target name="4jdk7dist"
685 <          depends="4jdk7dist-clean, 4jdk7dist-jar, 4jdk7docs"
685 >          depends="4jdk7dist-jar, 4jdk7dist-docs"
686            description="Puts all distributable products in single hierarchy"/>
687  
688  
# Line 685 | Line 701
701  
702    <target name="4jdk7dist-jar"
703            depends="4jdk7clean, 4jdk7-jar">
688
704      <copy file="${4jdk7product.jar}" todir="${dist.dir}"/>
705 +  </target>
706 +
707  
708 +  <target name="4jdk7dist-docs"
709 +          depends="4jdk7clean, 4jdk7docs">
710 +    <mirror-dir src="${4jdk7javadocs.dir}" dst="${dist.4jdk7javadocs.dir}"/>
711    </target>
712  
713  
# Line 705 | Line 725
725             debuglevel="${build.debuglevel}"
726             deprecation="${build.deprecation}"
727             classpath=""
728 +           bootclasspath="${bootclasspath6}"
729             source="5"
730             includeAntRuntime="false"
731             includeJavaRuntime="false"
# Line 712 | Line 733
733             fork="true">
734  
735        <include name="jsr166x/**/*.java"/>
715      <bootclasspath path="${bootclasspath6}"/>
736        <compilerarg value="-XDignore.symbol.file=true"/>
737        <compilerarg value="-Xlint:all,-unchecked,-rawtypes"/>
738        <compilerarg line="${build.args}"/>
# Line 735 | Line 755
755    <target name="jsr166xdocs"
756            description="Builds javadocs to dist dir">
757  
758 <    <delete dir="${dist.jsr166xjavadocs.dir}"/>
759 <    <mkdir dir="${dist.jsr166xjavadocs.dir}"/>
758 >    <delete dir="${jsr166xjavadocs.dir}"/>
759 >    <mkdir dir="${jsr166xjavadocs.dir}"/>
760  
761 <    <javadoc destdir="${dist.jsr166xjavadocs.dir}"
761 >    <javadoc destdir="${jsr166xjavadocs.dir}"
762               packagenames="jsr166x.*"
763               link="${jdkapidocs.url}"
764 +             sourcepath="${topsrc.dir}:${jdk6src.dir}"
765 +             bootclasspath="${bootclasspath6}"
766               source="5"
767               executable="${javadoc7}">
746      <sourcepath path="${topsrc.dir}"/>
747      <sourcepath path="${jdk6src.dir}"/>
748      <bootclasspath path="${bootclasspath6}"/>
768        <arg value="-XDignore.symbol.file=true"/>
769  
770      </javadoc>
# Line 753 | Line 772
772  
773  
774    <target name="jsr166xdist"
775 <          depends="jsr166xdist-clean, jsr166xdist-jar, jsr166xdocs"
775 >          depends="jsr166xdist-jar, jsr166xdist-docs"
776            description="Puts all distributable products in single hierarchy"/>
777  
778  
# Line 773 | Line 792
792  
793    <target name="jsr166xdist-jar"
794            depends="jsr166xclean, jsr166x-jar">
776
795      <copy file="${jsr166x.jar}" todir="${dist.dir}"/>
796 +  </target>
797  
798 +  <target name="jsr166xdist-docs"
799 +          depends="jsr166xclean, jsr166xdocs">
800 +    <mirror-dir src="${jsr166xjavadocs.dir}" dst="${dist.jsr166xjavadocs.dir}"/>
801    </target>
802  
803    <!-- jsr166y -->
# Line 794 | Line 816
816             deprecation="${build.deprecation}"
817             source="6"
818             classpath=""
819 +           bootclasspath="${bootclasspath6}"
820             includeAntRuntime="false"
821             includeJavaRuntime="false"
822             executable="${javac7}"
823             fork="true">
824  
825        <include name="jsr166y/**/*.java"/>
803      <bootclasspath path="${bootclasspath6}"/>
826        <compilerarg value="-XDignore.symbol.file=true"/>
827        <compilerarg value="-Xlint:all"/>
828        <compilerarg line="${build.args}"/>
# Line 823 | Line 845
845    <target name="jsr166ydocs"
846            description="Builds javadocs to dist dir">
847  
848 <    <delete dir="${dist.jsr166yjavadocs.dir}"/>
849 <    <mkdir dir="${dist.jsr166yjavadocs.dir}"/>
848 >    <delete dir="${jsr166yjavadocs.dir}"/>
849 >    <mkdir dir="${jsr166yjavadocs.dir}"/>
850  
851 <    <javadoc destdir="${dist.jsr166yjavadocs.dir}"
851 >    <javadoc destdir="${jsr166yjavadocs.dir}"
852               packagenames="jsr166y.*"
853               link="${jdkapidocs.url}"
854 +             sourcepath="${topsrc.dir}:${jdk6src.dir}"
855 +             bootclasspath="${bootclasspath6}"
856               source="6"
857               executable="${javadoc7}">
834      <sourcepath path="${topsrc.dir}"/>
835      <sourcepath path="${jdk6src.dir}"/>
836      <bootclasspath path="${bootclasspath6}"/>
858        <arg value="-XDignore.symbol.file=true"/>
859  
860      </javadoc>
# Line 841 | Line 862
862  
863  
864    <target name="jsr166ydist"
865 <          depends="jsr166ydist-clean, jsr166ydist-jar, jsr166ydocs"
865 >          depends="jsr166ydist-jar, jsr166ydist-docs"
866            description="Puts all distributable products in single hierarchy"/>
867  
868  
# Line 860 | Line 881
881  
882    <target name="jsr166ydist-jar"
883            depends="jsr166yclean, jsr166y-jar">
863
884      <copy file="${jsr166y.jar}" todir="${dist.dir}"/>
885 +  </target>
886  
887 +  <target name="jsr166ydist-docs"
888 +          depends="jsr166yclean, jsr166ydocs">
889 +    <mirror-dir src="${jsr166yjavadocs.dir}" dst="${dist.jsr166yjavadocs.dir}"/>
890    </target>
891  
892  
# Line 880 | Line 904
904             debug="${build.debug}"
905             debuglevel="${build.debuglevel}"
906             deprecation="${build.deprecation}"
907 +           bootclasspath="@{jsr166y.jar}:${bootclasspath6}"
908             classpath=""
909             source="6"
910             includeAntRuntime="false"
# Line 888 | Line 913
913             fork="true">
914  
915        <include name="extra166y/**/*.java"/>
891      <bootclasspath path="${jsr166y.jar}"/>
892      <bootclasspath path="${bootclasspath6}"/>
916        <compilerarg value="-XDignore.symbol.file=true"/>
917        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial"/>
918        <compilerarg line="${build.args}"/>
# Line 912 | Line 935
935    <target name="extra166ydocs"
936            description="Builds javadocs to build dir">
937  
938 <    <delete dir="${dist.extra166yjavadocs.dir}"/>
939 <    <mkdir dir="${dist.extra166yjavadocs.dir}"/>
938 >    <delete dir="${extra166yjavadocs.dir}"/>
939 >    <mkdir dir="${extra166yjavadocs.dir}"/>
940  
941 <    <javadoc destdir="${dist.extra166yjavadocs.dir}"
941 >    <javadoc destdir="${extra166yjavadocs.dir}"
942               packagenames="extra166y.*"
943               link="${jdkapidocs.url}"
944 +             sourcepath="${topsrc.dir}:${jdk6src.dir}"
945 +             bootclasspath="${bootclasspath6}"
946               source="6"
947               executable="${javadoc7}">
923      <sourcepath path="${topsrc.dir}"/>
924      <sourcepath path="${jdk6src.dir}"/>
925      <bootclasspath path="${bootclasspath6}"/>
948        <arg value="-XDignore.symbol.file=true"/>
949  
950      </javadoc>
# Line 930 | Line 952
952  
953  
954    <target name="extra166ydist"
955 <          depends="extra166ydist-clean, extra166ydist-jar, extra166ydocs"
955 >          depends="extra166ydist-jar, extra166ydist-docs"
956            description="Puts all distributable products in single hierarchy"/>
957  
958  
# Line 949 | Line 971
971  
972    <target name="extra166ydist-jar"
973            depends="extra166yclean, extra166y-jar">
952
974      <copy file="${extra166y.jar}" todir="${dist.dir}"/>
975 +  </target>
976  
977 +  <target name="extra166ydist-docs"
978 +          depends="extra166yclean, extra166ydocs">
979 +    <mirror-dir src="${extra166yjavadocs.dir}" dst="${dist.extra166yjavadocs.dir}"/>
980    </target>
981  
982    <!-- jsr166e -->
# Line 997 | Line 1022
1022    <target name="jsr166edocs"
1023            description="Builds javadocs to build dir">
1024  
1025 <    <delete dir="${dist.jsr166ejavadocs.dir}"/>
1026 <    <mkdir dir="${dist.jsr166ejavadocs.dir}"/>
1025 >    <delete dir="${jsr166ejavadocs.dir}"/>
1026 >    <mkdir dir="${jsr166ejavadocs.dir}"/>
1027  
1028 <    <javadoc destdir="${dist.jsr166ejavadocs.dir}"
1028 >    <javadoc destdir="${jsr166ejavadocs.dir}"
1029               packagenames="jsr166e.*"
1030               link="${jdkapidocs.url}"
1031 +             sourcepath="${topsrc.dir}:${jdk7src.dir}"
1032               source="7"
1033               executable="${javadoc7}">
1008      <sourcepath path="${topsrc.dir}"/>
1009      <sourcepath path="${jdk7src.dir}"/>
1034        <arg value="-XDignore.symbol.file=true"/>
1035  
1036      </javadoc>
1037    </target>
1038  
1039  
1040 +  <target name="jsr166e-test-tck"
1041 +          depends="jsr166e-jar"
1042 +          description="Runs tck tests for jsr166e">
1043 +
1044 +    <run-tck-tests
1045 +      tck.src.dir="${test.src.dir}/tck-jsr166e"
1046 +      source="7"
1047 +      target="8"
1048 +      workdir="${build.jsr166e.dir}"
1049 +      classes="${jsr166e.jar}"/>
1050 +  </target>
1051 +
1052 +
1053    <target name="jsr166edist"
1054 <          depends="jsr166edist-clean, jsr166edist-jar, jsr166edocs"
1054 >          depends="jsr166edist-jar, jsr166edist-docs"
1055            description="Puts all distributable products in single hierarchy"/>
1056  
1057  
1058    <target name="jsr166eclean"
1059            description="Removes all jsr166e build products">
1023
1060      <delete dir="${build.jsr166e.dir}"/>
1025
1061    </target>
1062  
1063  
# Line 1033 | Line 1068
1068  
1069    <target name="jsr166edist-jar"
1070            depends="jsr166eclean, jsr166e-jar">
1036
1071      <copy file="${jsr166e.jar}" todir="${dist.dir}"/>
1072 +  </target>
1073  
1074 +  <target name="jsr166edist-docs"
1075 +          depends="jsr166eclean, jsr166edocs">
1076 +    <mirror-dir src="${jsr166ejavadocs.dir}" dst="${dist.jsr166ejavadocs.dir}"/>
1077    </target>
1078  
1079   </project>

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines