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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines