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.63 by tim, Sat Dec 13 20:45:41 2003 UTC vs.
Revision 1.68 by jsr166, Mon Jun 14 17:22:09 2004 UTC

# Line 30 | Line 30
30    <property name="build.dir"            location="build"/>
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 42 | Line 44
44    <!-- Source locations -->
45    <property name="src.dir"              location="${basedir}/src/main"/>
46    <property name="test.src.dir"         location="${basedir}/src/test"/>
47 +  <property name="j1.src.dir"           location="${basedir}/src/javaone"/>
48 +  <property name="loops.src.dir"        location="${basedir}/src/loops"/>
49    <property name="tck.src.dir"          location="${test.src.dir}/tck"/>
50    <property name="jtreg.src.dir"        location="${test.src.dir}/jtreg"/>
51    <property name="ant.src.dir"          location="${basedir}/etc/ant"/>
# Line 55 | Line 59
59    <!-- Jar locations -->
60    <property name="product.jar"          location="${build.lib.dir}/jsr166.jar"/>
61    <property name="junit.jar"            location="${lib.dir}/junit.jar"/>
62 <  
62 >  <property name="concurrent.jar"       location="${lib.dir}/concurrent.jar"/>
63 >
64    <!-- Bootclasspath argument -->
65    <property name="bootclasspath.args"   value="-Xbootclasspath/p:${product.jar}"/>
66  
# Line 65 | Line 70
70      <pathelement location="${junit.jar}"/>
71    </path>
72  
73 +  <!-- ALoops classpath -->
74 +  <path id="loops.classpath">
75 +    <pathelement location="${build.loops.dir}"/>
76 +  </path>
77 +
78 +  <!-- J1 classpath -->
79 +  <path id="j1.classpath">
80 +    <pathelement location="${build.j1.dir}"/>
81 +    <pathelement location="${junit.jar}"/>
82 +    <pathelement location="${concurrent.jar}"/>
83 +  </path>
84 +
85  
86    <!-- Main targets -->
87  
# Line 83 | Line 100
100             source="${build.sourcelevel}"
101               fork="true">
102  
103 +      <include name="**/*.java"/>
104 +      <exclude name="java/lang/**"/>
105        <compilerarg line="${build.args}"/>
106  
107      </javac>
# Line 160 | Line 179
179              classpath="${lib.dir}/checkstyle-all-3.1.jar"/>
180  
181      <mkdir dir="${build.checkstyle.dir}"/>
182 <    
182 >
183      <checkstyle config="etc/checkstyle/sun_checks.xml"
184         failOnViolation="false">
185 <      <formatter type="xml" toFile="${build.checkstyle.dir}/checkstyle-report.xml"/>
185 >      <formatter type="xml" toFile="${build.checkstyle.dir}/checkstyle-report.xml"/>
186        <fileset dir="${build.filter.src.dir}" includes="**/*.java"/>
187      </checkstyle>
188 <    
189 <    <style in="${build.checkstyle.dir}/checkstyle-report.xml"
190 <          out="${build.checkstyle.dir}/checkstyle-report.html"
188 >
189 >    <style in="${build.checkstyle.dir}/checkstyle-report.xml"
190 >          out="${build.checkstyle.dir}/checkstyle-report.html"
191          style="${stylesheet.dir}/checkstyle-frames.xsl"/>
192  
193    </target>
194  
195 <  
195 >
196  
197    <target name="dist"
198            depends="init, dist-clean, dist-jar, dist-docs"
# Line 251 | Line 270
270      <echo>java.home is ${java.home}</echo>
271  
272    </target>
273 <  
274 <  
273 >
274 >
275    <target name="dist-jar"
276            depends="clean, jar">
277  
# Line 268 | Line 287
287  
288      <javac srcdir="${ant.src.dir}"
289            destdir="${build.ant.dir}"
290 <           source="1.4"
272 <    />
290 >           source="1.4"/>
291  
292    </target>
293  
# Line 388 | Line 406
406  
407        <compilerarg value="${bootclasspath.args}"/>
408        <compilerarg line="${build.args}"/>
409 <      
409 >
410        <classpath refid="test.classpath"/>
411  
412      </javac>
# Line 402 | Line 420
420               fork="true">
421  
422        <include name="jsr166/test/**"/>
423 <      
423 >
424        <compilerarg value="${bootclasspath.args}"/>
425        <compilerarg line="${build.args}"/>
426 <      
426 >
427        <classpath refid="test.classpath"/>
428  
429      </javac>
# Line 421 | Line 439
439  
440        <compilerarg value="${bootclasspath.args}"/>
441        <compilerarg line="${build.args}"/>
442 <      
442 >
443        <classpath refid="test.classpath"/>
444  
445      </javac>
# Line 446 | Line 464
464                     fork="true">
465  
466        <jvmarg value="${bootclasspath.args}"/>
467 <      
467 >      <jvmarg value="-server"/>
468 >      <jvmarg value="-showversion"/>
469 >
470        <classpath refid="test.classpath"/>
471  
472        <formatter type="xml"/>
# Line 456 | Line 476
476            <include name="**/${testcase}Test.java"/>
477          </fileset>
478        </batchtest>
479 <      
479 >
480        <batchtest todir="${build.reports.dir}" if="do.test.old">
481          <fileset dir="${test.src.dir}">
482            <include name="jsr166/test/**/${testcase}Test.java"/>
483          </fileset>
484        </batchtest>
485  
486 < <!--      
486 > <!--
487        <batchtest todir="${build.reports.dir}" if="do.test.jtreg">
488          <fileset dir="${jtreg.src.dir}">
489            <include name="**/${testcase}Test.java"/>
# Line 530 | Line 550
550      <available property="xalan.available"
551                 classname="org.apache.xalan.Version"/>
552  
553 <              
553 >
554      <!-- Ant 1.6beta and later don't need or want this check -->
555 <    <!--    
555 >    <!--
556      <fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests"
557            unless="junit.available"/>
558  
# Line 547 | Line 567
567    <!-- Anthill targets -->
568  
569    <target name="anthill-build">
570 <  
570 >
571      <!-- Override this in user.properties -->
572      <property name="tiger.home" location="e:/j2sdk1.5.0"/>
573 <    
573 >
574      <exec resultproperty="result.property" dir="${basedir}" executable="${tiger.home}/bin/java">
575        <arg value="-Xmx256000000"/>
576        <!-- classpath of new JVM -->
# Line 566 | Line 586
586        <arg value="do-anthill-build"/>
587      </exec>
588    </target>
589 <  
589 >
590    <target name="do-anthill-build"
591            depends="jar, test, docs, dist-docs"/>
592  
# Line 590 | Line 610
610    </target>
611  
612  
613 <  <!-- Standalone sample program -->
614 <  
615 <  <target name="sample" depends="jar">
616 <  
613 >
614 >  <!-- Various demos and test programs -->
615 >
616 >
617 >  <target name="sample" depends="init, configure-compiler"
618 >          description="Standalone demo program">
619 >
620      <mkdir dir="${build.testcases.dir}"/>
621 <    
621 >
622      <javac srcdir="${test.src.dir}"
623            destdir="${build.testcases.dir}"
624              debug="${build.debug}"
# Line 603 | Line 626
626        deprecation="${build.deprecation}"
627             source="${build.sourcelevel}"
628               fork="true">
629 <            
607 <      <compilerarg value="${bootclasspath.args}"/>
608 <      <compilerarg line="${build.args}"/>
609 <      
610 <      <classpath refid="test.classpath"/>
611 <      
629 >
630        <include name="jsr166/test/Sample.java"/>
631 <      
631 >
632      </javac>
633 <    
634 <            
633 >
634 >    <copy todir="${build.testcases.dir}">
635 >      <fileset dir="${test.src.dir}">
636 >        <include name="**/*.properties"/>
637 >      </fileset>
638 >    </copy>
639 >
640 >
641      <java classname="jsr166.test.Sample" fork="true">
618      <jvmarg value="${bootclasspath.args}"/>
642        <classpath refid="test.classpath"/>
643 +      <!-- <jvmarg value="-ea"/> -->
644 +      <!-- <jvmarg value="-server"/> -->
645 +      <!-- <arg value="1000"/> -->
646 +    </java>
647 +  </target>
648 +
649 +
650 +  <target name="loops" depends="init, configure-compiler"
651 +          description="Benchmark from Doug Lea's AQS paper">
652 +
653 +    <mkdir dir="${build.loops.dir}"/>
654 +
655 +    <javac srcdir="${loops.src.dir}"
656 +          destdir="${build.loops.dir}"
657 +            debug="${build.debug}"
658 +       debuglevel="${build.debuglevel}"
659 +      deprecation="${build.deprecation}"
660 +           source="${build.sourcelevel}"
661 +             fork="true">
662 +
663 +      <compilerarg line="${build.args}"/>
664 +      <classpath refid="loops.classpath"/>
665 +
666 +    </javac>
667 +
668 +    <java classname="ALoops" fork="true">
669 +      <classpath refid="loops.classpath"/>
670 +    </java>
671 +
672 +  </target>
673 +
674 +
675 +  <target name="compile-j1" depends="init, configure-compiler">
676 +
677 +    <mkdir dir="${build.j1.dir}"/>
678 +
679 +    <javac srcdir="${j1.src.dir}"
680 +          destdir="${build.j1.dir}"
681 +            debug="${build.debug}"
682 +       debuglevel="${build.debuglevel}"
683 +      deprecation="${build.deprecation}"
684 +           source="${build.sourcelevel}" >
685 +
686 +      <include name="**/*.java"/>
687 +      <exclude name="**/dijkstra/**"/>
688 +
689 +      <compilerarg line="${build.args}"/>
690 +      <classpath refid="j1.classpath"/>
691 +
692 +    </javac>
693 +
694 +  </target>
695 +
696 +
697 +  <target name="sw" depends="compile-j1"
698 +          description="Runs the SwingWorker demo">
699 +
700 +    <!--
701 +    <java classname="jsr166.swing.SwingWorkerDemo" fork="true">
702 +      <classpath refid="j1.classpath"/>
703 +    </java>
704 +    -->
705 +
706 +    <copy todir="${build.j1.dir}" file="${j1.src.dir}/jsr166/swing/SwingWorker.html"/>
707 +
708 +    <exec dir="${build.j1.dir}" executable="appletviewer.exe">
709 +      <arg value="${build.j1.dir}/SwingWorker.html"/>
710 +    </exec>
711 +
712 +  </target>
713 +
714 +  <target name="j1" depends="compile-j1"
715 +          description="Runs a standalone JavaOne program">
716 +
717 +    <java classname="${j1.test}" fork="true">
718 +      <classpath refid="j1.classpath"/>
719 +      <jvmarg value="-client"/>
720 +
721 +      <!-- WebCrawler args -->
722 +      <arg value="jsr166.webcrawler.WebCrawler3"/>
723 +      <arg value="http://www.priorartisans.com"/>
724 +      <arg value="25"/>
725 +
726      </java>
727 +
728 +  </target>
729 +
730 +
731 +  <target name="test-j1" depends="compile-j1"
732 +          description="Runs testcases from the JavaOne source directories">
733 +
734 +    <junit printsummary="true"
735 +             showoutput="true"
736 +          errorProperty="junit.failed"
737 +        failureProperty="junit.failed"
738 +                    dir="${build.j1.dir}"
739 +                   fork="true">
740 +
741 +      <!-- <jvmarg value="-server"/> -->
742 +      <classpath refid="j1.classpath"/>
743 +      <formatter type="xml"/>
744 +
745 +      <batchtest todir="${build.j1.dir}">
746 +        <fileset dir="${j1.src.dir}">
747 +          <include name="**/*Test.java"/>
748 +        </fileset>
749 +      </batchtest>
750 +
751 +    </junit>
752 +
753 +    <available property="junit.report.format"
754 +                  value="frames"
755 +              classname="org.apache.xalan.lib.Redirect"/>
756 +    <property name="junit.report.format" value="noframes"/>
757 +
758 +    <junitreport todir="${build.j1.dir}">
759 +      <fileset dir="${build.j1.dir}">
760 +        <include name="TEST-*.xml"/>
761 +      </fileset>
762 +      <report styledir="${stylesheet.dir}"
763 +                format="${junit.report.format}"
764 +                 todir="${build.j1.dir}"
765 +      />
766 +    </junitreport>
767 +
768 +    <fail message="Test Cases Failed" if="junit.failed"/>
769 +
770    </target>
771  
772 <  
773 <  
772 >
773 >
774    <!-- C++ and JNI definitions and demos -->
775 <  
775 >
776    <target name="configure-cpp">
777  
778      <!-- Define tasks and types -->
779 <    
779 >
780      <path id="cpptasks.path">
781        <pathelement location="${lib.dir}/cpptasks.jar"/>
782      </path>
783      <taskdef resource="cpptasks.tasks" classpathref="cpptasks.path"/>
784      <typedef resource="cpptasks.types" classpathref="cpptasks.path"/>
785 <    
785 >
786      <!-- Set platform property for JNI includes -->
787 <    
787 >
788      <condition property="platform" value="linux">
789        <os name="Linux"/>
790      </condition>
# Line 645 | Line 794
794      <condition property="platform" value="solaris">
795        <os name="SunOS"/>
796      </condition>
797 <    
797 >
798    </target>
799 <  
800 <  
799 >
800 >
801    <target name="cppdemo" depends="configure-cpp">
802 <  
802 >
803      <mkdir dir="${build.dir}"/>
804 <    
804 >
805      <cc multithreaded="true"
806 <                 name="g++"
806 >                 name="g++"
807                 objdir="${build.dir}"
808                outfile="${build.dir}/CppDemo">
809        <fileset dir="${test.src.dir}" includes="CppDemo.cpp"/>
810        <libset libs="stdc++"/>
811      </cc>
812 <    
812 >
813      <exec executable="${build.dir}/CppDemo">
814        <arg line="count in word frequency of word in command line count"/>
815      </exec>
816 <    
816 >
817    </target>
818 <  
819 <  
818 >
819 >
820    <target name="jnidemo" depends="init, configure-compiler, configure-cpp">
821 <  
821 >
822      <mkdir dir="${build.testcases.dir}"/>
823 <    
823 >
824      <javac srcdir="${test.src.dir}"
825            destdir="${build.testcases.dir}"
826              debug="${build.debug}"
# Line 684 | Line 833
833        <classpath refid="test.classpath"/>
834        <include name="JniDemo.java"/>
835      </javac>
836 <    
836 >
837      <javah destdir="${build.testcases.dir}"
838        classpathref="test.classpath">
839        <class name="JniDemo"/>
840      </javah>
841 <    
841 >
842      <cc multithreaded="true"
843 <                 name="g++"
843 >                 name="g++"
844                 objdir="${build.dir}"
845                outfile="${build.dir}/JniDemo"
846                outtype="shared">
847 <              
847 >
848        <compiler>
849          <defineset>
850            <define name="__int64" value="long long"/>
# Line 704 | Line 853
853          <includepath location="${java.home}/../include/${platform}"/>
854          <compilerarg value="-mno-cygwin"/>
855        </compiler>
856 <      
856 >
857        <linker>
858          <linkerarg value="--add-stdcall-alias"/>
859        </linker>
860 <      
860 >
861        <includepath location="${build.testcases.dir}"/>
862 <      
862 >
863        <fileset dir="${test.src.dir}" includes="JniDemo.cpp"/>
864 <      
864 >
865        <libset libs="stdc++"/>
866 <      
866 >
867      </cc>
868 <    
868 >
869      <!-- Necessary if windows, harmless if not -->
870      <copy file="${build.dir}/libJniDemo.so" tofile="${build.dir}/JniDemo.dll"/>
871 <    
871 >
872      <java classname="JniDemo" fork="true">
873        <!-- Watch out: path separator hardwired to semicolon here! -->
874        <sysproperty key="java.library.path" path="${java.library.path};${build.dir}"/>
875        <classpath refid="test.classpath"/>
876 +      <arg line="count in word frequency of word in command line count"/>
877      </java>
878 <    
878 >
879    </target>
880  
881  
# Line 738 | Line 888
888    <property name="build.pretiger.dir"   location="${build.dir}/pretiger/classes"/>
889    <property name="pretiger.jar"         location="${build.lib.dir}/jsr166-pretiger.jar"/>
890    <property name="pretiger.sourcelevel" value="1.4"/>
891 <  
892 <  <target name="defang"
891 >
892 >  <target name="defang"
893         depends="init"
894     description="Generates pre-Tiger compatible source">
895 <  
895 >
896      <delete dir="${pretiger.src.dir}"/>
897      <mkdir dir="${pretiger.src.dir}"/>
898 <  
898 >
899      <exec executable="perl">
900        <arg file="etc/defang.pl"/>
901        <!-- <arg value="-v"/> -->
902        <arg value="-s"/> <arg file="${src.dir}"/>
903        <arg value="-t"/> <arg file="${pretiger.src.dir}"/>
904      </exec>
905 <    
905 >
906    </target>
907  
908    <target name="compile-pretiger"
# Line 775 | Line 925
925      </javac>
926  
927    </target>
928 <  
928 >
929    <target name="pretiger" depends="compile-pretiger">
930  
931      <mkdir dir="${build.lib.dir}"/>
932 <    
932 >
933      <jar destfile="${pretiger.jar}">
934        <fileset dir="${build.pretiger.dir}">
935        </fileset>
936      </jar>
937 <    
937 >
938    </target>
939  
940   </project>

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines