39 |
|
<property name="build.reports.dir" location="${build.dir}/reports"/> |
40 |
|
<property name="build.doccheck.dir" location="${build.dir}/doccheck"/> |
41 |
|
<property name="build.filter.src.dir" location="${build.dir}/filtersrc"/> |
42 |
+ |
<property name="build.filter.doccheck.dir" location="${build.dir}/filterdocchk"/> |
43 |
|
|
44 |
|
<!-- Source locations --> |
45 |
|
<property name="src.dir" location="${basedir}/src/main"/> |
60 |
|
|
61 |
|
|
62 |
|
|
63 |
< |
<!-- Files excluded from emulation and dist-docs --> |
64 |
< |
<patternset id="emulation.excludes"> |
63 |
> |
<!-- Files excluded from dist-docs and emulation jar --> |
64 |
> |
<patternset id="unsafe.exclusion"> |
65 |
|
<exclude name="java/util/Random.*"/> |
66 |
|
<exclude name="sun/misc/Unsafe.*"/> |
67 |
|
</patternset> |
68 |
|
|
69 |
+ |
<!-- Files excludes from emulation jar --> |
70 |
+ |
<patternset id="atomic.exclusion"> |
71 |
+ |
<exclude name="java/util/concurrent/atomic/AtomicBoolean*"/> |
72 |
+ |
<exclude name="java/util/concurrent/atomic/AtomicInteger*"/> |
73 |
+ |
<exclude name="java/util/concurrent/atomic/AtomicLong*"/> |
74 |
+ |
<exclude name="java/util/concurrent/atomic/AtomicReference*"/> |
75 |
+ |
</patternset> |
76 |
+ |
|
77 |
|
|
78 |
|
|
79 |
|
<!-- Main targets --> |
86 |
|
|
87 |
|
<mkdir dir="${build.classes.dir}"/> |
88 |
|
|
89 |
+ |
<!-- |
90 |
+ |
<echo>javac ${gjc.args}</echo> |
91 |
+ |
<echo>bootclasspath=${compile.bootclasspath}</echo> |
92 |
+ |
--> |
93 |
+ |
|
94 |
|
<javac srcdir="${prepare.src.dir}" |
95 |
|
destdir="${build.classes.dir}" |
96 |
|
debug="${build.debug}" |
99 |
|
source="${build.sourcelevel}" |
100 |
|
fork="true"> |
101 |
|
|
102 |
< |
<bootclasspath refid="javac.bootclasspath"/> |
103 |
< |
<compilerarg line="${build.javac.args}"/> |
102 |
> |
<compilerarg line="${gjc.args}"/> |
103 |
> |
<bootclasspath refid="compile.bootclasspath"/> |
104 |
|
|
105 |
|
</javac> |
106 |
|
|
133 |
|
|
134 |
|
|
135 |
|
<target name="doccheck" |
136 |
< |
depends="filter-src" |
137 |
< |
description="Reports on javadoc style errors (not working yet)"> |
136 |
> |
depends="filter-doccheck" |
137 |
> |
description="Reports on javadoc style errors"> |
138 |
|
|
139 |
|
<delete dir="${build.doccheck.dir}"/> |
140 |
|
<mkdir dir="${build.doccheck.dir}"/> |
142 |
|
<javadoc doclet="com.sun.tools.doclets.doccheck.DocCheck" |
143 |
|
docletpath="${lib.dir}/doccheck.jar" |
144 |
|
destdir="${build.doccheck.dir}"> |
145 |
< |
<packageset dir="${build.filter.src.dir}"/> |
145 |
> |
<packageset dir="${build.filter.doccheck.dir}"/> |
146 |
|
</javadoc> |
147 |
|
|
148 |
+ |
<echo>DocCheck output is in ${build.doccheck.dir}</echo> |
149 |
+ |
|
150 |
|
</target> |
151 |
|
|
152 |
|
|
193 |
|
source="${build.sourcelevel}" |
194 |
|
fork="true"> |
195 |
|
|
196 |
< |
<bootclasspath refid="javac.bootclasspath"/> |
197 |
< |
<compilerarg line="${build.javac.args} -s"/> |
196 |
> |
<compilerarg line="${gjc.args} -s"/> |
197 |
> |
<bootclasspath refid="compile.bootclasspath"/> |
198 |
|
|
199 |
|
</javac> |
200 |
|
|
205 |
|
depends="init, dist-clean, dist-jar, dist-docs" |
206 |
|
description="Puts all distributable products in single hierarchy"/> |
207 |
|
|
208 |
+ |
<target name="release" |
209 |
+ |
depends="dist" |
210 |
+ |
description="Puts entire CVS tree, plus distribution productions, in a jar"> |
211 |
+ |
|
212 |
+ |
<!-- |
213 |
+ |
#keep build dir? - dl |
214 |
+ |
<delete dir="${build.dir}"/> |
215 |
+ |
--> |
216 |
+ |
<property name="release.jar" value="dist/jsr166-${version}-dist.jar"/> |
217 |
+ |
|
218 |
+ |
<jar basedir="${basedir}" destfile="${release.jar}"> |
219 |
+ |
<exclude name="${release.jar}"/> |
220 |
+ |
<exclude name="user.properties"/> |
221 |
+ |
<exclude name="etc/notes/**"/> |
222 |
+ |
<exclude name="lib/gjc/2.1/**"/> |
223 |
+ |
<exclude name="**/SyntaxTest.java"/> |
224 |
+ |
</jar> |
225 |
+ |
|
226 |
+ |
</target> |
227 |
|
|
228 |
|
<target name="clean" |
229 |
|
description="Removes all build products"> |
307 |
|
source="${build.sourcelevel}" |
308 |
|
fork="true"> |
309 |
|
|
310 |
< |
<bootclasspath refid="javac.bootclasspath"/> |
311 |
< |
<compilerarg line="${build.javac.args}"/> |
310 |
> |
<compilerarg line="${gjc.args}"/> |
311 |
> |
<bootclasspath refid="compile.bootclasspath"/> |
312 |
|
|
313 |
|
</javac> |
314 |
|
|
322 |
|
|
323 |
|
<jar destfile="${product.jar}" duplicate="add"> |
324 |
|
<fileset dir="${build.classes.dir}"> |
325 |
< |
<patternset refid="emulation.excludes"/> |
325 |
> |
<patternset refid="atomic.exclusion"/> |
326 |
> |
<patternset refid="unsafe.exclusion"/> |
327 |
|
</fileset> |
328 |
|
<fileset dir="${build.emulation.dir}"/> |
329 |
|
</jar> |
363 |
|
</fileset> |
364 |
|
</copy> |
365 |
|
|
330 |
– |
<!-- Not needed now, used for doccheck filtering: |
331 |
– |
<property name="generic.declarations" |
332 |
– |
value="public interface E {} public interface T {} public interface K {} public interface V {}" |
333 |
– |
/> |
334 |
– |
--> |
335 |
– |
|
366 |
|
<copy todir="${build.filter.src.dir}"> |
367 |
|
<fileset dir="${src.dir}"> |
368 |
|
<exclude name="**/*.html"/> |
369 |
< |
<patternset refid="emulation.excludes"/> |
369 |
> |
<patternset refid="unsafe.exclusion"/> |
370 |
|
</fileset> |
371 |
|
<filterchain> |
372 |
|
|
402 |
|
<param name="pattern" value="^//@"/> |
403 |
|
<param name="replacement" value=""/> |
404 |
|
</filterreader> |
405 |
+ |
</filterchain> |
406 |
+ |
</copy> |
407 |
+ |
|
408 |
+ |
</target> |
409 |
+ |
|
410 |
|
|
411 |
|
|
412 |
+ |
|
413 |
+ |
<target name="filter-doccheck" |
414 |
+ |
depends="filter-src"> |
415 |
+ |
|
416 |
+ |
<mkdir dir="${build.filter.doccheck.dir}"/> |
417 |
+ |
|
418 |
+ |
<copy todir="${build.filter.doccheck.dir}"> |
419 |
+ |
<fileset dir="${build.filter.src.dir}"> |
420 |
+ |
<include name="**/*.html"/> |
421 |
+ |
</fileset> |
422 |
+ |
</copy> |
423 |
+ |
|
424 |
+ |
<property name="generic.declarations" |
425 |
+ |
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 {}" |
426 |
+ |
/> |
427 |
+ |
|
428 |
+ |
<copy todir="${build.filter.doccheck.dir}"> |
429 |
+ |
<fileset dir="${build.filter.src.dir}"> |
430 |
+ |
<exclude name="**/*.html"/> |
431 |
+ |
</fileset> |
432 |
+ |
<filterchain> |
433 |
|
<!-- |
434 |
< |
# The next two filters try to make the source look like |
434 |
> |
# These two filters try to make the source look like |
435 |
|
# something that doccheck can process. The first removes |
436 |
|
# -source 1.4 assertions and the second adds in a bunch |
437 |
|
# of single letter public nested marker interfaces so that |
438 |
|
# the generic type parameters are recognized. |
383 |
– |
# |
384 |
– |
# Currently commented out because doccheck doesn't work. :-( |
439 |
|
--> |
440 |
|
|
387 |
– |
<!-- |
441 |
|
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
442 |
|
classpath="${build.ant.dir}"> |
443 |
|
<param name="matching" value="^\s*assert[\s ].*$"/> |
447 |
|
|
448 |
|
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
449 |
|
classpath="${build.ant.dir}"> |
450 |
< |
<param name="matching" value="^(.*(class|interface|implements) .*|)\{.*$"/> |
450 |
> |
<param name="matching" value="^([^*]*(class|interface|implements) .*|)\{.*$"/> |
451 |
|
<param name="pattern" value="$"/> |
452 |
|
<param name="replacement" value=" ${generic.declarations}"/> |
453 |
|
</filterreader> |
401 |
– |
--> |
454 |
|
|
455 |
|
</filterchain> |
456 |
|
</copy> |
463 |
|
|
464 |
|
<mkdir dir="${build.testcases.dir}"/> |
465 |
|
|
466 |
+ |
<!-- |
467 |
+ |
<echo>javac ${gjc.args}</echo> |
468 |
+ |
<echo>bootclasspath=${test.compile.bootclasspath}</echo> |
469 |
+ |
<echo>classpath="${test.classpath}"</echo> |
470 |
+ |
--> |
471 |
+ |
|
472 |
|
<javac srcdir="${test.src.dir}" |
473 |
|
destdir="${build.testcases.dir}" |
474 |
|
debug="${build.debug}" |
477 |
|
source="${build.sourcelevel}" |
478 |
|
fork="true"> |
479 |
|
|
480 |
< |
<classpath refid="test.classpath"/> |
481 |
< |
<bootclasspath refid="javac.bootclasspath"/> |
482 |
< |
<compilerarg line="${build.javac.args}"/> |
480 |
> |
<compilerarg line="${gjc.args}"/> |
481 |
> |
<bootclasspath refid="test.compile.bootclasspath"/> |
482 |
> |
<classpath refid="test.classpath"/> |
483 |
|
|
484 |
|
</javac> |
485 |
|
|
501 |
|
dir="${build.reports.dir}" |
502 |
|
fork="true"> |
503 |
|
|
504 |
< |
<jvmarg value="${test.bootclasspath.arg}"/> |
504 |
> |
<jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/> |
505 |
|
|
506 |
|
<formatter type="xml"/> |
507 |
|
|
545 |
|
<target name="configure-compiler"> |
546 |
|
|
547 |
|
<property name="gjc.version" |
548 |
< |
value="2.0"/> |
548 |
> |
value="2.2"/> |
549 |
|
|
550 |
< |
<condition property="build.novariance" value="-novariance"> |
550 |
> |
<condition property="novariance.arg" value="-novariance"> |
551 |
|
<and> |
552 |
|
<equals arg1="${gjc.version}" arg2="2.0"/> |
553 |
|
<or> |
557 |
|
</and> |
558 |
|
</condition> |
559 |
|
|
560 |
< |
<property name="build.novariance" |
560 |
> |
<property name="novariance.arg" |
561 |
|
value=""/> |
562 |
|
|
563 |
|
<property name="gjc.dir" |
567 |
|
location="${gjc.dir}/${gjc.version}/javac.jar"/> |
568 |
|
|
569 |
|
<property name="collect.jar" |
570 |
< |
location="${gjc.dir}/${gjc.version}/collect${build.novariance}.jar"/> |
570 |
> |
location="${gjc.dir}/${gjc.version}/collect${novariance.arg}.jar"/> |
571 |
|
|
572 |
|
|
573 |
< |
<condition property="build.warnunchecked" value="-warnunchecked"> |
573 |
> |
<condition property="warnunchecked.arg" value="-warnunchecked"> |
574 |
|
<istrue value="${gjc.warnunchecked}"/> |
575 |
|
</condition> |
576 |
|
|
577 |
< |
<property name="build.warnunchecked" value=""/> |
577 |
> |
<property name="warnunchecked.arg" value=""/> |
578 |
|
|
579 |
|
<condition property="prepare.src.dir" value="${build.dir}/prepare-src"> |
580 |
|
<istrue value="${build.nothreads}"/> |
585 |
|
! Bootclasspath munging for source compilation. |
586 |
|
--> |
587 |
|
|
588 |
< |
<path id="javac.bootclasspath.prefix"> |
531 |
< |
<!-- <pathelement location="${src.dir}"/> --> |
588 |
> |
<path id="pre.bootclasspath"> |
589 |
|
<pathelement location="${javac.jar}"/> |
590 |
|
</path> |
591 |
|
|
592 |
< |
<path id="javac.bootclasspath"> |
593 |
< |
<!-- <pathelement location="${src.dir}"/> --> |
592 |
> |
<path id="compile.bootclasspath"> |
593 |
> |
<pathelement location="${build.classes.dir}"/> |
594 |
|
<pathelement location="${collect.jar}"/> |
595 |
|
<pathelement location="${rt.jar}"/> |
596 |
|
</path> |
597 |
|
|
598 |
< |
<!-- Flatten bootclasspath prefix into a platform-appropriate string --> |
599 |
< |
<property name="javac.bootclasspath.prefix" |
600 |
< |
refid="javac.bootclasspath.prefix"/> |
544 |
< |
|
545 |
< |
<!-- Turn the flattened bootclasspath prefix into a javac argument --> |
546 |
< |
<property name="build.bootclasspath.arg" |
547 |
< |
value='-J-Xbootclasspath/p:${javac.bootclasspath.prefix}'/> |
548 |
< |
|
549 |
< |
<!-- Flatten bootclasspath for trace message --> |
550 |
< |
<property name="javac.bootclasspath" |
551 |
< |
refid="javac.bootclasspath"/> |
598 |
> |
<!-- Flatten paths into platform-appropriate strings --> |
599 |
> |
<property name="pre.bootclasspath" refid="pre.bootclasspath"/> |
600 |
> |
<property name="compile.bootclasspath" refid="compile.bootclasspath"/> |
601 |
|
|
553 |
– |
<!-- Common options in javac invocations --> |
554 |
– |
<property name="build.javac.args" |
555 |
– |
value="${build.bootclasspath.arg} ${build.warnunchecked} ${build.novariance}"/> |
602 |
|
|
603 |
< |
<echo>javac ${build.javac.args}</echo> |
604 |
< |
<echo>bootclasspath=${javac.bootclasspath}</echo> |
603 |
> |
<!-- Common options in javac invocations --> |
604 |
> |
<property name="gjc.args" |
605 |
> |
value="-J-Xbootclasspath/p:${pre.bootclasspath} ${warnunchecked.arg} ${novariance.arg}" |
606 |
> |
/> |
607 |
|
|
608 |
|
</target> |
609 |
|
|
639 |
|
</target> |
640 |
|
|
641 |
|
|
642 |
< |
<target name="configure-tests"> |
642 |
> |
<target name="configure-tests" |
643 |
> |
depends="configure-compiler"> |
644 |
|
|
645 |
|
<!-- junit.framework.Protectable is in JUnit 3.8.1 but not in 3.7 --> |
646 |
|
<available property="junit.available" |
661 |
|
<pathelement location="${junit.jar}"/> |
662 |
|
</path> |
663 |
|
|
664 |
< |
<!-- Flatten test classpath into a platform-appropriate string --> |
665 |
< |
<property name="test.classpath" refid="test.classpath"/> |
664 |
> |
<path id="test.compile.bootclasspath"> |
665 |
> |
<pathelement location="${javac.jar}"/> |
666 |
> |
<pathelement location="${collect.jar}"/> |
667 |
> |
<pathelement location="${rt.jar}"/> |
668 |
> |
</path> |
669 |
> |
|
670 |
> |
<path id="test.run.bootclasspath"> |
671 |
> |
<pathelement location="${javac.jar}"/> |
672 |
> |
<path refid="test.classpath"/> |
673 |
> |
</path> |
674 |
|
|
675 |
< |
<!-- Turn the flattened test classpath into a javac argument --> |
676 |
< |
<property name="test.bootclasspath.arg" |
677 |
< |
value='-Xbootclasspath/p:${test.classpath}'/> |
675 |
> |
<!-- Flatten test classpaths into platform-appropriate strings --> |
676 |
> |
<property name="test.classpath" refid="test.classpath"/> |
677 |
> |
<property name="test.compile.bootclasspath" refid="test.compile.bootclasspath"/> |
678 |
> |
<property name="test.run.bootclasspath" refid="test.run.bootclasspath"/> |
679 |
|
|
680 |
|
</target> |
681 |
|
|
706 |
|
</target> |
707 |
|
|
708 |
|
|
709 |
+ |
<target name="ng" depends="test"> |
710 |
+ |
<java classname="SuperfluousAbstract" fork="true"> |
711 |
+ |
|
712 |
+ |
<jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/> |
713 |
+ |
|
714 |
+ |
</java> |
715 |
+ |
</target> |
716 |
+ |
|
717 |
+ |
|
718 |
|
</project> |