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.64 by tim, Wed Mar 24 20:32:33 2004 UTC vs.
Revision 1.70 by dl, Wed Aug 11 10:57:33 2004 UTC

# Line 31 | Line 31
31    <property name="build.classes.dir"    location="${build.dir}/classes"/>
32    <property name="build.testcases.dir"  location="${build.dir}/testcases"/>
33    <property name="build.j1.dir"         location="${build.dir}/j1"/>
34 +  <property name="build.loops.dir"      location="${build.dir}/loops"/>
35    <property name="build.lib.dir"        location="${build.dir}/lib"/>
36    <property name="build.ant.dir"        location="${build.dir}/ant"/>
37    <property name="build.javadocs.dir"   location="${build.dir}/javadocs"/>
# Line 39 | Line 40
40    <property name="build.doccheck.dir"   location="${build.dir}/doccheck"/>
41    <property name="build.filter.src.dir" location="${build.dir}/filtersrc"/>
42    <property name="build.dc-filter.dir"  location="${build.dir}/filterdocchk"/>
43 +  <property name="build.jsr166x.dir"    location="${build.dir}/jsr166x"/>
44 +  <property name="build.jsr166xlib.dir"        location="${build.dir}/jsr166xlib"/>
45 +  <property name="build.jsr166xjavadocs.dir"   location="${build.dir}/jsr166xjavadocs"/>
46  
47    <!-- Source locations -->
48    <property name="src.dir"              location="${basedir}/src/main"/>
49    <property name="test.src.dir"         location="${basedir}/src/test"/>
50    <property name="j1.src.dir"           location="${basedir}/src/javaone"/>
51 +  <property name="loops.src.dir"        location="${basedir}/src/loops"/>
52    <property name="tck.src.dir"          location="${test.src.dir}/tck"/>
53    <property name="jtreg.src.dir"        location="${test.src.dir}/jtreg"/>
54    <property name="ant.src.dir"          location="${basedir}/etc/ant"/>
55    <property name="stylesheet.dir"       location="${basedir}/etc/xsl"/>
56    <property name="lib.dir"              location="${basedir}/lib"/>
57    <property name="dist.dir"             location="${basedir}/dist"/>
58 +  <property name="topsrc.dir"           location="${basedir}/src"/>
59 +  <property name="jsr166xsrc.dir"       location="${basedir}/src/jsr166x"/>
60  
61    <!-- Distribution locations -->
62    <property name="dist.javadocs.dir"    location="${dist.dir}/docs"/>
63 +  <property name="dist.jsr166xjavadocs.dir"    location="${dist.dir}/jsr166xdocs"/>
64  
65    <!-- Jar locations -->
66    <property name="product.jar"          location="${build.lib.dir}/jsr166.jar"/>
67 +  <property name="jsr166xproduct.jar"   location="${build.jsr166xlib.dir}/jsr166x.jar"/>
68    <property name="junit.jar"            location="${lib.dir}/junit.jar"/>
69 <  
69 >  <property name="concurrent.jar"       location="${lib.dir}/concurrent.jar"/>
70 >
71    <!-- Bootclasspath argument -->
72    <property name="bootclasspath.args"   value="-Xbootclasspath/p:${product.jar}"/>
73  
# Line 67 | Line 77
77      <pathelement location="${junit.jar}"/>
78    </path>
79  
80 <  <!-- Test classpath -->
80 >  <!-- ALoops classpath -->
81 >  <path id="loops.classpath">
82 >    <pathelement location="${build.loops.dir}"/>
83 >  </path>
84 >
85 >  <!-- J1 classpath -->
86    <path id="j1.classpath">
87      <pathelement location="${build.j1.dir}"/>
88      <pathelement location="${junit.jar}"/>
89 +    <pathelement location="${concurrent.jar}"/>
90    </path>
91  
92  
# Line 91 | Line 107
107             source="${build.sourcelevel}"
108               fork="true">
109  
110 +      <include name="**/*.java"/>
111 +      <exclude name="java/lang/**"/>
112        <compilerarg line="${build.args}"/>
113  
114      </javac>
# Line 168 | Line 186
186              classpath="${lib.dir}/checkstyle-all-3.1.jar"/>
187  
188      <mkdir dir="${build.checkstyle.dir}"/>
189 <    
189 >
190      <checkstyle config="etc/checkstyle/sun_checks.xml"
191         failOnViolation="false">
192 <      <formatter type="xml" toFile="${build.checkstyle.dir}/checkstyle-report.xml"/>
192 >      <formatter type="xml" toFile="${build.checkstyle.dir}/checkstyle-report.xml"/>
193        <fileset dir="${build.filter.src.dir}" includes="**/*.java"/>
194      </checkstyle>
195 <    
196 <    <style in="${build.checkstyle.dir}/checkstyle-report.xml"
197 <          out="${build.checkstyle.dir}/checkstyle-report.html"
195 >
196 >    <style in="${build.checkstyle.dir}/checkstyle-report.xml"
197 >          out="${build.checkstyle.dir}/checkstyle-report.html"
198          style="${stylesheet.dir}/checkstyle-frames.xsl"/>
199  
200    </target>
201  
202 <  
202 >
203  
204    <target name="dist"
205            depends="init, dist-clean, dist-jar, dist-docs"
# Line 259 | Line 277
277      <echo>java.home is ${java.home}</echo>
278  
279    </target>
280 <  
281 <  
280 >
281 >
282    <target name="dist-jar"
283            depends="clean, jar">
284  
# Line 276 | Line 294
294  
295      <javac srcdir="${ant.src.dir}"
296            destdir="${build.ant.dir}"
297 <           source="1.4"
280 <    />
297 >           source="1.4"/>
298  
299    </target>
300  
# Line 396 | Line 413
413  
414        <compilerarg value="${bootclasspath.args}"/>
415        <compilerarg line="${build.args}"/>
416 <      
416 >
417        <classpath refid="test.classpath"/>
418  
419      </javac>
# Line 410 | Line 427
427               fork="true">
428  
429        <include name="jsr166/test/**"/>
430 <      
430 >
431        <compilerarg value="${bootclasspath.args}"/>
432        <compilerarg line="${build.args}"/>
433 <      
433 >
434        <classpath refid="test.classpath"/>
435  
436      </javac>
# Line 429 | Line 446
446  
447        <compilerarg value="${bootclasspath.args}"/>
448        <compilerarg line="${build.args}"/>
449 <      
449 >
450        <classpath refid="test.classpath"/>
451  
452      </javac>
# Line 456 | Line 473
473        <jvmarg value="${bootclasspath.args}"/>
474        <jvmarg value="-server"/>
475        <jvmarg value="-showversion"/>
476 <      
476 >
477        <classpath refid="test.classpath"/>
478  
479        <formatter type="xml"/>
# Line 466 | Line 483
483            <include name="**/${testcase}Test.java"/>
484          </fileset>
485        </batchtest>
486 <      
486 >
487        <batchtest todir="${build.reports.dir}" if="do.test.old">
488          <fileset dir="${test.src.dir}">
489            <include name="jsr166/test/**/${testcase}Test.java"/>
490          </fileset>
491        </batchtest>
492  
493 < <!--      
493 > <!--
494        <batchtest todir="${build.reports.dir}" if="do.test.jtreg">
495          <fileset dir="${jtreg.src.dir}">
496            <include name="**/${testcase}Test.java"/>
# Line 540 | Line 557
557      <available property="xalan.available"
558                 classname="org.apache.xalan.Version"/>
559  
560 <              
560 >
561      <!-- Ant 1.6beta and later don't need or want this check -->
562 <    <!--    
562 >    <!--
563      <fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests"
564            unless="junit.available"/>
565  
# Line 557 | Line 574
574    <!-- Anthill targets -->
575  
576    <target name="anthill-build">
577 <  
577 >
578      <!-- Override this in user.properties -->
579      <property name="tiger.home" location="e:/j2sdk1.5.0"/>
580 <    
580 >
581      <exec resultproperty="result.property" dir="${basedir}" executable="${tiger.home}/bin/java">
582        <arg value="-Xmx256000000"/>
583        <!-- classpath of new JVM -->
# Line 576 | Line 593
593        <arg value="do-anthill-build"/>
594      </exec>
595    </target>
596 <  
596 >
597    <target name="do-anthill-build"
598            depends="jar, test, docs, dist-docs"/>
599  
# Line 600 | Line 617
617    </target>
618  
619  
620 <  <!-- Standalone sample program -->
621 <  
622 <  <target name="sample" depends="">
623 <  
620 >
621 >  <!-- Various demos and test programs -->
622 >
623 >
624 >  <target name="sample" depends="init, configure-compiler"
625 >          description="Standalone demo program">
626 >
627      <mkdir dir="${build.testcases.dir}"/>
628 <    
628 >
629      <javac srcdir="${test.src.dir}"
630            destdir="${build.testcases.dir}"
631              debug="${build.debug}"
# Line 613 | Line 633
633        deprecation="${build.deprecation}"
634             source="${build.sourcelevel}"
635               fork="true">
636 <      
617 <      <!--
618 <      <compilerarg value="${bootclasspath.args}"/>
619 <      <compilerarg line="${build.args}"/>
620 <      
621 <      <classpath refid="test.classpath"/>
622 <      -->
623 <      
636 >
637        <include name="jsr166/test/Sample.java"/>
638 <      
638 >
639      </javac>
640 <    
640 >
641      <copy todir="${build.testcases.dir}">
642        <fileset dir="${test.src.dir}">
643          <include name="**/*.properties"/>
644        </fileset>
645      </copy>
646 <  
647 <            
646 >
647 >
648      <java classname="jsr166.test.Sample" fork="true">
636      <jvmarg value="${bootclasspath.args}"/>
637      <!-- <jvmarg value="-server"/> -->
638      <!-- <jvmarg value="-ea"/> -->
649        <classpath refid="test.classpath"/>
650 +      <!-- <jvmarg value="-ea"/> -->
651 +      <!-- <jvmarg value="-server"/> -->
652        <!-- <arg value="1000"/> -->
653      </java>
654    </target>
655  
656  
657 <  <!-- BoF demos -->
658 <  
659 <  <target name="j1" depends="jar">
660 <  
657 >  <target name="loops" depends="init, configure-compiler"
658 >          description="Benchmark from Doug Lea's AQS paper">
659 >
660 >    <mkdir dir="${build.loops.dir}"/>
661 >
662 >    <javac srcdir="${loops.src.dir}"
663 >          destdir="${build.loops.dir}"
664 >            debug="${build.debug}"
665 >       debuglevel="${build.debuglevel}"
666 >      deprecation="${build.deprecation}"
667 >           source="${build.sourcelevel}"
668 >             fork="true">
669 >
670 >      <compilerarg line="${build.args}"/>
671 >      <classpath refid="loops.classpath"/>
672 >
673 >    </javac>
674 >
675 >    <java classname="ALoops" fork="true">
676 >      <classpath refid="loops.classpath"/>
677 >    </java>
678 >
679 >  </target>
680 >
681 >
682 >  <target name="compile-j1" depends="init, configure-compiler">
683 >
684      <mkdir dir="${build.j1.dir}"/>
685 <    
685 >
686      <javac srcdir="${j1.src.dir}"
687            destdir="${build.j1.dir}"
688              debug="${build.debug}"
689         debuglevel="${build.debuglevel}"
690        deprecation="${build.deprecation}"
691 <           source="${build.sourcelevel}"
692 <             fork="true">
693 <            
694 <      <compilerarg value="${bootclasspath.args}"/>
691 >           source="${build.sourcelevel}" >
692 >
693 >      <include name="**/*.java"/>
694 >      <exclude name="**/dijkstra/**"/>
695 >
696        <compilerarg line="${build.args}"/>
661      
697        <classpath refid="j1.classpath"/>
698 <      
698 >
699      </javac>
700 <    
701 < <!--
702 <    <java classname="MainClass" fork="true">
703 <      <jvmarg value="${bootclasspath.args}"/>
700 >
701 >  </target>
702 >
703 >
704 >  <target name="sw" depends="compile-j1"
705 >          description="Runs the SwingWorker demo">
706 >
707 >    <!--
708 >    <java classname="jsr166.swing.SwingWorkerDemo" fork="true">
709        <classpath refid="j1.classpath"/>
710      </java>
711 < -->
711 >    -->
712 >
713 >    <copy todir="${build.j1.dir}" file="${j1.src.dir}/jsr166/swing/SwingWorker.html"/>
714 >
715 >    <exec dir="${build.j1.dir}" executable="appletviewer.exe">
716 >      <arg value="${build.j1.dir}/SwingWorker.html"/>
717 >    </exec>
718 >
719 >  </target>
720 >
721 >  <target name="j1" depends="compile-j1"
722 >          description="Runs a standalone JavaOne program">
723 >
724 >    <java classname="${j1.test}" fork="true">
725 >      <classpath refid="j1.classpath"/>
726 >      <jvmarg value="-client"/>
727 >
728 >      <!-- TestPseudoRandom args -->
729 >      <arg value="2"/>
730 >      <arg value="25"/>
731 >      <arg value="100000"/>
732 >
733 >      <!-- WebCrawler args -->
734 >      <!--
735 >      <arg value="jsr166.webcrawler.WebCrawler3"/>
736 >      <arg value="http://www.priorartisans.com"/>
737 >      <arg value="25"/>
738 >      -->
739 >
740 >    </java>
741 >
742 >  </target>
743 >
744 >
745 >  <target name="test-j1" depends="compile-j1"
746 >          description="Runs testcases from the JavaOne source directories">
747  
748      <junit printsummary="true"
749               showoutput="true"
# Line 677 | Line 752
752                      dir="${build.j1.dir}"
753                     fork="true">
754  
755 <      <jvmarg value="${bootclasspath.args}"/>
681 <      <jvmarg value="-server"/>
682 <      
755 >      <!-- <jvmarg value="-server"/> -->
756        <classpath refid="j1.classpath"/>
684
757        <formatter type="xml"/>
758  
759        <batchtest todir="${build.j1.dir}">
# Line 692 | Line 764
764  
765      </junit>
766  
695    <!-- Sets junit.report.format to frames if redirection is present,
696         otherwise sets it to noframes. -->
767      <available property="junit.report.format"
768                    value="frames"
769 <              classname="org.apache.xalan.lib.Redirect"
700 <    />
769 >              classname="org.apache.xalan.lib.Redirect"/>
770      <property name="junit.report.format" value="noframes"/>
771  
772      <junitreport todir="${build.j1.dir}">
# Line 714 | Line 783
783  
784    </target>
785  
786 <  
787 <  
786 >
787 >
788    <!-- C++ and JNI definitions and demos -->
789 <  
789 >
790    <target name="configure-cpp">
791  
792      <!-- Define tasks and types -->
793 <    
793 >
794      <path id="cpptasks.path">
795        <pathelement location="${lib.dir}/cpptasks.jar"/>
796      </path>
797      <taskdef resource="cpptasks.tasks" classpathref="cpptasks.path"/>
798      <typedef resource="cpptasks.types" classpathref="cpptasks.path"/>
799 <    
799 >
800      <!-- Set platform property for JNI includes -->
801 <    
801 >
802      <condition property="platform" value="linux">
803        <os name="Linux"/>
804      </condition>
# Line 739 | Line 808
808      <condition property="platform" value="solaris">
809        <os name="SunOS"/>
810      </condition>
811 <    
811 >
812    </target>
813 <  
814 <  
813 >
814 >
815    <target name="cppdemo" depends="configure-cpp">
816 <  
816 >
817      <mkdir dir="${build.dir}"/>
818 <    
818 >
819      <cc multithreaded="true"
820 <                 name="g++"
820 >                 name="g++"
821                 objdir="${build.dir}"
822                outfile="${build.dir}/CppDemo">
823        <fileset dir="${test.src.dir}" includes="CppDemo.cpp"/>
824        <libset libs="stdc++"/>
825      </cc>
826 <    
826 >
827      <exec executable="${build.dir}/CppDemo">
828        <arg line="count in word frequency of word in command line count"/>
829      </exec>
830 <    
830 >
831    </target>
832 <  
833 <  
832 >
833 >
834    <target name="jnidemo" depends="init, configure-compiler, configure-cpp">
835 <  
835 >
836      <mkdir dir="${build.testcases.dir}"/>
837 <    
837 >
838      <javac srcdir="${test.src.dir}"
839            destdir="${build.testcases.dir}"
840              debug="${build.debug}"
# Line 778 | Line 847
847        <classpath refid="test.classpath"/>
848        <include name="JniDemo.java"/>
849      </javac>
850 <    
850 >
851      <javah destdir="${build.testcases.dir}"
852        classpathref="test.classpath">
853        <class name="JniDemo"/>
854      </javah>
855 <    
855 >
856      <cc multithreaded="true"
857 <                 name="g++"
857 >                 name="g++"
858                 objdir="${build.dir}"
859                outfile="${build.dir}/JniDemo"
860                outtype="shared">
861 <              
861 >
862        <compiler>
863          <defineset>
864            <define name="__int64" value="long long"/>
# Line 798 | Line 867
867          <includepath location="${java.home}/../include/${platform}"/>
868          <compilerarg value="-mno-cygwin"/>
869        </compiler>
870 <      
870 >
871        <linker>
872          <linkerarg value="--add-stdcall-alias"/>
873        </linker>
874 <      
874 >
875        <includepath location="${build.testcases.dir}"/>
876 <      
876 >
877        <fileset dir="${test.src.dir}" includes="JniDemo.cpp"/>
878 <      
878 >
879        <libset libs="stdc++"/>
880 <      
880 >
881      </cc>
882 <    
882 >
883      <!-- Necessary if windows, harmless if not -->
884      <copy file="${build.dir}/libJniDemo.so" tofile="${build.dir}/JniDemo.dll"/>
885 <    
885 >
886      <java classname="JniDemo" fork="true">
887        <!-- Watch out: path separator hardwired to semicolon here! -->
888        <sysproperty key="java.library.path" path="${java.library.path};${build.dir}"/>
889        <classpath refid="test.classpath"/>
890        <arg line="count in word frequency of word in command line count"/>
891      </java>
892 <    
892 >
893    </target>
894  
895  
# Line 833 | Line 902
902    <property name="build.pretiger.dir"   location="${build.dir}/pretiger/classes"/>
903    <property name="pretiger.jar"         location="${build.lib.dir}/jsr166-pretiger.jar"/>
904    <property name="pretiger.sourcelevel" value="1.4"/>
905 <  
906 <  <target name="defang"
905 >
906 >  <target name="defang"
907         depends="init"
908     description="Generates pre-Tiger compatible source">
909 <  
909 >
910      <delete dir="${pretiger.src.dir}"/>
911      <mkdir dir="${pretiger.src.dir}"/>
912 <  
912 >
913      <exec executable="perl">
914        <arg file="etc/defang.pl"/>
915        <!-- <arg value="-v"/> -->
916        <arg value="-s"/> <arg file="${src.dir}"/>
917        <arg value="-t"/> <arg file="${pretiger.src.dir}"/>
918      </exec>
919 <    
919 >
920    </target>
921  
922    <target name="compile-pretiger"
# Line 870 | Line 939
939      </javac>
940  
941    </target>
942 <  
942 >
943    <target name="pretiger" depends="compile-pretiger">
944  
945      <mkdir dir="${build.lib.dir}"/>
946 <    
946 >
947      <jar destfile="${pretiger.jar}">
948        <fileset dir="${build.pretiger.dir}">
949        </fileset>
950      </jar>
951 <    
951 >
952 >  </target>
953 >
954 >  <!-- jsr166x -->
955 >
956 >
957 >  <target name="jsr166xcompile"
958 >          depends="init, configure-compiler"
959 >          description="Compiles jsr166x sources">
960 >
961 >    <mkdir dir="${build.jsr166x.dir}"/>
962 >
963 >    <javac srcdir="${jsr166xsrc.dir}"
964 >          destdir="${build.jsr166x.dir}"
965 >            debug="${build.debug}"
966 >       debuglevel="${build.debuglevel}"
967 >      deprecation="${build.deprecation}"
968 >           source="${build.sourcelevel}"
969 >             fork="true">
970 >
971 >      <include name="**/*.java"/>
972 >      <compilerarg line="${build.args}"/>
973 >
974 >    </javac>
975 >
976 >  </target>
977 >
978 >
979 >
980 >  <target name="jsr166xjar"
981 >          depends="jsr166xcompile"
982 >          description="Builds library jar from compiled sources">
983 >
984 >    <mkdir dir="${build.jsr166xlib.dir}"/>
985 >
986 >    <jar destfile="${jsr166xproduct.jar}">
987 >      <fileset dir="${build.jsr166x.dir}"/>
988 >    </jar>
989 >
990 >  </target>
991 >
992 >
993 >
994 >  <target name="jsr166xdocs"
995 >          description="Builds javadocs with custom tags to build folder">
996 >
997 >    <delete dir="${build.jsr166xjavadocs.dir}"/>
998 >    <mkdir dir="${build.jsr166xjavadocs.dir}"/>
999 >
1000 >    <javadoc destdir="${build.jsr166xjavadocs.dir}"
1001 >                link="http://java.sun.com/j2se/1.5.0/docs/api/"
1002 >    >
1003 >      <packageset dir="${topsrc.dir}" defaultexcludes="yes">
1004 >      <include name="jsr166x"/>
1005 >      </packageset>
1006 >
1007 >
1008 >    </javadoc>
1009 >
1010 >  </target>
1011 >
1012 >
1013 >  <target name="jsr166xdist"
1014 >          depends="jsr166xdist-clean, jsr166xdist-jar, jsr166xdist-docs"
1015 >          description="Puts all distributable products in single hierarchy"/>
1016 >
1017 >
1018 >
1019 >  <target name="jsr166xclean"
1020 >          description="Removes all build products">
1021 >
1022 >    <delete dir="${build.jsr166x.dir}"/>
1023 >    <delete dir="${build.jsr166xlib.dir}"/>
1024 >
1025 >  </target>
1026 >
1027 >
1028 >
1029 >  <target name="jsr166xdist-clean"
1030 >          description="Removes all build and distribution products">
1031 >
1032 >  </target>
1033 >
1034 >
1035 >
1036 >  <target name="jsr166xdist-docs"
1037 >          description="Builds javadocs without custom tags to dist folder">
1038 >
1039 >    <delete dir="${dist.jsr166xjavadocs.dir}"/>
1040 >    <mkdir dir="${dist.jsr166xjavadocs.dir}"/>
1041 >
1042 >    <javadoc destdir="${dist.jsr166xjavadocs.dir}"
1043 >                link="http://java.sun.com/j2se/1.5.0/docs/api/"
1044 >              source="${build.sourcelevel}">
1045 >
1046 >      <packageset dir="${topsrc.dir}" defaultexcludes="yes">
1047 >      <include name="jsr166x"/>
1048 >      </packageset>
1049 >
1050 >    </javadoc>
1051 >
1052 >  </target>
1053 >
1054 >  <target name="jsr166xdist-jar"
1055 >          depends="jsr166xclean, jsr166xjar">
1056 >
1057 >    <copy file="${jsr166xproduct.jar}" todir="${dist.dir}"/>
1058 >
1059    </target>
1060  
1061   </project>

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines