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.92 by jsr166, Mon Jan 14 07:08:06 2013 UTC vs.
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.
10    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>
22  
# Line 38 | Line 47
47    <property name="build.jdk7.dir"              location="${build.dir}/jdk7"/>
48    <property name="build.jdk7.lib.dir"          location="${build.jdk7.dir}"/>
49    <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"/>
52  
53    <property name="build.jsr166x.dir"           location="${build.dir}/jsr166x"/>
# Line 58 | Line 68
68  
69    <!-- JDK binary locations -->
70    <property name="jdks.home"  location="${user.home}/jdk"/>
71 <  <property name="jdk6.home"  location="${jdks.home}/jdk1.6.0"/>
72 <  <property name="jdk7.home"  location="${jdks.home}/jdk1.7.0"/>
73 <  <property name="jdk8.home"  location="${jdks.home}/jdk1.8.0"/>
74 <  <property name="javac6"     location="${jdk6.home}/bin/javac"/>
75 <  <property name="javac7"     location="${jdk7.home}/bin/javac"/>
76 <  <property name="javac8"     location="${jdk8.home}/bin/javac"/>
77 <  <property name="javadoc6"   location="${jdk6.home}/bin/javadoc"/>
78 <  <property name="javadoc7"   location="${jdk7.home}/bin/javadoc"/>
79 <  <property name="javadoc8"   location="${jdk8.home}/bin/javadoc"/>
80 <  <property name="bootdir6"   location="${jdk6.home}/jre/lib"/>
81 <  <property name="bootdir7"   location="${jdk7.home}/jre/lib"/>
82 <  <property name="bootdir8"   location="${jdk8.home}/jre/lib"/>
83 <  <property name="bootclasspath6"   value="${bootdir6}/resources.jar:${bootdir6}/rt.jar:${bootdir6}/jsse.jar:${bootdir6}/jce.jar:${bootdir6}/:${bootdir6}/charsets.jar"/>
84 <  <property name="bootclasspath7"   value="${bootdir7}/resources.jar:${bootdir7}/rt.jar:${bootdir7}/jsse.jar:${bootdir7}/jce.jar:${bootdir7}/:${bootdir7}/charsets.jar"/>
85 <  <property name="bootclasspath8"   value="${bootdir8}/resources.jar:${bootdir8}/rt.jar:${bootdir8}/jsse.jar:${bootdir8}/jce.jar:${bootdir8}/:${bootdir8}/charsets.jar"/>
71 >
72 >  <macrodef name="defjdklocations">
73 >    <attribute name="v"/>
74 >    <sequential>
75 >    <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"/>
78 >    <property name="javadoc@{v}"   location="${jdk@{v}.home}/bin/javadoc"/>
79 >    <property name="bootdir@{v}"   location="${jdk@{v}.home}/jre/lib"/>
80 >    <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"/>
82 >    </sequential>
83 >  </macrodef>
84 >
85 >  <defjdklocations v="6"/>
86 >  <defjdklocations v="7"/>
87 >  <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 -->
108    <property name="src.dir"              location="${basedir}/src/main"/>
# Line 522 | Line 552
552             bootclasspath="${bootclasspath6}"
553             includeAntRuntime="false"
554             includeJavaRuntime="false"
555 <           executable="${javac6}"
555 >           executable="${javac7}"
556             fork="true">
557  
558        <include name="**/*.java"/>
# Line 532 | Line 562
562  
563      </javac>
564  
535  </target>
536
537
538
539  <target name="jdk7jar"
540          depends="jdk7compile"
541          description="Builds library jar from compiled sources">
542
565      <mkdir dir="${build.jdk7.lib.dir}"/>
566  
567      <jar destfile="${jdk7product.jar}" index="true">
568        <fileset dir="${build.jdk7.classes.dir}"/>
569      </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>
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"
635            description="Builds javadocs with custom tags to build folder">
# Line 618 | Line 699
699    </target>
700  
701    <target name="jdk7dist-jar"
702 <          depends="jdk7clean, jdk7jar">
702 >          depends="jdk7clean, jdk7compile">
703  
704      <copy file="${jdk7product.jar}" todir="${dist.dir}"/>
705  
# Line 936 | Line 1017
1017  
1018    <!-- jsr166e -->
1019  
939
1020    <target name="jsr166ecompile"
1021 <          depends="init, configure-compiler"
1021 >          depends="configure-compiler"
1022            description="Compiles jsr166e sources">
1023  
1024      <mkdir dir="${build.jsr166e.dir}"/>
1025  
1026 <    <javac srcdir="${jsr166esrc.dir}"
1027 <          destdir="${build.jsr166e.dir}"
1028 <            debug="${build.debug}"
1029 <       debuglevel="${build.debuglevel}"
1030 <      deprecation="${build.deprecation}"
1026 >    <javac srcdir="${topsrc.dir}"
1027 >           destdir="${build.jsr166e.dir}"
1028 >           debug="${build.debug}"
1029 >           debuglevel="${build.debuglevel}"
1030 >           deprecation="${build.deprecation}"
1031             source="1.7"
1032 <             fork="true">
1032 >           classpath=""
1033 >           includeAntRuntime="false"
1034 >           includeJavaRuntime="false"
1035 >           executable="${javac7}"
1036 >           fork="true">
1037  
1038 <      <include name="**/*.java"/>
1038 >      <include name="jsr166e/**/*.java"/>
1039        <compilerarg line="${build.args}"/>
1040        <compilerarg value="-XDignore.symbol.file=true"/>
1041 <      <compilerarg value="${bootclasspath.args}"/>
958 <
959 < <!--       <compilerarg line="-Xlint -Xmaxwarns 1000"/> -->
1041 >      <compilerarg value="-Xlint:all"/>
1042  
1043      </javac>
1044  
# Line 986 | Line 1068
1068  
1069      <javadoc destdir="${build.jsr166ejavadocs.dir}"
1070               packagenames="jsr166e,jsr166e.extra"
1071 <             link="${jdkapidocs.url}"
1071 >             link="${jdkapi7docs.url}"
1072               source="1.7"
1073 <             sourcepath="${topsrc.dir}:${jdksrc.dir}"
1074 <             additionalparam="-XDignore.symbol.file=true" />
1073 >             sourcepath="${topsrc.dir}:${jdk7src.dir}:${jdksrc.dir}"
1074 >             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>
1082  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines