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

Diff of /jsr166/build.xml

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

revision 1.120 by jsr166, Mon Jan 21 02:34:44 2013 UTC revision 1.129 by jsr166, Wed Jan 23 07:17:13 2013 UTC
# Line 25  Line 25 
25  ------------------------------------------------------------------------------  ------------------------------------------------------------------------------
26    </description>    </description>
27    
28    <target name="usage" description="Advises user to run with -projecthelp">    <target name="usage" description="Display main targets by running 'ant -projecthelp'">
29      <echo>Run "ant -projecthelp" for full usage information.</echo>      <java classname="org.apache.tools.ant.Main">
30          <arg value="-projecthelp" />
31        </java>
32    </target>    </target>
33    
34    
# Line 57  Line 59 
59    <property name="build.jsr166e.dir"           location="${build.dir}/jsr166e"/>    <property name="build.jsr166e.dir"           location="${build.dir}/jsr166e"/>
60    <property name="build.extra166y.dir"         location="${build.dir}/extra166y"/>    <property name="build.extra166y.dir"         location="${build.dir}/extra166y"/>
61    
62    <property name="build.jsr166x.classes.dir"    location="${build.jsr166x.dir}/classes"/>    <property name="build.jsr166x.classes.dir"   location="${build.jsr166x.dir}/classes"/>
63    <property name="build.jsr166y.classes.dir"    location="${build.jsr166y.dir}/classes"/>    <property name="build.jsr166y.classes.dir"   location="${build.jsr166y.dir}/classes"/>
64    <property name="build.jsr166e.classes.dir"    location="${build.jsr166e.dir}/classes"/>    <property name="build.jsr166e.classes.dir"   location="${build.jsr166e.dir}/classes"/>
65    <property name="build.extra166y.classes.dir"  location="${build.extra166y.dir}/classes"/>    <property name="build.extra166y.classes.dir" location="${build.extra166y.dir}/classes"/>
66    
67    <!-- JDK locations -->    <!-- JDK locations -->
68    <property name="jdks.home"  location="${user.home}/jdk"/>    <property name="jdks.home"  location="${user.home}/jdk"/>
# Line 86  Line 88 
88      </sequential>      </sequential>
89    </macrodef>    </macrodef>
90    
91      <macrodef name="mirror-dir">
92        <attribute name="src"/>
93        <attribute name="dst"/>
94        <sequential>
95        <delete dir="@{dst}"/>
96        <mkdir dir="@{dst}"/>
97        <copy todir="@{dst}" preservelastmodified="true">
98          <fileset dir="@{src}"/>
99        </copy>
100        </sequential>
101      </macrodef>
102    
103    <defjdklocations v="6"/>    <defjdklocations v="6"/>
104    <defjdklocations v="7"/>    <defjdklocations v="7"/>
105    <defjdklocations v="8"/>    <defjdklocations v="8"/>
# Line 105  Line 119 
119    <property name="jsr166esrc.dir"       location="${topsrc.dir}/jsr166e"/>    <property name="jsr166esrc.dir"       location="${topsrc.dir}/jsr166e"/>
120    <property name="extra166ysrc.dir"     location="${topsrc.dir}/extra166y"/>    <property name="extra166ysrc.dir"     location="${topsrc.dir}/extra166y"/>
121    
122    <!-- Distribution locations -->    <!-- Javadoc locations -->
123    <property name="dist.javadocs.dir"          location="${dist.dir}/jsr166.docs"/>    <property name="docs.dir"          location="${build.dir}/docs"/>
124    <property name="dist.4jdk7.docs.dir"        location="${dist.dir}/jsr166-4jdk7.docs"/>    <property name="4jdk7docs.dir"     location="${build.4jdk7.dir}/docs"/>
125    <property name="dist.jsr166xjavadocs.dir"   location="${dist.dir}/jsr166x.docs"/>    <property name="jsr166xdocs.dir"   location="${build.jsr166x.dir}/docs"/>
126    <property name="dist.jsr166yjavadocs.dir"   location="${dist.dir}/jsr166y.docs"/>    <property name="jsr166ydocs.dir"   location="${build.jsr166y.dir}/docs"/>
127    <property name="dist.jsr166ejavadocs.dir"   location="${dist.dir}/jsr166e.docs"/>    <property name="jsr166edocs.dir"   location="${build.jsr166e.dir}/docs"/>
128    <property name="dist.extra166yjavadocs.dir" location="${dist.dir}/extra166y.docs"/>    <property name="extra166ydocs.dir" location="${build.extra166y.dir}/docs"/>
129    
130      <property name="dist.docs.dir"          location="${dist.dir}/docs"/>
131      <property name="dist.4jdk7docs.dir"     location="${dist.dir}/jsr166-4jdk7docs"/>
132      <property name="dist.jsr166xdocs.dir"   location="${dist.dir}/jsr166xdocs"/>
133      <property name="dist.jsr166ydocs.dir"   location="${dist.dir}/jsr166ydocs"/>
134      <property name="dist.jsr166edocs.dir"   location="${dist.dir}/jsr166edocs"/>
135      <property name="dist.extra166ydocs.dir" location="${dist.dir}/extra166ydocs"/>
136    
137    <!-- Jar locations -->    <!-- Jar locations -->
138    <property name="product.jar"      location="${build.dir}/jsr166.jar"/>    <property name="product.jar"      location="${build.dir}/jsr166.jar"/>
# Line 128  Line 149 
149    <property name="jdkapi7docs.url"      value="http://docs.oracle.com/javase/7/docs/api/"/>    <property name="jdkapi7docs.url"      value="http://docs.oracle.com/javase/7/docs/api/"/>
150    
151    <property name="jdkapi8docs.url"      value="http://download.java.net/jdk8/docs/api/"/>    <property name="jdkapi8docs.url"      value="http://download.java.net/jdk8/docs/api/"/>
152    <!-- The below does not yet exist as of 2012-11 -->    <!-- The below does not yet exist as of 2013-01 -->
153    <!-- <property name="jdkapi8docs.url" value="http://docs.oracle.com/javase/8/docs/api/"/> -->    <!-- <property name="jdkapi8docs.url" value="http://docs.oracle.com/javase/8/docs/api/"/> -->
154    
155    <!-- Default jdk api doc location (latest stable release seems best) -->    <!-- Default jdk api doc location (latest stable release seems best) -->
# Line 146  Line 167 
167    </path>    </path>
168    
169    <macrodef name="run-tck-tests">    <macrodef name="run-tck-tests">
170        <attribute name="tck.src.dir" default="${tck.src.dir}"/>
171        <attribute name="source" default="6"/>
172      <attribute name="target"/>      <attribute name="target"/>
173      <attribute name="workdir"/>      <attribute name="workdir"/>
174      <attribute name="product.jar" default="${product.jar}"/>      <attribute name="classes"/>
175      <attribute name="jvmflags" default=""/>      <attribute name="jvmflags" default=""/>
176      <sequential>      <sequential>
177    
178      <mkdir dir="@{workdir}/tck-classes"/>      <mkdir dir="@{workdir}/tck-classes"/>
179    
180      <javac srcdir="${tck.src.dir}"      <javac srcdir="@{tck.src.dir}"
181             destdir="@{workdir}/tck-classes"             destdir="@{workdir}/tck-classes"
182             debug="${build.debug}"             debug="${build.debug}"
183             debuglevel="${build.debuglevel}"             debuglevel="${build.debuglevel}"
184             deprecation="${build.deprecation}"             deprecation="${build.deprecation}"
185             source="6"             source="@{source}"
186             classpath="${junit.jar}"             classpath="${junit.jar}"
187             bootclasspath="@{product.jar}:${bootclasspath6}"             bootclasspath="@{classes}:${bootclasspath@{source}}"
188             includeAntRuntime="false"             includeAntRuntime="false"
189             includeJavaRuntime="false"             includeJavaRuntime="false"
190             executable="${javac@{target}}"             executable="${javac@{target}}"
191             fork="true">             fork="true">
192    
193        <include name="JSR166TestCase.java"/>        <include name="*.java"/>
194        <compilerarg value="-XDignore.symbol.file=true"/>        <compilerarg value="-XDignore.symbol.file=true"/>
195        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation"/>        <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation"/>
196        <compilerarg line="${build.args}"/>        <compilerarg line="${build.args}"/>
# Line 178  Line 201 
201            failonerror="true"            failonerror="true"
202            jvm="${java@{target}}"            jvm="${java@{target}}"
203            fork="true">            fork="true">
204          <jvmarg value="-Xbootclasspath/p:@{product.jar}"/>          <jvmarg value="-Xbootclasspath/p:@{classes}"/>
205          <jvmarg line="@{jvmflags}"/>          <jvmarg line="@{jvmflags}"/>
206          <classpath>          <classpath>
207            <pathelement location="${junit.jar}"/>            <pathelement location="${junit.jar}"/>
# Line 248  Line 271 
271    <target name="docs"    <target name="docs"
272            description="Builds javadocs for src/main to dist dir">            description="Builds javadocs for src/main to dist dir">
273    
274      <delete dir="${dist.javadocs.dir}"/>      <delete dir="${docs.dir}"/>
275      <mkdir dir="${dist.javadocs.dir}"/>      <mkdir dir="${docs.dir}"/>
276    
277      <!-- the packagenames="none" hack below prevents scanning the -->      <!-- the packagenames="none" hack below prevents scanning the -->
278      <!-- sourcepath for packages -->      <!-- sourcepath for packages -->
279    
280      <javadoc destdir="${dist.javadocs.dir}"      <javadoc destdir="${docs.dir}"
281               packagenames="none"               packagenames="none"
282               link="${jdkapi8docs.url}"               link="${jdkapi8docs.url}"
283               overview="${src.dir}/intro.html"               overview="${src.dir}/intro.html"
# Line 272  Line 295 
295    
296    
297    <target name="dist"    <target name="dist"
298            depends="dist-clean, dist-jar, docs"            depends="dist-clean, dist-jar, dist-docs"
299            description="Puts all distributable products in single hierarchy"/>            description="Puts all distributable products in single hierarchy"/>
300    
301    
# Line 315  Line 338 
338    
339    <target name="dist-jar"    <target name="dist-jar"
340            depends="clean, jar">            depends="clean, jar">
   
341      <copy file="${product.jar}" todir="${dist.dir}"/>      <copy file="${product.jar}" todir="${dist.dir}"/>
342      </target>
343    
344      <target name="dist-docs"
345              depends="clean, docs">
346        <mirror-dir src="${docs.dir}" dst="${dist.docs.dir}"/>
347    </target>    </target>
348    
349    
# Line 558  Line 584 
584    </target>    </target>
585    
586    
587    <target name="4jdk7-jar"    <target name="4jdk7jar"
588            depends="4jdk7compile"            depends="4jdk7compile"
589            description="Builds library jar from compiled sources">            description="Builds library jar from compiled sources">
590    
# Line 570  Line 596 
596    
597    
598    <target name="4jdk7-test-tck"    <target name="4jdk7-test-tck"
599            depends="4jdk7-jar"            depends="4jdk7jar"
600            description="Runs tck tests for jsr166-4jdk7 directly">            description="Runs tck tests for jsr166-4jdk7 directly">
601    
602      <run-tck-tests      <run-tck-tests
603        target="7"        target="7"
604        workdir="${build.4jdk7.dir}"        workdir="${build.4jdk7.dir}"
605        product.jar="${4jdk7product.jar}"/>        classes="${4jdk7product.jar}"/>
606    </target>    </target>
607    
608    
# Line 639  Line 665 
665    <target name="4jdk7docs"    <target name="4jdk7docs"
666            description="Builds javadocs for src/jdk7 to dist dir">            description="Builds javadocs for src/jdk7 to dist dir">
667    
668      <delete dir="${dist.4jdk7.docs.dir}"/>      <delete dir="${4jdk7docs.dir}"/>
669      <mkdir dir="${dist.4jdk7.docs.dir}"/>      <mkdir dir="${4jdk7docs.dir}"/>
670    
671      <javadoc destdir="${dist.4jdk7.docs.dir}"      <javadoc destdir="${4jdk7docs.dir}"
672               packagenames="none"               packagenames="none"
673               link="${jdkapi7docs.url}"               link="${jdkapi7docs.url}"
674               overview="${4jdk7src.dir}/intro.html"               overview="${4jdk7src.dir}/intro.html"
# Line 658  Line 684 
684    
685    
686    <target name="4jdk7dist"    <target name="4jdk7dist"
687            depends="4jdk7dist-clean, 4jdk7dist-jar, 4jdk7docs"            depends="4jdk7dist-jar, 4jdk7dist-docs"
688            description="Puts all distributable products in single hierarchy"/>            description="Puts all distributable products in single hierarchy"/>
689    
690    
# Line 676  Line 702 
702    </target>    </target>
703    
704    <target name="4jdk7dist-jar"    <target name="4jdk7dist-jar"
705            depends="4jdk7clean, 4jdk7-jar">            depends="4jdk7clean, 4jdk7jar">
   
706      <copy file="${4jdk7product.jar}" todir="${dist.dir}"/>      <copy file="${4jdk7product.jar}" todir="${dist.dir}"/>
707      </target>
708    
709    
710      <target name="4jdk7dist-docs"
711              depends="4jdk7clean, 4jdk7docs">
712        <mirror-dir src="${4jdk7docs.dir}" dst="${dist.4jdk7docs.dir}"/>
713    </target>    </target>
714    
715    
# Line 713  Line 743 
743    </target>    </target>
744    
745    
746    <target name="jsr166x-jar"    <target name="jsr166xjar"
747            depends="jsr166xcompile"            depends="jsr166xcompile"
748            description="Builds library jar from compiled sources">            description="Builds library jar from compiled sources">
749    
# Line 727  Line 757 
757    <target name="jsr166xdocs"    <target name="jsr166xdocs"
758            description="Builds javadocs to dist dir">            description="Builds javadocs to dist dir">
759    
760      <delete dir="${dist.jsr166xjavadocs.dir}"/>      <delete dir="${jsr166xdocs.dir}"/>
761      <mkdir dir="${dist.jsr166xjavadocs.dir}"/>      <mkdir dir="${jsr166xdocs.dir}"/>
762    
763      <javadoc destdir="${dist.jsr166xjavadocs.dir}"      <javadoc destdir="${jsr166xdocs.dir}"
764               packagenames="jsr166x.*"               packagenames="jsr166x.*"
765               link="${jdkapidocs.url}"               link="${jdkapidocs.url}"
766               sourcepath="${topsrc.dir}:${jdk6src.dir}"               sourcepath="${topsrc.dir}:${jdk6src.dir}"
# Line 744  Line 774 
774    
775    
776    <target name="jsr166xdist"    <target name="jsr166xdist"
777            depends="jsr166xdist-clean, jsr166xdist-jar, jsr166xdocs"            depends="jsr166xdist-jar, jsr166xdist-docs"
778            description="Puts all distributable products in single hierarchy"/>            description="Puts all distributable products in single hierarchy"/>
779    
780    
# Line 763  Line 793 
793    
794    
795    <target name="jsr166xdist-jar"    <target name="jsr166xdist-jar"
796            depends="jsr166xclean, jsr166x-jar">            depends="jsr166xclean, jsr166xjar">
   
797      <copy file="${jsr166x.jar}" todir="${dist.dir}"/>      <copy file="${jsr166x.jar}" todir="${dist.dir}"/>
798      </target>
799    
800      <target name="jsr166xdist-docs"
801              depends="jsr166xclean, jsr166xdocs">
802        <mirror-dir src="${jsr166xdocs.dir}" dst="${dist.jsr166xdocs.dir}"/>
803    </target>    </target>
804    
805    <!-- jsr166y -->    <!-- jsr166y -->
# Line 800  Line 833 
833    </target>    </target>
834    
835    
836    <target name="jsr166y-jar"    <target name="jsr166yjar"
837            depends="jsr166ycompile"            depends="jsr166ycompile"
838            description="Builds library jar from compiled sources">            description="Builds library jar from compiled sources">
839    
# Line 814  Line 847 
847    <target name="jsr166ydocs"    <target name="jsr166ydocs"
848            description="Builds javadocs to dist dir">            description="Builds javadocs to dist dir">
849    
850      <delete dir="${dist.jsr166yjavadocs.dir}"/>      <delete dir="${jsr166ydocs.dir}"/>
851      <mkdir dir="${dist.jsr166yjavadocs.dir}"/>      <mkdir dir="${jsr166ydocs.dir}"/>
852    
853      <javadoc destdir="${dist.jsr166yjavadocs.dir}"      <javadoc destdir="${jsr166ydocs.dir}"
854               packagenames="jsr166y.*"               packagenames="jsr166y.*"
855               link="${jdkapidocs.url}"               link="${jdkapidocs.url}"
856               sourcepath="${topsrc.dir}:${jdk6src.dir}"               sourcepath="${topsrc.dir}:${jdk6src.dir}"
# Line 831  Line 864 
864    
865    
866    <target name="jsr166ydist"    <target name="jsr166ydist"
867            depends="jsr166ydist-clean, jsr166ydist-jar, jsr166ydocs"            depends="jsr166ydist-jar, jsr166ydist-docs"
868            description="Puts all distributable products in single hierarchy"/>            description="Puts all distributable products in single hierarchy"/>
869    
870    
# Line 849  Line 882 
882    </target>    </target>
883    
884    <target name="jsr166ydist-jar"    <target name="jsr166ydist-jar"
885            depends="jsr166yclean, jsr166y-jar">            depends="jsr166yclean, jsr166yjar">
   
886      <copy file="${jsr166y.jar}" todir="${dist.dir}"/>      <copy file="${jsr166y.jar}" todir="${dist.dir}"/>
887      </target>
888    
889      <target name="jsr166ydist-docs"
890              depends="jsr166yclean, jsr166ydocs">
891        <mirror-dir src="${jsr166ydocs.dir}" dst="${dist.jsr166ydocs.dir}"/>
892    </target>    </target>
893    
894    
# Line 860  Line 896 
896    
897    
898    <target name="extra166ycompile"    <target name="extra166ycompile"
899            depends="configure-compiler, jsr166y-jar"            depends="configure-compiler, jsr166yjar"
900            description="Compiles extra166y sources">            description="Compiles extra166y sources">
901    
902      <mkdir dir="${build.extra166y.classes.dir}"/>      <mkdir dir="${build.extra166y.classes.dir}"/>
# Line 887  Line 923 
923    </target>    </target>
924    
925    
926    <target name="extra166y-jar"    <target name="extra166yjar"
927            depends="extra166ycompile"            depends="extra166ycompile"
928            description="Builds library jar from compiled sources">            description="Builds library jar from compiled sources">
929    
# Line 901  Line 937 
937    <target name="extra166ydocs"    <target name="extra166ydocs"
938            description="Builds javadocs to build dir">            description="Builds javadocs to build dir">
939    
940      <delete dir="${dist.extra166yjavadocs.dir}"/>      <delete dir="${extra166ydocs.dir}"/>
941      <mkdir dir="${dist.extra166yjavadocs.dir}"/>      <mkdir dir="${extra166ydocs.dir}"/>
942    
943      <javadoc destdir="${dist.extra166yjavadocs.dir}"      <javadoc destdir="${extra166ydocs.dir}"
944               packagenames="extra166y.*"               packagenames="extra166y.*"
945               link="${jdkapidocs.url}"               link="${jdkapidocs.url}"
946               sourcepath="${topsrc.dir}:${jdk6src.dir}"               sourcepath="${topsrc.dir}:${jdk6src.dir}"
# Line 918  Line 954 
954    
955    
956    <target name="extra166ydist"    <target name="extra166ydist"
957            depends="extra166ydist-clean, extra166ydist-jar, extra166ydocs"            depends="extra166ydist-jar, extra166ydist-docs"
958            description="Puts all distributable products in single hierarchy"/>            description="Puts all distributable products in single hierarchy"/>
959    
960    
# Line 936  Line 972 
972    </target>    </target>
973    
974    <target name="extra166ydist-jar"    <target name="extra166ydist-jar"
975            depends="extra166yclean, extra166y-jar">            depends="extra166yclean, extra166yjar">
   
976      <copy file="${extra166y.jar}" todir="${dist.dir}"/>      <copy file="${extra166y.jar}" todir="${dist.dir}"/>
977      </target>
978    
979      <target name="extra166ydist-docs"
980              depends="extra166yclean, extra166ydocs">
981        <mirror-dir src="${extra166ydocs.dir}" dst="${dist.extra166ydocs.dir}"/>
982    </target>    </target>
983    
984    <!-- jsr166e -->    <!-- jsr166e -->
# Line 971  Line 1010 
1010    </target>    </target>
1011    
1012    
1013    <target name="jsr166e-jar"    <target name="jsr166ejar"
1014            depends="jsr166ecompile"            depends="jsr166ecompile"
1015            description="Builds library jar from compiled sources">            description="Builds library jar from compiled sources">
1016    
# Line 985  Line 1024 
1024    <target name="jsr166edocs"    <target name="jsr166edocs"
1025            description="Builds javadocs to build dir">            description="Builds javadocs to build dir">
1026    
1027      <delete dir="${dist.jsr166ejavadocs.dir}"/>      <delete dir="${jsr166edocs.dir}"/>
1028      <mkdir dir="${dist.jsr166ejavadocs.dir}"/>      <mkdir dir="${jsr166edocs.dir}"/>
1029    
1030      <javadoc destdir="${dist.jsr166ejavadocs.dir}"      <javadoc destdir="${jsr166edocs.dir}"
1031               packagenames="jsr166e.*"               packagenames="jsr166e.*"
1032               link="${jdkapidocs.url}"               link="${jdkapidocs.url}"
1033               sourcepath="${topsrc.dir}:${jdk7src.dir}"               sourcepath="${topsrc.dir}:${jdk7src.dir}"
# Line 1000  Line 1039 
1039    </target>    </target>
1040    
1041    
1042      <target name="jsr166e-test-tck"
1043              depends="jsr166ejar"
1044              description="Runs tck tests for jsr166e">
1045    
1046        <run-tck-tests
1047          tck.src.dir="${test.src.dir}/tck-jsr166e"
1048          source="7"
1049          target="8"
1050          workdir="${build.jsr166e.dir}"
1051          classes="${jsr166e.jar}"/>
1052      </target>
1053    
1054    
1055    <target name="jsr166edist"    <target name="jsr166edist"
1056            depends="jsr166edist-clean, jsr166edist-jar, jsr166edocs"            depends="jsr166edist-jar, jsr166edist-docs"
1057            description="Puts all distributable products in single hierarchy"/>            description="Puts all distributable products in single hierarchy"/>
1058    
1059    
1060    <target name="jsr166eclean"    <target name="jsr166eclean"
1061            description="Removes all jsr166e build products">            description="Removes all jsr166e build products">
   
1062      <delete dir="${build.jsr166e.dir}"/>      <delete dir="${build.jsr166e.dir}"/>
   
1063    </target>    </target>
1064    
1065    
# Line 1019  Line 1069 
1069    </target>    </target>
1070    
1071    <target name="jsr166edist-jar"    <target name="jsr166edist-jar"
1072            depends="jsr166eclean, jsr166e-jar">            depends="jsr166eclean, jsr166ejar">
   
1073      <copy file="${jsr166e.jar}" todir="${dist.dir}"/>      <copy file="${jsr166e.jar}" todir="${dist.dir}"/>
1074      </target>
1075    
1076      <target name="jsr166edist-docs"
1077              depends="jsr166eclean, jsr166edocs">
1078        <mirror-dir src="${jsr166edocs.dir}" dst="${dist.jsr166edocs.dir}"/>
1079    </target>    </target>
1080    
1081  </project>  </project>

Legend:
Removed from v.1.120  
changed lines
  Added in v.1.129

dl@cs.oswego.edu
ViewVC Help
Powered by ViewVC 1.1.27