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.66 by jsr166, Sun Apr 11 01:37:41 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 160 | Line 177
177              classpath="${lib.dir}/checkstyle-all-3.1.jar"/>
178  
179      <mkdir dir="${build.checkstyle.dir}"/>
180 <    
180 >
181      <checkstyle config="etc/checkstyle/sun_checks.xml"
182         failOnViolation="false">
183 <      <formatter type="xml" toFile="${build.checkstyle.dir}/checkstyle-report.xml"/>
183 >      <formatter type="xml" toFile="${build.checkstyle.dir}/checkstyle-report.xml"/>
184        <fileset dir="${build.filter.src.dir}" includes="**/*.java"/>
185      </checkstyle>
186 <    
187 <    <style in="${build.checkstyle.dir}/checkstyle-report.xml"
188 <          out="${build.checkstyle.dir}/checkstyle-report.html"
186 >
187 >    <style in="${build.checkstyle.dir}/checkstyle-report.xml"
188 >          out="${build.checkstyle.dir}/checkstyle-report.html"
189          style="${stylesheet.dir}/checkstyle-frames.xsl"/>
190  
191    </target>
192  
193 <  
193 >
194  
195    <target name="dist"
196            depends="init, dist-clean, dist-jar, dist-docs"
# Line 251 | Line 268
268      <echo>java.home is ${java.home}</echo>
269  
270    </target>
271 <  
272 <  
271 >
272 >
273    <target name="dist-jar"
274            depends="clean, jar">
275  
# Line 268 | Line 285
285  
286      <javac srcdir="${ant.src.dir}"
287            destdir="${build.ant.dir}"
288 <           source="1.4"
272 <    />
288 >           source="1.4"/>
289  
290    </target>
291  
# Line 388 | Line 404
404  
405        <compilerarg value="${bootclasspath.args}"/>
406        <compilerarg line="${build.args}"/>
407 <      
407 >
408        <classpath refid="test.classpath"/>
409  
410      </javac>
# Line 402 | Line 418
418               fork="true">
419  
420        <include name="jsr166/test/**"/>
421 <      
421 >
422        <compilerarg value="${bootclasspath.args}"/>
423        <compilerarg line="${build.args}"/>
424 <      
424 >
425        <classpath refid="test.classpath"/>
426  
427      </javac>
# Line 421 | Line 437
437  
438        <compilerarg value="${bootclasspath.args}"/>
439        <compilerarg line="${build.args}"/>
440 <      
440 >
441        <classpath refid="test.classpath"/>
442  
443      </javac>
# Line 446 | Line 462
462                     fork="true">
463  
464        <jvmarg value="${bootclasspath.args}"/>
465 <      
465 >      <jvmarg value="-server"/>
466 >      <jvmarg value="-showversion"/>
467 >
468        <classpath refid="test.classpath"/>
469  
470        <formatter type="xml"/>
# Line 456 | Line 474
474            <include name="**/${testcase}Test.java"/>
475          </fileset>
476        </batchtest>
477 <      
477 >
478        <batchtest todir="${build.reports.dir}" if="do.test.old">
479          <fileset dir="${test.src.dir}">
480            <include name="jsr166/test/**/${testcase}Test.java"/>
481          </fileset>
482        </batchtest>
483  
484 < <!--      
484 > <!--
485        <batchtest todir="${build.reports.dir}" if="do.test.jtreg">
486          <fileset dir="${jtreg.src.dir}">
487            <include name="**/${testcase}Test.java"/>
# Line 530 | Line 548
548      <available property="xalan.available"
549                 classname="org.apache.xalan.Version"/>
550  
551 <              
551 >
552      <!-- Ant 1.6beta and later don't need or want this check -->
553 <    <!--    
553 >    <!--
554      <fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests"
555            unless="junit.available"/>
556  
# Line 547 | Line 565
565    <!-- Anthill targets -->
566  
567    <target name="anthill-build">
568 <  
568 >
569      <!-- Override this in user.properties -->
570      <property name="tiger.home" location="e:/j2sdk1.5.0"/>
571 <    
571 >
572      <exec resultproperty="result.property" dir="${basedir}" executable="${tiger.home}/bin/java">
573        <arg value="-Xmx256000000"/>
574        <!-- classpath of new JVM -->
# Line 566 | Line 584
584        <arg value="do-anthill-build"/>
585      </exec>
586    </target>
587 <  
587 >
588    <target name="do-anthill-build"
589            depends="jar, test, docs, dist-docs"/>
590  
# Line 590 | Line 608
608    </target>
609  
610  
611 <  <!-- Standalone sample program -->
612 <  
613 <  <target name="sample" depends="jar">
614 <  
611 >
612 >  <!-- Various demos and test programs -->
613 >
614 >
615 >  <target name="sample" depends="init, configure-compiler"
616 >          description="Standalone demo program">
617 >
618      <mkdir dir="${build.testcases.dir}"/>
619 <    
619 >
620      <javac srcdir="${test.src.dir}"
621            destdir="${build.testcases.dir}"
622              debug="${build.debug}"
# Line 603 | Line 624
624        deprecation="${build.deprecation}"
625             source="${build.sourcelevel}"
626               fork="true">
627 <            
607 <      <compilerarg value="${bootclasspath.args}"/>
608 <      <compilerarg line="${build.args}"/>
609 <      
610 <      <classpath refid="test.classpath"/>
611 <      
627 >
628        <include name="jsr166/test/Sample.java"/>
629 <      
629 >
630      </javac>
631 <    
632 <            
631 >
632 >    <copy todir="${build.testcases.dir}">
633 >      <fileset dir="${test.src.dir}">
634 >        <include name="**/*.properties"/>
635 >      </fileset>
636 >    </copy>
637 >
638 >
639      <java classname="jsr166.test.Sample" fork="true">
618      <jvmarg value="${bootclasspath.args}"/>
640        <classpath refid="test.classpath"/>
641 +      <!-- <jvmarg value="-ea"/> -->
642 +      <!-- <jvmarg value="-server"/> -->
643 +      <!-- <arg value="1000"/> -->
644      </java>
645    </target>
646  
647 <  
648 <  
647 >
648 >  <target name="loops" depends="init, configure-compiler"
649 >          description="Benchmark from Doug Lea's AQS paper">
650 >
651 >    <mkdir dir="${build.loops.dir}"/>
652 >
653 >    <javac srcdir="${loops.src.dir}"
654 >          destdir="${build.loops.dir}"
655 >            debug="${build.debug}"
656 >       debuglevel="${build.debuglevel}"
657 >      deprecation="${build.deprecation}"
658 >           source="${build.sourcelevel}"
659 >             fork="true">
660 >
661 >      <compilerarg line="${build.args}"/>
662 >      <classpath refid="loops.classpath"/>
663 >
664 >    </javac>
665 >
666 >    <java classname="ALoops" fork="true">
667 >      <classpath refid="loops.classpath"/>
668 >    </java>
669 >
670 >  </target>
671 >
672 >
673 >  <target name="compile-j1" depends="init, configure-compiler">
674 >
675 >    <mkdir dir="${build.j1.dir}"/>
676 >
677 >    <javac srcdir="${j1.src.dir}"
678 >          destdir="${build.j1.dir}"
679 >            debug="${build.debug}"
680 >       debuglevel="${build.debuglevel}"
681 >      deprecation="${build.deprecation}"
682 >           source="${build.sourcelevel}" >
683 >
684 >      <include name="**/*.java"/>
685 >      <exclude name="**/dijkstra/**"/>
686 >
687 >      <compilerarg line="${build.args}"/>
688 >      <classpath refid="j1.classpath"/>
689 >
690 >    </javac>
691 >
692 >  </target>
693 >
694 >
695 >  <target name="sw" depends="compile-j1"
696 >          description="Runs the SwingWorker demo">
697 >
698 >    <!--
699 >    <java classname="jsr166.swing.SwingWorkerDemo" fork="true">
700 >      <classpath refid="j1.classpath"/>
701 >    </java>
702 >    -->
703 >
704 >    <copy todir="${build.j1.dir}" file="${j1.src.dir}/jsr166/swing/SwingWorker.html"/>
705 >
706 >    <exec dir="${build.j1.dir}" executable="appletviewer.exe">
707 >      <arg value="${build.j1.dir}/SwingWorker.html"/>
708 >    </exec>
709 >
710 >  </target>
711 >
712 >  <target name="j1" depends="compile-j1"
713 >          description="Runs a standalone JavaOne program">
714 >
715 >    <java classname="jsr166.bbuf.BoundedBufferDemo" fork="true">
716 >      <classpath refid="j1.classpath"/>
717 >      <jvmarg value="-server"/>
718 >      <arg value="http://www.perl.com/"/>
719 >      <arg value="1"/>
720 >    </java>
721 >
722 >  </target>
723 >
724 >
725 >  <target name="test-j1" depends="compile-j1"
726 >          description="Runs testcases from the JavaOne source directories">
727 >
728 >    <junit printsummary="true"
729 >             showoutput="true"
730 >          errorProperty="junit.failed"
731 >        failureProperty="junit.failed"
732 >                    dir="${build.j1.dir}"
733 >                   fork="true">
734 >
735 >      <!-- <jvmarg value="-server"/> -->
736 >      <classpath refid="j1.classpath"/>
737 >      <formatter type="xml"/>
738 >
739 >      <batchtest todir="${build.j1.dir}">
740 >        <fileset dir="${j1.src.dir}">
741 >          <include name="**/*Test.java"/>
742 >        </fileset>
743 >      </batchtest>
744 >
745 >    </junit>
746 >
747 >    <available property="junit.report.format"
748 >                  value="frames"
749 >              classname="org.apache.xalan.lib.Redirect"/>
750 >    <property name="junit.report.format" value="noframes"/>
751 >
752 >    <junitreport todir="${build.j1.dir}">
753 >      <fileset dir="${build.j1.dir}">
754 >        <include name="TEST-*.xml"/>
755 >      </fileset>
756 >      <report styledir="${stylesheet.dir}"
757 >                format="${junit.report.format}"
758 >                 todir="${build.j1.dir}"
759 >      />
760 >    </junitreport>
761 >
762 >    <fail message="Test Cases Failed" if="junit.failed"/>
763 >
764 >  </target>
765 >
766 >
767 >
768    <!-- C++ and JNI definitions and demos -->
769 <  
769 >
770    <target name="configure-cpp">
771  
772      <!-- Define tasks and types -->
773 <    
773 >
774      <path id="cpptasks.path">
775        <pathelement location="${lib.dir}/cpptasks.jar"/>
776      </path>
777      <taskdef resource="cpptasks.tasks" classpathref="cpptasks.path"/>
778      <typedef resource="cpptasks.types" classpathref="cpptasks.path"/>
779 <    
779 >
780      <!-- Set platform property for JNI includes -->
781 <    
781 >
782      <condition property="platform" value="linux">
783        <os name="Linux"/>
784      </condition>
# Line 645 | Line 788
788      <condition property="platform" value="solaris">
789        <os name="SunOS"/>
790      </condition>
791 <    
791 >
792    </target>
793 <  
794 <  
793 >
794 >
795    <target name="cppdemo" depends="configure-cpp">
796 <  
796 >
797      <mkdir dir="${build.dir}"/>
798 <    
798 >
799      <cc multithreaded="true"
800 <                 name="g++"
800 >                 name="g++"
801                 objdir="${build.dir}"
802                outfile="${build.dir}/CppDemo">
803        <fileset dir="${test.src.dir}" includes="CppDemo.cpp"/>
804        <libset libs="stdc++"/>
805      </cc>
806 <    
806 >
807      <exec executable="${build.dir}/CppDemo">
808        <arg line="count in word frequency of word in command line count"/>
809      </exec>
810 <    
810 >
811    </target>
812 <  
813 <  
812 >
813 >
814    <target name="jnidemo" depends="init, configure-compiler, configure-cpp">
815 <  
815 >
816      <mkdir dir="${build.testcases.dir}"/>
817 <    
817 >
818      <javac srcdir="${test.src.dir}"
819            destdir="${build.testcases.dir}"
820              debug="${build.debug}"
# Line 684 | Line 827
827        <classpath refid="test.classpath"/>
828        <include name="JniDemo.java"/>
829      </javac>
830 <    
830 >
831      <javah destdir="${build.testcases.dir}"
832        classpathref="test.classpath">
833        <class name="JniDemo"/>
834      </javah>
835 <    
835 >
836      <cc multithreaded="true"
837 <                 name="g++"
837 >                 name="g++"
838                 objdir="${build.dir}"
839                outfile="${build.dir}/JniDemo"
840                outtype="shared">
841 <              
841 >
842        <compiler>
843          <defineset>
844            <define name="__int64" value="long long"/>
# Line 704 | Line 847
847          <includepath location="${java.home}/../include/${platform}"/>
848          <compilerarg value="-mno-cygwin"/>
849        </compiler>
850 <      
850 >
851        <linker>
852          <linkerarg value="--add-stdcall-alias"/>
853        </linker>
854 <      
854 >
855        <includepath location="${build.testcases.dir}"/>
856 <      
856 >
857        <fileset dir="${test.src.dir}" includes="JniDemo.cpp"/>
858 <      
858 >
859        <libset libs="stdc++"/>
860 <      
860 >
861      </cc>
862 <    
862 >
863      <!-- Necessary if windows, harmless if not -->
864      <copy file="${build.dir}/libJniDemo.so" tofile="${build.dir}/JniDemo.dll"/>
865 <    
865 >
866      <java classname="JniDemo" fork="true">
867        <!-- Watch out: path separator hardwired to semicolon here! -->
868        <sysproperty key="java.library.path" path="${java.library.path};${build.dir}"/>
869        <classpath refid="test.classpath"/>
870 +      <arg line="count in word frequency of word in command line count"/>
871      </java>
872 <    
872 >
873    </target>
874  
875  
# Line 738 | Line 882
882    <property name="build.pretiger.dir"   location="${build.dir}/pretiger/classes"/>
883    <property name="pretiger.jar"         location="${build.lib.dir}/jsr166-pretiger.jar"/>
884    <property name="pretiger.sourcelevel" value="1.4"/>
885 <  
886 <  <target name="defang"
885 >
886 >  <target name="defang"
887         depends="init"
888     description="Generates pre-Tiger compatible source">
889 <  
889 >
890      <delete dir="${pretiger.src.dir}"/>
891      <mkdir dir="${pretiger.src.dir}"/>
892 <  
892 >
893      <exec executable="perl">
894        <arg file="etc/defang.pl"/>
895        <!-- <arg value="-v"/> -->
896        <arg value="-s"/> <arg file="${src.dir}"/>
897        <arg value="-t"/> <arg file="${pretiger.src.dir}"/>
898      </exec>
899 <    
899 >
900    </target>
901  
902    <target name="compile-pretiger"
# Line 775 | Line 919
919      </javac>
920  
921    </target>
922 <  
922 >
923    <target name="pretiger" depends="compile-pretiger">
924  
925      <mkdir dir="${build.lib.dir}"/>
926 <    
926 >
927      <jar destfile="${pretiger.jar}">
928        <fileset dir="${build.pretiger.dir}">
929        </fileset>
930      </jar>
931 <    
931 >
932    </target>
933  
934   </project>

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines