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.75 by jsr166, Tue Sep 18 12:46:40 2007 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"/>
33 >  <property name="build.loops.dir"      location="${build.dir}/loops"/>
34    <property name="build.lib.dir"        location="${build.dir}/lib"/>
35  <property name="build.ant.dir"        location="${build.dir}/ant"/>
35    <property name="build.javadocs.dir"   location="${build.dir}/javadocs"/>
36    <property name="build.reports.dir"    location="${build.dir}/reports"/>
37 <  <property name="build.checkstyle.dir" location="${build.dir}/checkstyle"/>
38 <  <property name="build.doccheck.dir"   location="${build.dir}/doccheck"/>
39 <  <property name="build.filter.src.dir" location="${build.dir}/filtersrc"/>
40 <  <property name="build.dc-filter.dir"  location="${build.dir}/filterdocchk"/>
37 >  <property name="build.jsr166x.dir"    location="${build.dir}/jsr166x"/>
38 >  <property name="build.jsr166xlib.dir"        location="${build.dir}/jsr166xlib"/>
39 >  <property name="build.jsr166xjavadocs.dir"   location="${build.dir}/jsr166xjavadocs"/>
40 >
41 >  <property name="build.jsr166y.dir"    location="${build.dir}/jsr166y"/>
42 >  <property name="build.jsr166ylib.dir"        location="${build.dir}/jsr166ylib"/>
43 >  <property name="build.jsr166yjavadocs.dir"   location="${build.dir}/jsr166yjavadocs"/>
44  
45    <!-- Source locations -->
46    <property name="src.dir"              location="${basedir}/src/main"/>
47    <property name="test.src.dir"         location="${basedir}/src/test"/>
48 <  <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"/>
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"/>
52    <property name="dist.dir"             location="${basedir}/dist"/>
53 +  <property name="topsrc.dir"           location="${basedir}/src"/>
54 +  <property name="jsr166xsrc.dir"       location="${basedir}/src/jsr166x"/>
55 +  <property name="jsr166ysrc.dir"       location="${basedir}/src/jsr166y"/>
56  
57    <!-- Distribution locations -->
58    <property name="dist.javadocs.dir"    location="${dist.dir}/docs"/>
59 +  <property name="dist.jsr166xjavadocs.dir"    location="${dist.dir}/jsr166xdocs"/>
60 +  <property name="dist.jsr166yjavadocs.dir"    location="${dist.dir}/jsr166ydocs"/>
61  
62    <!-- Jar locations -->
63    <property name="product.jar"          location="${build.lib.dir}/jsr166.jar"/>
64 +  <property name="jsr166xproduct.jar"   location="${build.jsr166xlib.dir}/jsr166x.jar"/>
65 +  <property name="jsr166yproduct.jar"   location="${build.jsr166ylib.dir}/jsr166y.jar"/>
66    <property name="junit.jar"            location="${lib.dir}/junit.jar"/>
67 <  
67 >
68    <!-- Bootclasspath argument -->
69    <property name="bootclasspath.args"   value="-Xbootclasspath/p:${product.jar}"/>
70  
# Line 67 | Line 74
74      <pathelement location="${junit.jar}"/>
75    </path>
76  
77 <  <!-- Test classpath -->
78 <  <path id="j1.classpath">
79 <    <pathelement location="${build.j1.dir}"/>
73 <    <pathelement location="${junit.jar}"/>
77 >  <!-- ALoops classpath -->
78 >  <path id="loops.classpath">
79 >    <pathelement location="${build.loops.dir}"/>
80    </path>
81  
82  
# Line 91 | Line 97
97             source="${build.sourcelevel}"
98               fork="true">
99  
100 +      <include name="**/*.java"/>
101 +      <compilerarg value="-XDignore.symbol.file"/>
102 +
103 + <!--
104 +      <exclude name="java/lang/**"/>
105        <compilerarg line="${build.args}"/>
106 +      <compilerarg line="-Xlint -Xmaxwarns 1000"/>
107 + -->
108  
109      </javac>
110  
# Line 126 | Line 139
139      <mkdir dir="${build.javadocs.dir}"/>
140  
141      <javadoc destdir="${build.javadocs.dir}"
142 <                link="http://java.sun.com/j2se/1.4.1/docs/api"
142 >                link="http://java.sun.com/javase/6/docs/api/"
143              overview="${src.dir}/intro.html"
144 <              source="${build.sourcelevel}">
145 <
133 <      <tag name="revised" description="Last revised:"/>
134 <      <tag name="spec"    description="Specified by:"/>
144 >            sourcepath="${src.dir}:/home/dl/1.6.0/j2se/martin/j2se/src/share/classes"
145 >    >          
146  
147        <packageset dir="${src.dir}"/>
148  
# Line 141 | Line 152
152  
153  
154  
144  <target name="doccheck"
145          depends="filter-doccheck"
146          description="Reports on javadoc style errors">
147
148    <delete dir="${build.doccheck.dir}"/>
149    <mkdir dir="${build.doccheck.dir}"/>
150
151    <javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck"
152         docletpath="${lib.dir}/doccheck.jar"
153            destdir="${build.doccheck.dir}">
154      <packageset dir="${build.dc-filter.dir}"/>
155    </javadoc>
156
157    <echo>DocCheck output is in ${build.doccheck.dir}</echo>
158
159  </target>
160
161
162
163  <target name="checkstyle"
164          depends="filter-src"
165          description="Reports on style errors in Java source (verbose, mostly chaff)">
166
167    <taskdef resource="checkstyletask.properties"
168            classpath="${lib.dir}/checkstyle-all-3.1.jar"/>
169
170    <mkdir dir="${build.checkstyle.dir}"/>
171    
172    <checkstyle config="etc/checkstyle/sun_checks.xml"
173       failOnViolation="false">
174      <formatter type="xml" toFile="${build.checkstyle.dir}/checkstyle-report.xml"/>
175      <fileset dir="${build.filter.src.dir}" includes="**/*.java"/>
176    </checkstyle>
177    
178    <style in="${build.checkstyle.dir}/checkstyle-report.xml"
179          out="${build.checkstyle.dir}/checkstyle-report.html"
180        style="${stylesheet.dir}/checkstyle-frames.xsl"/>
181
182  </target>
183
184  
185
155    <target name="dist"
156            depends="init, dist-clean, dist-jar, dist-docs"
157            description="Puts all distributable products in single hierarchy"/>
# Line 236 | Line 205
205      <mkdir dir="${dist.javadocs.dir}"/>
206  
207      <javadoc destdir="${dist.javadocs.dir}"
208 <                link="http://java.sun.com/j2se/1.4.2/docs/api"
208 >            link="http://java.sun.com/javase/6/docs/api/"
209              overview="${src.dir}/intro.html"
241              source="${build.sourcelevel}">
242
243      <packageset dir="${src.dir}"/>
210  
211 +            sourcepath="${src.dir}:/home/dl/1.6.0/j2se/martin/j2se/src/share/classes"
212 +     >
213 + <!--
214 +      <packageset dir="${src.dir}" defaultexcludes="yes">
215 +      <include name="java/util/concurrent"/>
216 +      <include name="java/util/concurrent/atomic"/>
217 +      <include name="java/util/concurrent/locks"/>
218 +      </packageset>
219 + -->
220 +      <fileset dir="${topsrc.dir}" defaultexcludes="yes">
221 +      <include name="main/java/util/concurrent/*.java"/>
222 +      <include name="main/java/util/concurrent/atomic/*.java"/>
223 +      <include name="main/java/util/concurrent/locks/*.java"/>
224 +      <include name="main/java/util/*.java"/>
225 + <!--
226 +      <include name="main/java/util/concurrent/*.html"/>
227 +      <include name="main/java/util/concurrent/atomic/*.html"/>
228 +      <include name="main/java/util/concurrent/locks/*.html"/>
229 +      <include name="main/java/util/*.html"/>
230 + -->
231 + <!--      <include name="jsr166x/*.java"/> -->
232 +      </fileset>
233      </javadoc>
234  
235    </target>
# Line 259 | Line 247
247      <echo>java.home is ${java.home}</echo>
248  
249    </target>
250 <  
251 <  
250 >
251 >
252    <target name="dist-jar"
253            depends="clean, jar">
254  
# Line 269 | Line 257
257    </target>
258  
259  
272  <target name="compile-ant-filter"
273          depends="init">
274
275    <mkdir dir="${build.ant.dir}"/>
276
277    <javac srcdir="${ant.src.dir}"
278          destdir="${build.ant.dir}"
279           source="1.4"
280    />
281
282  </target>
283
284
285  <target name="filter-src"
286          depends="compile-ant-filter">
287
288    <mkdir dir="${build.filter.src.dir}"/>
289
290    <copy todir="${build.filter.src.dir}">
291      <fileset dir="${src.dir}">
292        <include name="**/*.html"/>
293      </fileset>
294    </copy>
295
296    <copy todir="${build.filter.src.dir}">
297      <fileset dir="${src.dir}">
298        <exclude name="**/*.html"/>
299        <!-- Files excluded from dist-docs -->
300        <exclude name="java/util/Random.*"/>
301        <exclude name="sun/misc/Unsafe.*"/>
302      </fileset>
303      <!--
304      <filterchain>
305      -->
306
307        <!--
308         # This filter gets rid of angle-bracketed type parameters
309         # so that javadoc can run on the result. The following
310         # heuristic seems to work:
311         #
312         # For all lines not starting with space(s)-asterisk-space(s),
313         #   replace <something> with a space, where there may be more
314         #   than one right angle bracket at the end, and "something"
315         #   must not contain parens or pipes. (This may need some
316         #   tweaking.)
317         -->
318
319        <!--
320        <filterreader classname="jsr166.ant.filters.ReplaceFilter"
321                      classpath="${build.ant.dir}">
322          <param name="notmatching" value="^\s+\*\s.*$"/>
323          <param name="pattern"     value="&lt;[^|>()]+?>+"/>
324          <param name="replacement" value=" "/>
325        </filterreader>
326        -->
327
328      <!--
329      </filterchain>
330      -->
331    </copy>
332
333  </target>
334
335
336  <target name="filter-doccheck"
337          depends="filter-src">
338
339    <mkdir dir="${build.dc-filter.dir}"/>
340
341    <copy todir="${build.dc-filter.dir}">
342      <fileset dir="${build.filter.src.dir}">
343        <include name="**/*.html"/>
344      </fileset>
345    </copy>
346
347    <property name="generic.declarations"
348             value="/** Fake type parameter. */ public interface E {} /** Fake type parameter. */ public interface T {} /** Fake type parameter. */ public interface K {} /** Fake type parameter. */ public interface V {}"
349    />
350
351    <copy todir="${build.dc-filter.dir}">
352      <fileset dir="${build.filter.src.dir}">
353        <exclude name="**/*.html"/>
354      </fileset>
355      <filterchain>
356        <!--
357         # These two filters try to make the source look like
358         # something that doccheck can process. The first removes
359         # -source 1.4 assertions and the second adds in a bunch
360         # of single letter public nested marker interfaces so that
361         # the generic type parameters are recognized.
362         -->
363
364        <filterreader classname="jsr166.ant.filters.ReplaceFilter"
365                      classpath="${build.ant.dir}">
366          <param name="matching"    value="^\s*assert[\s ].*$"/>
367          <param name="pattern"     value="assert"/>
368          <param name="replacement" value="//assert"/>
369        </filterreader>
370
371        <filterreader classname="jsr166.ant.filters.ReplaceFilter"
372                      classpath="${build.ant.dir}">
373          <param name="matching"    value="^([^*]*(class|interface|implements) .*|)\{.*$"/>
374          <param name="pattern"     value="$"/>
375          <param name="replacement" value=" ${generic.declarations}"/>
376        </filterreader>
377
378      </filterchain>
379    </copy>
380
381  </target>
382
383
260    <target name="compile-tests"
261            depends="jar">
262  
# Line 396 | Line 272
272  
273        <compilerarg value="${bootclasspath.args}"/>
274        <compilerarg line="${build.args}"/>
275 <      
275 >
276        <classpath refid="test.classpath"/>
277  
278      </javac>
# Line 410 | Line 286
286               fork="true">
287  
288        <include name="jsr166/test/**"/>
289 <      
289 >
290        <compilerarg value="${bootclasspath.args}"/>
291        <compilerarg line="${build.args}"/>
292 <      
292 >
293        <classpath refid="test.classpath"/>
294  
295      </javac>
# Line 429 | Line 305
305  
306        <compilerarg value="${bootclasspath.args}"/>
307        <compilerarg line="${build.args}"/>
308 <      
308 >
309        <classpath refid="test.classpath"/>
310  
311      </javac>
# Line 456 | Line 332
332        <jvmarg value="${bootclasspath.args}"/>
333        <jvmarg value="-server"/>
334        <jvmarg value="-showversion"/>
335 <      
335 >
336        <classpath refid="test.classpath"/>
337  
338        <formatter type="xml"/>
# Line 466 | Line 342
342            <include name="**/${testcase}Test.java"/>
343          </fileset>
344        </batchtest>
345 <      
345 >
346        <batchtest todir="${build.reports.dir}" if="do.test.old">
347          <fileset dir="${test.src.dir}">
348            <include name="jsr166/test/**/${testcase}Test.java"/>
349          </fileset>
350        </batchtest>
351  
352 < <!--      
352 > <!--
353        <batchtest todir="${build.reports.dir}" if="do.test.jtreg">
354          <fileset dir="${jtreg.src.dir}">
355            <include name="**/${testcase}Test.java"/>
# Line 501 | Line 377
377        <fileset dir="${build.reports.dir}">
378          <include name="TEST-*.xml"/>
379        </fileset>
380 <      <report styledir="${stylesheet.dir}"
505 <                format="${junit.report.format}"
506 <                 todir="${build.reports.dir}"
380 >      <report format="${junit.report.format}" todir="${build.reports.dir}"
381        />
382      </junitreport>
383  
# Line 540 | Line 414
414      <available property="xalan.available"
415                 classname="org.apache.xalan.Version"/>
416  
417 <              
417 >
418      <!-- Ant 1.6beta and later don't need or want this check -->
419 <    <!--    
419 >    <!--
420      <fail message="Need JUnit 3.8.1 in ${ant.home}${file.separator}lib to run tests"
421            unless="junit.available"/>
422  
# Line 553 | Line 427
427    </target>
428  
429  
430 +  <!-- Various demos and test programs -->
431  
557  <!-- Anthill targets -->
432  
433 <  <target name="anthill-build">
434 <  
561 <    <!-- Override this in user.properties -->
562 <    <property name="tiger.home" location="e:/j2sdk1.5.0"/>
563 <    
564 <    <exec resultproperty="result.property" dir="${basedir}" executable="${tiger.home}/bin/java">
565 <      <arg value="-Xmx256000000"/>
566 <      <!-- classpath of new JVM -->
567 <      <arg value="-classpath"/> <arg path="${java.class.path}"/>
568 <      <!-- location of Ant home directory -->
569 <      <arg value="-Dant.home=${ant.home}"/>
570 <      <!-- the Ant main class -->
571 <      <arg value="org.apache.tools.ant.Main"/>
572 <      <!-- The build file -->
573 <      <arg value="-buildfile"/>  <arg value="build.xml"/>
574 <      <!-- the target to build on the new Ant instance -->
575 <      <arg value="-DJAVA_HOME=${tiger.home}"/>
576 <      <arg value="do-anthill-build"/>
577 <    </exec>
578 <  </target>
579 <  
580 <  <target name="do-anthill-build"
581 <          depends="jar, test, docs, dist-docs"/>
582 <
583 <  <target name="anthill-publish">
584 <
585 <    <copy todir="${deployDir}/docs/private">
586 <      <fileset dir="${build.javadocs.dir}"/>
587 <    </copy>
588 <
589 <    <copy todir="${deployDir}/docs/public">
590 <      <fileset dir="${dist.javadocs.dir}"/>
591 <    </copy>
592 <
593 <    <copy tofile="${deployDir}/index.html"
594 <          file="${basedir}/etc/anthill-index.html"/>
595 <
596 <    <copy todir="${deployDir}/notes">
597 <      <fileset dir="${basedir}/etc/notes"/>
598 <    </copy>
433 >  <target name="loops" depends="init, configure-compiler"
434 >          description="Benchmark from Doug Lea's AQS paper">
435  
436 <  </target>
436 >    <mkdir dir="${build.loops.dir}"/>
437  
438 <
439 <  <!-- Standalone sample program -->
604 <  
605 <  <target name="sample" depends="">
606 <  
607 <    <mkdir dir="${build.testcases.dir}"/>
608 <    
609 <    <javac srcdir="${test.src.dir}"
610 <          destdir="${build.testcases.dir}"
438 >    <javac srcdir="${loops.src.dir}"
439 >          destdir="${build.loops.dir}"
440              debug="${build.debug}"
441         debuglevel="${build.debuglevel}"
442        deprecation="${build.deprecation}"
443             source="${build.sourcelevel}"
444               fork="true">
445 <      
617 <      <!--
618 <      <compilerarg value="${bootclasspath.args}"/>
445 >
446        <compilerarg line="${build.args}"/>
447 <      
448 <      <classpath refid="test.classpath"/>
622 <      -->
623 <      
624 <      <include name="jsr166/test/Sample.java"/>
625 <      
447 >      <classpath refid="loops.classpath"/>
448 >
449      </javac>
450 <    
451 <    <copy todir="${build.testcases.dir}">
452 <      <fileset dir="${test.src.dir}">
630 <        <include name="**/*.properties"/>
631 <      </fileset>
632 <    </copy>
633 <  
634 <            
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"/> -->
450 >
451 >    <java classname="ALoops" fork="true">
452 >      <classpath refid="loops.classpath"/>
453      </java>
454 +
455    </target>
456  
457  
458 <  <!-- BoF demos -->
459 <  
460 <  <target name="j1" depends="jar">
461 <  
462 <    <mkdir dir="${build.j1.dir}"/>
463 <    
464 <    <javac srcdir="${j1.src.dir}"
465 <          destdir="${build.j1.dir}"
458 >  <!-- jsr166x -->
459 >
460 >
461 >  <target name="jsr166xcompile"
462 >          depends="init, configure-compiler"
463 >          description="Compiles jsr166x sources">
464 >
465 >    <mkdir dir="${build.jsr166x.dir}"/>
466 >
467 >    <javac srcdir="${jsr166xsrc.dir}"
468 >          destdir="${build.jsr166x.dir}"
469              debug="${build.debug}"
470         debuglevel="${build.debuglevel}"
471        deprecation="${build.deprecation}"
472             source="${build.sourcelevel}"
473               fork="true">
474 <            
475 <      <compilerarg value="${bootclasspath.args}"/>
474 >
475 >      <include name="**/*.java"/>
476        <compilerarg line="${build.args}"/>
477 <      
662 <      <classpath refid="j1.classpath"/>
663 <      
477 >
478      </javac>
665    
666 <!--
667    <java classname="MainClass" fork="true">
668      <jvmarg value="${bootclasspath.args}"/>
669      <classpath refid="j1.classpath"/>
670    </java>
671 -->
479  
480 <    <junit printsummary="true"
674 <             showoutput="true"
675 <          errorProperty="junit.failed"
676 <        failureProperty="junit.failed"
677 <                    dir="${build.j1.dir}"
678 <                   fork="true">
480 >  </target>
481  
680      <jvmarg value="${bootclasspath.args}"/>
681      <jvmarg value="-server"/>
682      
683      <classpath refid="j1.classpath"/>
482  
685      <formatter type="xml"/>
483  
484 <      <batchtest todir="${build.j1.dir}">
485 <        <fileset dir="${j1.src.dir}">
486 <          <include name="**/*Test.java"/>
690 <        </fileset>
691 <      </batchtest>
484 >  <target name="jsr166xjar"
485 >          depends="jsr166xcompile"
486 >          description="Builds library jar from compiled sources">
487  
488 <    </junit>
488 >    <mkdir dir="${build.jsr166xlib.dir}"/>
489  
490 <    <!-- Sets junit.report.format to frames if redirection is present,
491 <         otherwise sets it to noframes. -->
492 <    <available property="junit.report.format"
698 <                  value="frames"
699 <              classname="org.apache.xalan.lib.Redirect"
700 <    />
701 <    <property name="junit.report.format" value="noframes"/>
490 >    <jar destfile="${jsr166xproduct.jar}">
491 >      <fileset dir="${build.jsr166x.dir}"/>
492 >    </jar>
493  
494 <    <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>
494 >  </target>
495  
496 <    <fail message="Test Cases Failed" if="junit.failed"/>
496 >
497 >
498 >  <target name="jsr166xdocs"
499 >          description="Builds javadocs with custom tags to build folder">
500 >
501 >    <delete dir="${build.jsr166xjavadocs.dir}"/>
502 >    <mkdir dir="${build.jsr166xjavadocs.dir}"/>
503 >
504 >    <javadoc destdir="${build.jsr166xjavadocs.dir}"
505 >             link="http://java.sun.com/javase/6/docs/api/"
506 >
507 >            sourcepath="${jsr166xsrc.dir}:/home/dl/1.5.0/j2se/martin/j2se/src/share/classes"
508 >
509 >    >
510 >      <packageset dir="${topsrc.dir}" defaultexcludes="yes">
511 >      <include name="jsr166x"/>
512 >      </packageset>
513 >
514 >
515 >    </javadoc>
516  
517    </target>
518  
519 <  
520 <  
521 <  <!-- C++ and JNI definitions and demos -->
522 <  
523 <  <target name="configure-cpp">
524 <
525 <    <!-- Define tasks and types -->
526 <    
527 <    <path id="cpptasks.path">
528 <      <pathelement location="${lib.dir}/cpptasks.jar"/>
529 <    </path>
530 <    <taskdef resource="cpptasks.tasks" classpathref="cpptasks.path"/>
531 <    <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 <    
519 >
520 >  <target name="jsr166xdist"
521 >          depends="jsr166xdist-clean, jsr166xdist-jar, jsr166xdist-docs"
522 >          description="Puts all distributable products in single hierarchy"/>
523 >
524 >
525 >
526 >  <target name="jsr166xclean"
527 >          description="Removes all build products">
528 >
529 >    <delete dir="${build.jsr166x.dir}"/>
530 >    <delete dir="${build.jsr166xlib.dir}"/>
531 >
532    </target>
533 <  
534 <  
535 <  <target name="cppdemo" depends="configure-cpp">
536 <  
537 <    <mkdir dir="${build.dir}"/>
538 <    
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 <    
533 >
534 >
535 >
536 >  <target name="jsr166xdist-clean"
537 >          description="Removes all build and distribution products">
538 >
539    </target>
540  
541  
542  
543 <  <!-- Backward compatibility, work in progress (some files not checked in) -->
543 >  <target name="jsr166xdist-docs"
544 >          description="Builds javadocs without custom tags to dist folder">
545 >
546 >    <delete dir="${dist.jsr166xjavadocs.dir}"/>
547 >    <mkdir dir="${dist.jsr166xjavadocs.dir}"/>
548 >
549 >    <javadoc destdir="${dist.jsr166xjavadocs.dir}"
550 >                link="http://java.sun.com/javase/6/docs/api/"
551 >              source="${build.sourcelevel}">
552 >
553 >      <packageset dir="${topsrc.dir}" defaultexcludes="yes">
554 >      <include name="jsr166x"/>
555 >      </packageset>
556 >
557 >    </javadoc>
558 >
559 >  </target>
560  
561 +  <target name="jsr166xdist-jar"
562 +          depends="jsr166xclean, jsr166xjar">
563  
564 +    <copy file="${jsr166xproduct.jar}" todir="${dist.dir}"/>
565  
832  <property name="pretiger.src.dir"     location="${build.dir}/pretiger/src"/>
833  <property name="build.pretiger.dir"   location="${build.dir}/pretiger/classes"/>
834  <property name="pretiger.jar"         location="${build.lib.dir}/jsr166-pretiger.jar"/>
835  <property name="pretiger.sourcelevel" value="1.4"/>
836  
837  <target name="defang"
838       depends="init"
839   description="Generates pre-Tiger compatible source">
840  
841    <delete dir="${pretiger.src.dir}"/>
842    <mkdir dir="${pretiger.src.dir}"/>
843  
844    <exec executable="perl">
845      <arg file="etc/defang.pl"/>
846      <!-- <arg value="-v"/> -->
847      <arg value="-s"/> <arg file="${src.dir}"/>
848      <arg value="-t"/> <arg file="${pretiger.src.dir}"/>
849    </exec>
850    
566    </target>
567  
568 <  <target name="compile-pretiger"
854 <          depends="init, configure-compiler, defang"
855 <          description="Compiles pre-Tiger sources to build folder">
568 >  <!-- jsr166y -->
569  
857    <mkdir dir="${build.pretiger.dir}"/>
570  
571 <    <javac srcdir="${pretiger.src.dir}"
572 <          destdir="${build.pretiger.dir}"
571 >  <target name="jsr166ycompile"
572 >          depends="init, configure-compiler"
573 >          description="Compiles jsr166y sources">
574 >
575 >    <mkdir dir="${build.jsr166y.dir}"/>
576 >
577 >    <javac srcdir="${jsr166ysrc.dir}"
578 >          destdir="${build.jsr166y.dir}"
579              debug="${build.debug}"
580         debuglevel="${build.debuglevel}"
581        deprecation="${build.deprecation}"
582 <           source="${pretiger.sourcelevel}"
582 >           source="${build.sourcelevel}"
583               fork="true">
584  
585 +      <include name="**/*.java"/>
586        <compilerarg line="${build.args}"/>
587 <      <exclude name="**/Thread.java"/>
587 >      <compilerarg value="${bootclasspath.args}"/>
588 >
589 > <!--       <compilerarg line="-Xlint -Xmaxwarns 1000"/> -->
590  
591      </javac>
592  
593    </target>
873  
874  <target name="pretiger" depends="compile-pretiger">
594  
595 <    <mkdir dir="${build.lib.dir}"/>
596 <    
597 <    <jar destfile="${pretiger.jar}">
598 <      <fileset dir="${build.pretiger.dir}">
599 <      </fileset>
595 >
596 >
597 >  <target name="jsr166yjar"
598 >          depends="jsr166ycompile"
599 >          description="Builds library jar from compiled sources">
600 >
601 >    <mkdir dir="${build.jsr166ylib.dir}"/>
602 >
603 >    <jar destfile="${jsr166yproduct.jar}">
604 >      <fileset dir="${build.jsr166y.dir}"/>
605      </jar>
606 <    
606 >
607 >  </target>
608 >
609 >
610 >
611 >  <target name="jsr166ydocs"
612 >          description="Builds javadocs with custom tags to build folder">
613 >
614 >    <delete dir="${build.jsr166yjavadocs.dir}"/>
615 >    <mkdir dir="${build.jsr166yjavadocs.dir}"/>
616 >
617 >    <javadoc destdir="${build.jsr166yjavadocs.dir}"
618 >                link="http://java.sun.com/javase/6/docs/api/"
619 >            sourcepath="${jsr166ysrc.dir}:/home/dl/1.5.0/j2se/martin/j2se/src/share/classes"
620 >
621 >    >
622 >      <packageset dir="${topsrc.dir}" defaultexcludes="no">
623 >      <include name="jsr166y"/>
624 >      </packageset>
625 >
626 >
627 >    </javadoc>
628 >
629 >  </target>
630 >
631 >
632 >  <target name="jsr166ydist"
633 >          depends="jsr166ydist-clean, jsr166ydist-jar, jsr166ydist-docs"
634 >          description="Puts all distributable products in single hierarchy"/>
635 >
636 >
637 >
638 >  <target name="jsr166yclean"
639 >          description="Removes all build products">
640 >
641 >    <delete dir="${build.jsr166y.dir}"/>
642 >    <delete dir="${build.jsr166ylib.dir}"/>
643 >
644 >  </target>
645 >
646 >
647 >
648 >  <target name="jsr166ydist-clean"
649 >          description="Removes all build and distribution products">
650 >
651 >  </target>
652 >
653 >  <target name="jsr166ydist-docs"
654 >          description="Builds javadocs without custom tags to dist folder">
655 >
656 >    <delete dir="${dist.jsr166yjavadocs.dir}"/>
657 >    <mkdir dir="${dist.jsr166yjavadocs.dir}"/>
658 >
659 >    <javadoc destdir="${dist.jsr166yjavadocs.dir}"
660 >                link="http://java.sun.com/javase/6/docs/api/"
661 >              source="${build.sourcelevel}">
662 >      <fileset dir="${topsrc.dir}" defaultexcludes="yes">
663 >      <include name="jsr166y/*.java"/>
664 >      <include name="jsr166y/forkjoin/*.java"/>
665 >            </fileset>
666 >    </javadoc>
667 >
668 >  </target>
669 >
670 >  <target name="jsr166ydist-jar"
671 >          depends="jsr166yclean, jsr166yjar">
672 >
673 >    <copy file="${jsr166yproduct.jar}" todir="${dist.dir}"/>
674 >
675    </target>
676  
677   </project>

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines