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

Diff of /jsr166/build.xml

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

revision 1.95 by jsr166, Mon Jan 14 19:22:27 2013 UTC revision 1.98 by jsr166, Wed Jan 16 07:39:51 2013 UTC
# Line 8  Line 8 
8    
9    User-specific settings are read from user.properties.    User-specific settings are read from user.properties.
10    See user.properties.sample for an explanation of some useful settings.    See user.properties.sample for an explanation of some useful settings.
11    
12      The repository contains all dependencies except for ant and the JDK
13      itself.  Because the JDK version matters and because different
14      targets require different JDKs, we assume that users have created a
15      hierarchy containing:
16      $HOME/jdk/jdk6
17      $HOME/jdk/jdk7
18      $HOME/jdk/jdk8
19      where each of the above is a JDK or a symlink to same.
20  ------------------------------------------------------------------------------  ------------------------------------------------------------------------------
21    </description>    </description>
22    
# Line 38  Line 47 
47    <property name="build.jdk7.dir"              location="${build.dir}/jdk7"/>    <property name="build.jdk7.dir"              location="${build.dir}/jdk7"/>
48    <property name="build.jdk7.lib.dir"          location="${build.jdk7.dir}"/>    <property name="build.jdk7.lib.dir"          location="${build.jdk7.dir}"/>
49    <property name="build.jdk7.classes.dir"      location="${build.jdk7.dir}/classes"/>    <property name="build.jdk7.classes.dir"      location="${build.jdk7.dir}/classes"/>
50      <property name="build.jdk7.tck.classes.dir"  location="${build.jdk7.dir}/tck/classes"/>
51    <property name="build.jdk7.docs.dir"         location="${build.jdk7.dir}/docs"/>    <property name="build.jdk7.docs.dir"         location="${build.jdk7.dir}/docs"/>
52    
53    <property name="build.jsr166x.dir"           location="${build.dir}/jsr166x"/>    <property name="build.jsr166x.dir"           location="${build.dir}/jsr166x"/>
# Line 63  Line 73 
73      <attribute name="v"/>      <attribute name="v"/>
74      <sequential>      <sequential>
75      <property name="jdk@{v}.home"  location="${jdks.home}/jdk@{v}"/>      <property name="jdk@{v}.home"  location="${jdks.home}/jdk@{v}"/>
76        <property name="java@{v}"      location="${jdk@{v}.home}/bin/java"/>
77      <property name="javac@{v}"     location="${jdk@{v}.home}/bin/javac"/>      <property name="javac@{v}"     location="${jdk@{v}.home}/bin/javac"/>
78      <property name="javadoc@{v}"   location="${jdk@{v}.home}/bin/javadoc"/>      <property name="javadoc@{v}"   location="${jdk@{v}.home}/bin/javadoc"/>
79      <property name="bootdir@{v}"   location="${jdk@{v}.home}/jre/lib"/>      <property name="bootdir@{v}"   location="${jdk@{v}.home}/jre/lib"/>
80      <property name="bootclasspath@{v}"        <property name="bootclasspath@{v}"
81       value="${bootdir@{v}}/resources.jar:${bootdir@{v}}/rt.jar:${bootdir@{v}}/jsse.jar:${bootdir@{v}}/jce.jar:${bootdir@{v}}/:${bootdir@{v}}/charsets.jar"/>       value="${bootdir@{v}}/resources.jar:${bootdir@{v}}/rt.jar:${bootdir@{v}}/jsse.jar:${bootdir@{v}}/jce.jar:${bootdir@{v}}/:${bootdir@{v}}/charsets.jar"/>
82      </sequential>      </sequential>
83    </macrodef>    </macrodef>
# Line 75  Line 86 
86    <defjdklocations v="7"/>    <defjdklocations v="7"/>
87    <defjdklocations v="8"/>    <defjdklocations v="8"/>
88    
89      <macrodef name="run-tck-tests">
90        <attribute name="jvm"/>
91        <attribute name="tck.classes"/>
92        <attribute name="product.jar" default="${product.jar}"/>
93        <attribute name="jvmflags" default=""/>
94        <sequential>
95        <java classname="JSR166TestCase"
96              jvm="@{jvm}" fork="true">
97            <jvmarg value="-Xbootclasspath/p:@{product.jar}"/>
98            <jvmarg line="@{jvmflags}"/>
99            <classpath>
100              <pathelement location="${junit.jar}"/>
101              <pathelement location="@{tck.classes}"/>
102            </classpath>
103        </java>
104        </sequential>
105      </macrodef>
106    
107    <!-- Source locations -->    <!-- Source locations -->
108    <property name="src.dir"              location="${basedir}/src/main"/>    <property name="src.dir"              location="${basedir}/src/main"/>
109    <property name="test.src.dir"         location="${basedir}/src/test"/>    <property name="test.src.dir"         location="${basedir}/src/test"/>
# Line 523  Line 552 
552             bootclasspath="${bootclasspath6}"             bootclasspath="${bootclasspath6}"
553             includeAntRuntime="false"             includeAntRuntime="false"
554             includeJavaRuntime="false"             includeJavaRuntime="false"
555             executable="${javac6}"             executable="${javac7}"
556             fork="true">             fork="true">
557    
558        <include name="**/*.java"/>        <include name="**/*.java"/>
# Line 533  Line 562 
562    
563      </javac>      </javac>
564    
   </target>  
   
   
   
   <target name="jdk7jar"  
           depends="jdk7compile"  
           description="Builds library jar from compiled sources">  
   
565      <mkdir dir="${build.jdk7.lib.dir}"/>      <mkdir dir="${build.jdk7.lib.dir}"/>
566    
567      <jar destfile="${jdk7product.jar}" index="true">      <jar destfile="${jdk7product.jar}" index="true">
568        <fileset dir="${build.jdk7.classes.dir}"/>        <fileset dir="${build.jdk7.classes.dir}"/>
569      </jar>      </jar>
570    
571        <mkdir dir="${build.jdk7.tck.classes.dir}"/>
572    
573        <javac srcdir="${tck.src.dir}"
574               destdir="${build.jdk7.tck.classes.dir}"
575               debug="${build.debug}"
576               debuglevel="${build.debuglevel}"
577               deprecation="${build.deprecation}"
578               source="1.6"
579               classpath="${junit.jar}"
580               bootclasspath="${jdk7product.jar}:${bootclasspath6}"
581               includeAntRuntime="false"
582               includeJavaRuntime="false"
583               executable="${javac7}"
584               fork="true">
585    
586          <include name="**/*.java"/>
587          <compilerarg line="${build.args}"/>
588          <compilerarg value="-XDignore.symbol.file=true"/>
589          <compilerarg value="-Xlint:all,-unchecked,-rawtypes,-serial,-deprecation"/>
590    
591        </javac>
592    
593    </target>    </target>
594    
595    
596      <target name="run-jdk7-tck-tests"
597              depends="jdk7compile"
598              description="Runs tck tests for jsr166-jdk7 directly">
599        <run-tck-tests
600          jvm="${java7}"
601          tck.classes="${build.jdk7.tck.classes.dir}"
602          product.jar="${jdk7product.jar}"/>
603      </target>
604    
605    
606      <target name="run-jdk7-tck-tests-via-junit-task"
607              depends="jdk7compile">
608    
609        <junit printsummary="true"
610               showoutput="true"
611               errorProperty="junit.failed"
612               failureProperty="junit.failed"
613               includeantruntime="true"
614               jvm="${java7}"
615               fork="true">
616    
617          <jvmarg value="-Xbootclasspath/p:${jdk7product.jar}"/>
618          <jvmarg value="-server"/>
619    
620          <classpath>
621            <pathelement location="${junit.jar}"/>
622            <pathelement location="${build.jdk7.tck.classes.dir}"/>
623          </classpath>
624    
625          <formatter type="brief"/>
626    
627          <test name="JSR166TestCase" haltonfailure="no">
628          </test>
629    
630        </junit>
631      </target>
632    
633    
634    <target name="jdk7docs"    <target name="jdk7docs"
635            description="Builds javadocs with custom tags to build folder">            description="Builds javadocs with custom tags to build folder">
# Line 619  Line 699 
699    </target>    </target>
700    
701    <target name="jdk7dist-jar"    <target name="jdk7dist-jar"
702            depends="jdk7clean, jdk7jar">            depends="jdk7clean, jdk7compile">
703    
704      <copy file="${jdk7product.jar}" todir="${dist.dir}"/>      <copy file="${jdk7product.jar}" todir="${dist.dir}"/>
705    
# Line 988  Line 1068 
1068    
1069      <javadoc destdir="${build.jsr166ejavadocs.dir}"      <javadoc destdir="${build.jsr166ejavadocs.dir}"
1070               packagenames="jsr166e,jsr166e.extra"               packagenames="jsr166e,jsr166e.extra"
1071               link="${jdkapidocs.url}"               link="${jdkapi7docs.url}"
1072               source="1.7"               source="1.7"
1073               sourcepath="${topsrc.dir}:${jdksrc.dir}"               sourcepath="${topsrc.dir}:${jdk7src.dir}:${jdksrc.dir}"
1074               additionalparam="-XDignore.symbol.file=true" />               executable="${javadoc7}"
1075                 additionalparam="-XDignore.symbol.file=true" >
1076          <fileset dir="${topsrc.dir}" defaultexcludes="yes">
1077            <include name="jsr166e/**/*.java"/>
1078          </fileset>
1079        </javadoc>
1080    
1081    </target>    </target>
1082    

Legend:
Removed from v.1.95  
changed lines
  Added in v.1.98

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