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.117 by jsr166, Sun Jan 20 07:43:30 2013 UTC vs.
Revision 1.121 by jsr166, Mon Jan 21 22:03:09 2013 UTC

# Line 62 | Line 62
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 binary locations -->
65 >  <!-- JDK locations -->
66    <property name="jdks.home"  location="${user.home}/jdk"/>
67  
68    <macrodef name="defjdklocations">
# Line 72 | Line 72
72      <property name="java@{v}"       location="${jdk@{v}.home}/bin/java"/>
73      <property name="javac@{v}"      location="${jdk@{v}.home}/bin/javac"/>
74      <property name="javadoc@{v}"    location="${jdk@{v}.home}/bin/javadoc"/>
75    <property name="bootdir@{v}"    location="${jdk@{v}.home}/jre/lib"/>
75      <property name="jdk@{v}src.dir" location="${jdks.home}/src/jdk@{v}/jdk/src/share/classes"/>
76 <    <property name="bootclasspath@{v}"
77 <     value="${bootdir@{v}}/resources.jar:${bootdir@{v}}/rt.jar:${bootdir@{v}}/jsse.jar:${bootdir@{v}}/jce.jar:${bootdir@{v}}/:${bootdir@{v}}/charsets.jar"/>
76 >    <local name="boot.jar.dir"/>
77 >    <property name="boot.jar.dir"   location="${jdk@{v}.home}/jre/lib"/>
78 >    <path id="bootclasspath@{v}">
79 >      <pathelement path="${boot.jar.dir}/resources.jar"/>
80 >      <pathelement path="${boot.jar.dir}/rt.jar"/>
81 >      <pathelement path="${boot.jar.dir}/jsse.jar"/>
82 >      <pathelement path="${boot.jar.dir}/jce.jar"/>
83 >      <pathelement path="${boot.jar.dir}/charsets.jar"/>
84 >    </path>
85 >    <property name="bootclasspath@{v}" value="${toString:bootclasspath@{v}}"/>
86      </sequential>
87    </macrodef>
88  
# Line 83 | Line 90
90    <defjdklocations v="7"/>
91    <defjdklocations v="8"/>
92  
86  <macrodef name="run-tck-tests">
87    <attribute name="target"/>
88    <attribute name="workdir"/>
89    <attribute name="product.jar" default="${product.jar}"/>
90    <attribute name="jvmflags" default=""/>
91    <sequential>
92
93    <mkdir dir="@{workdir}/tck-classes"/>
94
95    <javac srcdir="${tck.src.dir}"
96           destdir="@{workdir}/tck-classes"
97           debug="${build.debug}"
98           debuglevel="${build.debuglevel}"
99           deprecation="${build.deprecation}"
100           source="6"
101           classpath="${junit.jar}"
102           bootclasspath="@{product.jar}:${bootclasspath6}"
103           includeAntRuntime="false"
104           includeJavaRuntime="false"
105           executable="${javac@{target}}"
106           fork="true">
107
108      <include name="**/*.java"/>
109      <compilerarg value="-XDignore.symbol.file=true"/>
110      <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation"/>
111      <compilerarg line="${build.args}"/>
112    </javac>
113
114    <java classname="JSR166TestCase"
115          failonerror="true"
116          jvm="${java@{target}}"
117          fork="true">
118        <jvmarg value="-Xbootclasspath/p:@{product.jar}"/>
119        <jvmarg line="@{jvmflags}"/>
120        <classpath>
121          <pathelement location="${junit.jar}"/>
122          <pathelement location="@{workdir}/tck-classes"/>
123        </classpath>
124    </java>
125
126    </sequential>
127  </macrodef>
128
93    <!-- Source locations -->
94    <property name="src.dir"              location="${basedir}/src/main"/>
95    <property name="test.src.dir"         location="${basedir}/src/test"/>
# Line 158 | Line 122
122    <property name="extra166y.jar"    location="${build.extra166y.dir}/extra166y.jar"/>
123    <property name="junit.jar"        location="${lib.dir}/junit.jar"/>
124  
161  <!-- Bootclasspath argument -->
162  <property name="bootclasspath.args"   value="-Xbootclasspath/p:${product.jar}"/>
163
125    <!-- Canonical location of jdk API docs, to use with javadoc link attribute -->
126    <property name="jdkapi5docs.url"      value="http://docs.oracle.com/javase/1.5.0/docs/api/"/>
127    <property name="jdkapi6docs.url"      value="http://docs.oracle.com/javase/6/docs/api/"/>
# Line 184 | Line 145
145      <pathelement location="${junit.jar}"/>
146    </path>
147  
148 +  <macrodef name="run-tck-tests">
149 +    <attribute name="target"/>
150 +    <attribute name="workdir"/>
151 +    <attribute name="product.jar" default="${product.jar}"/>
152 +    <attribute name="jvmflags" default=""/>
153 +    <sequential>
154 +
155 +    <mkdir dir="@{workdir}/tck-classes"/>
156 +
157 +    <javac srcdir="${tck.src.dir}"
158 +           destdir="@{workdir}/tck-classes"
159 +           debug="${build.debug}"
160 +           debuglevel="${build.debuglevel}"
161 +           deprecation="${build.deprecation}"
162 +           source="6"
163 +           classpath="${junit.jar}"
164 +           bootclasspath="@{product.jar}:${bootclasspath6}"
165 +           includeAntRuntime="false"
166 +           includeJavaRuntime="false"
167 +           executable="${javac@{target}}"
168 +           fork="true">
169 +
170 +      <include name="*.java"/>
171 +      <compilerarg value="-XDignore.symbol.file=true"/>
172 +      <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation"/>
173 +      <compilerarg line="${build.args}"/>
174 +
175 +    </javac>
176 +
177 +    <java classname="JSR166TestCase"
178 +          failonerror="true"
179 +          jvm="${java@{target}}"
180 +          fork="true">
181 +        <jvmarg value="-Xbootclasspath/p:@{product.jar}"/>
182 +        <jvmarg line="@{jvmflags}"/>
183 +        <classpath>
184 +          <pathelement location="${junit.jar}"/>
185 +          <pathelement location="@{workdir}/tck-classes"/>
186 +        </classpath>
187 +    </java>
188 +
189 +    </sequential>
190 +  </macrodef>
191 +
192    <!-- ALoops classpath -->
193    <path id="loops.classpath">
194      <pathelement location="${build.loops.dir}"/>
195    </path>
196  
197    <!-- Support @jls tag, used in jdk8+ javadoc -->
198 <  <!-- TODO: How do we get &trade to work? -->
194 <  <!-- TODO: Why isn't @jls a "standard" tag? -->
195 <  <!--   property name="javadoc.jls.cite" value="The Java&trade; Language Specification" -->
196 <  <property name="javadoc.jls.cite" value="The Java Language Specification"/>
198 >  <property name="javadoc.jls.cite" value="The Java&amp;trade; Language Specification"/>
199    <property name="javadoc.jls.option" value="jls:a:See &lt;cite&gt;${javadoc.jls.cite}&lt;/cite&gt;:"/>
200  
201    <!-- Main targets -->
# Line 220 | Line 222
222             fork="true">
223  
224        <include name="**/*.java"/>
223      <compilerarg line="${build.args}"/>
225        <compilerarg value="-XDignore.symbol.file=true"/>
226        <compilerarg value="-Xlint:all"/>
226
227 <!--
228      <exclude name="java/lang/**"/>
227        <compilerarg line="${build.args}"/>
230      <compilerarg line="-Xlint -Xmaxwarns 1000"/>
231 -->
228  
229      </javac>
234
230    </target>
231  
232  
238
233    <target name="jar"
234            depends="compile"
235            description="Builds library jar from compiled sources">
# Line 243 | Line 237
237      <jar destfile="${product.jar}">
238        <fileset dir="${build.classes.dir}"/>
239      </jar>
246
240    </target>
241  
242  
250
243    <target name="test"
244            depends="configure-tests, report-tests"
245            description="Runs all tests (requires JUnit 3.8.1 in ${ant.home}/lib)" />
246  
247  
256
248    <target name="docs"
249            description="Builds javadocs for src/main to dist dir">
250  
# Line 270 | Line 261
261               sourcepath="${src.dir}:${jdk8src.dir}"
262               classpath=""
263               executable="${javadoc8}">
273      <arg value="-XDignore.symbol.file=true"/>
274      <arg value="-tag"/>
275      <arg value="${javadoc.jls.option}"/>
264        <fileset dir="${src.dir}" defaultexcludes="yes">
265          <include name="**/*.java"/>
266        </fileset>
267 +      <arg value="-XDignore.symbol.file=true"/>
268 +      <arg value="-tag"/>
269 +      <arg value="${javadoc.jls.option}"/>
270      </javadoc>
280
271    </target>
272  
273  
284
274    <target name="dist"
275            depends="dist-clean, dist-jar, docs"
276            description="Puts all distributable products in single hierarchy"/>
# Line 302 | Line 291
291        <exclude name="**/SyntaxTest.java"/>
292        <exclude name="**/SuperfluousAbstract.java"/>
293      </jar>
305
294    </target>
295  
296  
309
297    <target name="clean"
298            description="Removes all build products">
299  
# Line 315 | Line 302
302    </target>
303  
304  
318
305    <target name="dist-clean"
306            description="Removes all build and distribution products">
307  
# Line 324 | Line 310
310    </target>
311  
312  
327
313    <!-- Internal targets -->
314  
315  
# Line 348 | Line 333
333             deprecation="${build.deprecation}"
334             source="6"
335             classpath="${junit.jar}"
336 <           bootclasspath="${product.jar}:${bootclasspath6}"
336 >           bootclasspath="@{product.jar}:${bootclasspath6}"
337             includeAntRuntime="false"
338             includeJavaRuntime="false"
339             executable="${javac8}"
340             fork="true">
341  
342        <include name="**/*.java"/>
358      <compilerarg line="${build.args}"/>
343        <compilerarg value="-XDignore.symbol.file=true"/>
344        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation"/>
345 +      <compilerarg line="${build.args}"/>
346  
347      </javac>
348  
# Line 368 | Line 353
353             deprecation="${build.deprecation}"
354             source="6"
355             classpath=""
356 <           bootclasspath="${product.jar}:${bootclasspath6}"
356 >           bootclasspath="@{product.jar}:${bootclasspath6}"
357             includeAntRuntime="false"
358             includeJavaRuntime="false"
359             executable="${javac8}"
360             fork="true">
361  
362        <include name="jsr166/test/**/*.java"/>
378
379      <compilerarg line="${build.args}"/>
363        <compilerarg value="-XDignore.symbol.file=true"/>
364        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation"/>
365 +      <compilerarg line="${build.args}"/>
366  
367      </javac>
368  
# Line 391 | Line 375
375             source="${build.sourcelevel}"
376               fork="true">
377  
378 <      <compilerarg value="${bootclasspath.args}"/>
395 <      <compilerarg line="${build.args}"/>
378 >      <compilerarg value="-Xbootclasspath/p:${product.jar}"/>
379        <compilerarg value="-XDignore.symbol.file=true"/>
380 +      <compilerarg line="${build.args}"/>
381  
382      </javac>
383   -->
# Line 546 | Line 530
530  
531    <!-- jsr166 4jdk7 -->
532  
549
533    <target name="4jdk7compile"
534            depends="configure-compiler"
535            description="Compiles src/jdk7 sources, targeting jdk7">
# Line 567 | Line 550
550             fork="true">
551  
552        <include name="**/*.java"/>
570      <compilerarg line="${build.args}"/>
553        <compilerarg value="-XDignore.symbol.file=true"/>
554        <compilerarg value="-Xlint:all"/>
555 +      <compilerarg line="${build.args}"/>
556  
557      </javac>
575
558    </target>
559  
560 +
561    <target name="4jdk7-jar"
562            depends="4jdk7compile"
563            description="Builds library jar from compiled sources">
# Line 666 | Line 649
649               sourcepath="${4jdk7src.dir}:${jdk7src.dir}"
650               classpath=""
651               executable="${javadoc7}">
669      <arg value="-XDignore.symbol.file=true"/>
652        <fileset dir="${4jdk7src.dir}" defaultexcludes="yes">
653          <include name="**/*.java"/>
654        </fileset>
655 +      <arg value="-XDignore.symbol.file=true"/>
656      </javadoc>
674
657    </target>
658  
659  
# Line 680 | Line 662
662            description="Puts all distributable products in single hierarchy"/>
663  
664  
683
665    <target name="4jdk7clean"
666            description="Removes all 4jdk7 build products">
667  
# Line 689 | Line 670
670    </target>
671  
672  
692
673    <target name="4jdk7dist-clean"
674            description="Removes all build and distribution products">
675  
676    </target>
677  
678    <target name="4jdk7dist-jar"
679 <          depends="4jdk7clean, 4jdk7compile">
679 >          depends="4jdk7clean, 4jdk7-jar">
680  
681      <copy file="${4jdk7product.jar}" todir="${dist.dir}"/>
682  
# Line 717 | Line 697
697             debuglevel="${build.debuglevel}"
698             deprecation="${build.deprecation}"
699             classpath=""
720           source="5"
700             bootclasspath="${bootclasspath6}"
701 +           source="5"
702             includeAntRuntime="false"
703             includeJavaRuntime="false"
704             executable="${javac7}"
705             fork="true">
706  
707        <include name="jsr166x/**/*.java"/>
728      <compilerarg line="${build.args}"/>
708        <compilerarg value="-XDignore.symbol.file=true"/>
709        <compilerarg value="-Xlint:all,-unchecked,-rawtypes"/>
710 +      <compilerarg line="${build.args}"/>
711  
712      </javac>
733
713    </target>
714  
715  
716 <
738 <  <target name="jsr166xjar"
716 >  <target name="jsr166x-jar"
717            depends="jsr166xcompile"
718            description="Builds library jar from compiled sources">
719  
# Line 746 | Line 724
724    </target>
725  
726  
749
727    <target name="jsr166xdocs"
728            description="Builds javadocs to dist dir">
729  
# Line 756 | Line 733
733      <javadoc destdir="${dist.jsr166xjavadocs.dir}"
734               packagenames="jsr166x.*"
735               link="${jdkapidocs.url}"
759             source="5"
760             bootclasspath="${bootclasspath6}"
736               sourcepath="${topsrc.dir}:${jdk6src.dir}"
737 <             executable="${javadoc7}"
738 <             additionalparam="-XDignore.symbol.file=true"/>
737 >             bootclasspath="${bootclasspath6}"
738 >             source="5"
739 >             executable="${javadoc7}">
740 >      <arg value="-XDignore.symbol.file=true"/>
741  
742 +    </javadoc>
743    </target>
744  
745  
# Line 770 | Line 748
748            description="Puts all distributable products in single hierarchy"/>
749  
750  
773
751    <target name="jsr166xclean"
752            description="Removes all jsr166x build products">
753  
# Line 779 | Line 756
756    </target>
757  
758  
782
759    <target name="jsr166xdist-clean"
760            description="Removes all build and distribution products">
761  
# Line 787 | Line 763
763  
764  
765    <target name="jsr166xdist-jar"
766 <          depends="jsr166xclean, jsr166xjar">
766 >          depends="jsr166xclean, jsr166x-jar">
767  
768      <copy file="${jsr166x.jar}" todir="${dist.dir}"/>
769  
# Line 816 | Line 792
792             fork="true">
793  
794        <include name="jsr166y/**/*.java"/>
819      <compilerarg line="${build.args}"/>
795        <compilerarg value="-XDignore.symbol.file=true"/>
796        <compilerarg value="-Xlint:all"/>
797 +      <compilerarg line="${build.args}"/>
798 +
799      </javac>
800    </target>
801  
802  
803 <  <target name="jsr166yjar"
803 >  <target name="jsr166y-jar"
804            depends="jsr166ycompile"
805            description="Builds library jar from compiled sources">
806  
# Line 834 | Line 811
811    </target>
812  
813  
837
814    <target name="jsr166ydocs"
815            description="Builds javadocs to dist dir">
816  
# Line 844 | Line 820
820      <javadoc destdir="${dist.jsr166yjavadocs.dir}"
821               packagenames="jsr166y.*"
822               link="${jdkapidocs.url}"
847             source="6"
848             bootclasspath="${bootclasspath6}"
823               sourcepath="${topsrc.dir}:${jdk6src.dir}"
824 <             executable="${javadoc7}"
825 <             additionalparam="-XDignore.symbol.file=true"/>
824 >             bootclasspath="${bootclasspath6}"
825 >             source="6"
826 >             executable="${javadoc7}">
827 >      <arg value="-XDignore.symbol.file=true"/>
828  
829 +    </javadoc>
830    </target>
831  
832  
# Line 858 | Line 835
835            description="Puts all distributable products in single hierarchy"/>
836  
837  
861
838    <target name="jsr166yclean"
839            description="Removes all jsr166y build products">
840  
# Line 867 | Line 843
843    </target>
844  
845  
870
846    <target name="jsr166ydist-clean"
847            description="Removes all build and distribution products">
848  
849    </target>
850  
851    <target name="jsr166ydist-jar"
852 <          depends="jsr166yclean, jsr166yjar">
852 >          depends="jsr166yclean, jsr166y-jar">
853  
854      <copy file="${jsr166y.jar}" todir="${dist.dir}"/>
855  
# Line 885 | Line 860
860  
861  
862    <target name="extra166ycompile"
863 <          depends="configure-compiler, jsr166yjar"
863 >          depends="configure-compiler, jsr166y-jar"
864            description="Compiles extra166y sources">
865  
866      <mkdir dir="${build.extra166y.classes.dir}"/>
# Line 895 | Line 870
870             debug="${build.debug}"
871             debuglevel="${build.debuglevel}"
872             deprecation="${build.deprecation}"
873 +           bootclasspath="@{jsr166y.jar}:${bootclasspath6}"
874             classpath=""
875             source="6"
900           bootclasspath="${jsr166y.jar}:${bootclasspath6}"
876             includeAntRuntime="false"
877             includeJavaRuntime="false"
878             executable="${javac7}"
879             fork="true">
880  
881        <include name="extra166y/**/*.java"/>
907      <compilerarg line="${build.args}"/>
882        <compilerarg value="-XDignore.symbol.file=true"/>
883        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial"/>
884 +      <compilerarg line="${build.args}"/>
885  
886      </javac>
912
887    </target>
888  
889  
890 <
917 <  <target name="extra166yjar"
890 >  <target name="extra166y-jar"
891            depends="extra166ycompile"
892            description="Builds library jar from compiled sources">
893  
# Line 925 | Line 898
898    </target>
899  
900  
928
901    <target name="extra166ydocs"
902            description="Builds javadocs to build dir">
903  
# Line 935 | Line 907
907      <javadoc destdir="${dist.extra166yjavadocs.dir}"
908               packagenames="extra166y.*"
909               link="${jdkapidocs.url}"
938             source="6"
939             bootclasspath="${bootclasspath6}"
910               sourcepath="${topsrc.dir}:${jdk6src.dir}"
911 <             executable="${javadoc7}"
912 <             additionalparam="-XDignore.symbol.file=true"/>
911 >             bootclasspath="${bootclasspath6}"
912 >             source="6"
913 >             executable="${javadoc7}">
914 >      <arg value="-XDignore.symbol.file=true"/>
915  
916 +    </javadoc>
917    </target>
918  
919  
# Line 949 | Line 922
922            description="Puts all distributable products in single hierarchy"/>
923  
924  
952
925    <target name="extra166yclean"
926            description="Removes all extra166y build products">
927  
# Line 958 | Line 930
930    </target>
931  
932  
961
933    <target name="extra166ydist-clean"
934            description="Removes all build and distribution products">
935  
936    </target>
937  
938    <target name="extra166ydist-jar"
939 <          depends="extra166yclean, extra166yjar">
939 >          depends="extra166yclean, extra166y-jar">
940  
941      <copy file="${extra166y.jar}" todir="${dist.dir}"/>
942  
# Line 992 | Line 963
963             fork="true">
964  
965        <include name="jsr166e/**/*.java"/>
995      <compilerarg line="${build.args}"/>
966        <compilerarg value="-XDignore.symbol.file=true"/>
967        <compilerarg value="-Xlint:all"/>
968 +      <compilerarg line="${build.args}"/>
969  
970      </javac>
1000
971    </target>
972  
973  
974 <
1005 <  <target name="jsr166ejar"
974 >  <target name="jsr166e-jar"
975            depends="jsr166ecompile"
976            description="Builds library jar from compiled sources">
977  
# Line 1013 | Line 982
982    </target>
983  
984  
1016
985    <target name="jsr166edocs"
986            description="Builds javadocs to build dir">
987  
# Line 1023 | Line 991
991      <javadoc destdir="${dist.jsr166ejavadocs.dir}"
992               packagenames="jsr166e.*"
993               link="${jdkapidocs.url}"
1026             source="7"
994               sourcepath="${topsrc.dir}:${jdk7src.dir}"
995 <             executable="${javadoc7}"
996 <             additionalparam="-XDignore.symbol.file=true" >
997 <    </javadoc>
995 >             source="7"
996 >             executable="${javadoc7}">
997 >      <arg value="-XDignore.symbol.file=true"/>
998  
999 +    </javadoc>
1000    </target>
1001  
1002  
# Line 1037 | Line 1005
1005            description="Puts all distributable products in single hierarchy"/>
1006  
1007  
1040
1008    <target name="jsr166eclean"
1009            description="Removes all jsr166e build products">
1010  
# Line 1052 | Line 1019
1019    </target>
1020  
1021    <target name="jsr166edist-jar"
1022 <          depends="jsr166eclean, jsr166ejar">
1022 >          depends="jsr166eclean, jsr166e-jar">
1023  
1024      <copy file="${jsr166e.jar}" todir="${dist.dir}"/>
1025  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines