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