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.60 by tim, Mon Dec 8 03:10:54 2003 UTC vs.
Revision 1.64 by tim, Wed Mar 24 20:32:33 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.lib.dir"        location="${build.dir}/lib"/>
35    <property name="build.ant.dir"        location="${build.dir}/ant"/>
36    <property name="build.javadocs.dir"   location="${build.dir}/javadocs"/>
# Line 42 | Line 43
43    <!-- Source locations -->
44    <property name="src.dir"              location="${basedir}/src/main"/>
45    <property name="test.src.dir"         location="${basedir}/src/test"/>
46 +  <property name="j1.src.dir"           location="${basedir}/src/javaone"/>
47    <property name="tck.src.dir"          location="${test.src.dir}/tck"/>
48 +  <property name="jtreg.src.dir"        location="${test.src.dir}/jtreg"/>
49    <property name="ant.src.dir"          location="${basedir}/etc/ant"/>
50    <property name="stylesheet.dir"       location="${basedir}/etc/xsl"/>
51    <property name="lib.dir"              location="${basedir}/lib"/>
# Line 64 | Line 67
67      <pathelement location="${junit.jar}"/>
68    </path>
69  
70 +  <!-- Test classpath -->
71 +  <path id="j1.classpath">
72 +    <pathelement location="${build.j1.dir}"/>
73 +    <pathelement location="${junit.jar}"/>
74 +  </path>
75  
76  
77    <!-- Main targets -->
# Line 251 | Line 259
259      <echo>java.home is ${java.home}</echo>
260  
261    </target>
262 <
263 <
262 >  
263 >  
264    <target name="dist-jar"
265            depends="clean, jar">
266  
# Line 410 | Line 418
418  
419      </javac>
420  
421 + <!--
422 +    <javac srcdir="${jtreg.src.dir}"
423 +          destdir="${build.testcases.dir}"
424 +            debug="${build.debug}"
425 +       debuglevel="${build.debuglevel}"
426 +      deprecation="${build.deprecation}"
427 +           source="${build.sourcelevel}"
428 +             fork="true">
429 +
430 +      <compilerarg value="${bootclasspath.args}"/>
431 +      <compilerarg line="${build.args}"/>
432 +      
433 +      <classpath refid="test.classpath"/>
434 +
435 +    </javac>
436 + -->
437 +
438    </target>
439  
440  
# Line 429 | Line 454
454                     fork="true">
455  
456        <jvmarg value="${bootclasspath.args}"/>
457 +      <jvmarg value="-server"/>
458 +      <jvmarg value="-showversion"/>
459        
460        <classpath refid="test.classpath"/>
461  
462        <formatter type="xml"/>
463  
464 <      <batchtest todir="${build.reports.dir}">
464 >      <batchtest todir="${build.reports.dir}" unless="no.test.tck">
465          <fileset dir="${tck.src.dir}">
466            <include name="**/${testcase}Test.java"/>
467          </fileset>
468 +      </batchtest>
469 +      
470 +      <batchtest todir="${build.reports.dir}" if="do.test.old">
471          <fileset dir="${test.src.dir}">
472            <include name="jsr166/test/**/${testcase}Test.java"/>
473          </fileset>
474        </batchtest>
475  
476 + <!--      
477 +      <batchtest todir="${build.reports.dir}" if="do.test.jtreg">
478 +        <fileset dir="${jtreg.src.dir}">
479 +          <include name="**/${testcase}Test.java"/>
480 +        </fileset>
481 +      </batchtest>
482 + -->
483 +
484      </junit>
485  
486    </target>
# Line 562 | Line 600
600    </target>
601  
602  
603 <
604 <  <!-- Backward compatibility, work in progress (some files not checked in) -->
605 <
568 <
569 <  <target name="compat" depends="jar">
603 >  <!-- Standalone sample program -->
604 >  
605 >  <target name="sample" depends="">
606    
607      <mkdir dir="${build.testcases.dir}"/>
608      
# Line 577 | Line 613
613        deprecation="${build.deprecation}"
614             source="${build.sourcelevel}"
615               fork="true">
616 <            
616 >      
617 >      <!--
618        <compilerarg value="${bootclasspath.args}"/>
619        <compilerarg line="${build.args}"/>
620        
621        <classpath refid="test.classpath"/>
622 +      -->
623        
624 <      <include name="Compatibility.java"/>
624 >      <include name="jsr166/test/Sample.java"/>
625        
626      </javac>
627      
628 +    <copy todir="${build.testcases.dir}">
629 +      <fileset dir="${test.src.dir}">
630 +        <include name="**/*.properties"/>
631 +      </fileset>
632 +    </copy>
633 +  
634              
635 <    <java classname="Compatibility" fork="true">
635 >    <java classname="jsr166.test.Sample" fork="true">
636        <jvmarg value="${bootclasspath.args}"/>
637 +      <!-- <jvmarg value="-server"/> -->
638 +      <!-- <jvmarg value="-ea"/> -->
639        <classpath refid="test.classpath"/>
640 +      <!-- <arg value="1000"/> -->
641      </java>
642    </target>
643  
644  
645 +  <!-- BoF demos -->
646 +  
647 +  <target name="j1" depends="jar">
648 +  
649 +    <mkdir dir="${build.j1.dir}"/>
650 +    
651 +    <javac srcdir="${j1.src.dir}"
652 +          destdir="${build.j1.dir}"
653 +            debug="${build.debug}"
654 +       debuglevel="${build.debuglevel}"
655 +      deprecation="${build.deprecation}"
656 +           source="${build.sourcelevel}"
657 +             fork="true">
658 +            
659 +      <compilerarg value="${bootclasspath.args}"/>
660 +      <compilerarg line="${build.args}"/>
661 +      
662 +      <classpath refid="j1.classpath"/>
663 +      
664 +    </javac>
665 +    
666 + <!--
667 +    <java classname="MainClass" fork="true">
668 +      <jvmarg value="${bootclasspath.args}"/>
669 +      <classpath refid="j1.classpath"/>
670 +    </java>
671 + -->
672 +
673 +    <junit printsummary="true"
674 +             showoutput="true"
675 +          errorProperty="junit.failed"
676 +        failureProperty="junit.failed"
677 +                    dir="${build.j1.dir}"
678 +                   fork="true">
679 +
680 +      <jvmarg value="${bootclasspath.args}"/>
681 +      <jvmarg value="-server"/>
682 +      
683 +      <classpath refid="j1.classpath"/>
684 +
685 +      <formatter type="xml"/>
686 +
687 +      <batchtest todir="${build.j1.dir}">
688 +        <fileset dir="${j1.src.dir}">
689 +          <include name="**/*Test.java"/>
690 +        </fileset>
691 +      </batchtest>
692 +
693 +    </junit>
694 +
695 +    <!-- Sets junit.report.format to frames if redirection is present,
696 +         otherwise sets it to noframes. -->
697 +    <available property="junit.report.format"
698 +                  value="frames"
699 +              classname="org.apache.xalan.lib.Redirect"
700 +    />
701 +    <property name="junit.report.format" value="noframes"/>
702 +
703 +    <junitreport todir="${build.j1.dir}">
704 +      <fileset dir="${build.j1.dir}">
705 +        <include name="TEST-*.xml"/>
706 +      </fileset>
707 +      <report styledir="${stylesheet.dir}"
708 +                format="${junit.report.format}"
709 +                 todir="${build.j1.dir}"
710 +      />
711 +    </junitreport>
712 +
713 +    <fail message="Test Cases Failed" if="junit.failed"/>
714 +
715 +  </target>
716 +
717 +  
718 +  
719 +  <!-- C++ and JNI definitions and demos -->
720 +  
721 +  <target name="configure-cpp">
722 +
723 +    <!-- Define tasks and types -->
724 +    
725 +    <path id="cpptasks.path">
726 +      <pathelement location="${lib.dir}/cpptasks.jar"/>
727 +    </path>
728 +    <taskdef resource="cpptasks.tasks" classpathref="cpptasks.path"/>
729 +    <typedef resource="cpptasks.types" classpathref="cpptasks.path"/>
730 +    
731 +    <!-- Set platform property for JNI includes -->
732 +    
733 +    <condition property="platform" value="linux">
734 +      <os name="Linux"/>
735 +    </condition>
736 +    <condition property="platform" value="win32">
737 +      <os family="windows"/>
738 +    </condition>
739 +    <condition property="platform" value="solaris">
740 +      <os name="SunOS"/>
741 +    </condition>
742 +    
743 +  </target>
744 +  
745 +  
746 +  <target name="cppdemo" depends="configure-cpp">
747 +  
748 +    <mkdir dir="${build.dir}"/>
749 +    
750 +    <cc multithreaded="true"
751 +                 name="g++"
752 +               objdir="${build.dir}"
753 +              outfile="${build.dir}/CppDemo">
754 +      <fileset dir="${test.src.dir}" includes="CppDemo.cpp"/>
755 +      <libset libs="stdc++"/>
756 +    </cc>
757 +    
758 +    <exec executable="${build.dir}/CppDemo">
759 +      <arg line="count in word frequency of word in command line count"/>
760 +    </exec>
761 +    
762 +  </target>
763 +  
764 +  
765 +  <target name="jnidemo" depends="init, configure-compiler, configure-cpp">
766 +  
767 +    <mkdir dir="${build.testcases.dir}"/>
768 +    
769 +    <javac srcdir="${test.src.dir}"
770 +          destdir="${build.testcases.dir}"
771 +            debug="${build.debug}"
772 +       debuglevel="${build.debuglevel}"
773 +      deprecation="${build.deprecation}"
774 +           source="${build.sourcelevel}"
775 +             fork="true">
776 +      <compilerarg value="${bootclasspath.args}"/>
777 +      <compilerarg line="${build.args}"/>
778 +      <classpath refid="test.classpath"/>
779 +      <include name="JniDemo.java"/>
780 +    </javac>
781 +    
782 +    <javah destdir="${build.testcases.dir}"
783 +      classpathref="test.classpath">
784 +      <class name="JniDemo"/>
785 +    </javah>
786 +    
787 +    <cc multithreaded="true"
788 +                 name="g++"
789 +               objdir="${build.dir}"
790 +              outfile="${build.dir}/JniDemo"
791 +              outtype="shared">
792 +              
793 +      <compiler>
794 +        <defineset>
795 +          <define name="__int64" value="long long"/>
796 +        </defineset>
797 +        <includepath location="${java.home}/../include"/>
798 +        <includepath location="${java.home}/../include/${platform}"/>
799 +        <compilerarg value="-mno-cygwin"/>
800 +      </compiler>
801 +      
802 +      <linker>
803 +        <linkerarg value="--add-stdcall-alias"/>
804 +      </linker>
805 +      
806 +      <includepath location="${build.testcases.dir}"/>
807 +      
808 +      <fileset dir="${test.src.dir}" includes="JniDemo.cpp"/>
809 +      
810 +      <libset libs="stdc++"/>
811 +      
812 +    </cc>
813 +    
814 +    <!-- Necessary if windows, harmless if not -->
815 +    <copy file="${build.dir}/libJniDemo.so" tofile="${build.dir}/JniDemo.dll"/>
816 +    
817 +    <java classname="JniDemo" fork="true">
818 +      <!-- Watch out: path separator hardwired to semicolon here! -->
819 +      <sysproperty key="java.library.path" path="${java.library.path};${build.dir}"/>
820 +      <classpath refid="test.classpath"/>
821 +      <arg line="count in word frequency of word in command line count"/>
822 +    </java>
823 +    
824 +  </target>
825 +
826 +
827 +
828 +  <!-- Backward compatibility, work in progress (some files not checked in) -->
829 +
830 +
831  
832    <property name="pretiger.src.dir"     location="${build.dir}/pretiger/src"/>
833    <property name="build.pretiger.dir"   location="${build.dir}/pretiger/classes"/>

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines