| 59 |
|
|
| 60 |
|
|
| 61 |
|
|
| 62 |
<!-- Files excluded from emulation and dist-docs --> |
<!-- Files excluded from dist-docs and emulation jar --> |
| 63 |
<patternset id="emulation.excludes"> |
<patternset id="unsafe.exclusion"> |
| 64 |
<exclude name="java/util/Random.*"/> |
<exclude name="java/util/Random.*"/> |
| 65 |
<exclude name="sun/misc/Unsafe.*"/> |
<exclude name="sun/misc/Unsafe.*"/> |
| 66 |
</patternset> |
</patternset> |
| 67 |
|
|
| 68 |
|
<!-- Files excludes from emulation jar --> |
| 69 |
|
<patternset id="atomic.exclusion"> |
| 70 |
|
<exclude name="java/util/concurrent/atomic/AtomicBoolean*"/> |
| 71 |
|
<exclude name="java/util/concurrent/atomic/AtomicInteger*"/> |
| 72 |
|
<exclude name="java/util/concurrent/atomic/AtomicLong*"/> |
| 73 |
|
<exclude name="java/util/concurrent/atomic/AtomicReference*"/> |
| 74 |
|
</patternset> |
| 75 |
|
|
| 76 |
|
|
| 77 |
|
|
| 78 |
<!-- Main targets --> |
<!-- Main targets --> |
| 85 |
|
|
| 86 |
<mkdir dir="${build.classes.dir}"/> |
<mkdir dir="${build.classes.dir}"/> |
| 87 |
|
|
| 88 |
|
<!-- |
| 89 |
|
<echo>javac ${gjc.args}</echo> |
| 90 |
|
<echo>bootclasspath=${compile.bootclasspath}</echo> |
| 91 |
|
--> |
| 92 |
|
|
| 93 |
<javac srcdir="${prepare.src.dir}" |
<javac srcdir="${prepare.src.dir}" |
| 94 |
destdir="${build.classes.dir}" |
destdir="${build.classes.dir}" |
| 95 |
debug="${build.debug}" |
debug="${build.debug}" |
| 98 |
source="${build.sourcelevel}" |
source="${build.sourcelevel}" |
| 99 |
fork="true"> |
fork="true"> |
| 100 |
|
|
| 101 |
<bootclasspath refid="javac.bootclasspath"/> |
<compilerarg line="${gjc.args}"/> |
| 102 |
<compilerarg line="${build.javac.args}"/> |
<bootclasspath refid="compile.bootclasspath"/> |
| 103 |
|
|
| 104 |
</javac> |
</javac> |
| 105 |
|
|
| 190 |
source="${build.sourcelevel}" |
source="${build.sourcelevel}" |
| 191 |
fork="true"> |
fork="true"> |
| 192 |
|
|
| 193 |
<bootclasspath refid="javac.bootclasspath"/> |
<compilerarg line="${gjc.args} -s"/> |
| 194 |
<compilerarg line="${build.javac.args} -s"/> |
<bootclasspath refid="compile.bootclasspath"/> |
| 195 |
|
|
| 196 |
</javac> |
</javac> |
| 197 |
|
|
| 202 |
depends="init, dist-clean, dist-jar, dist-docs" |
depends="init, dist-clean, dist-jar, dist-docs" |
| 203 |
description="Puts all distributable products in single hierarchy"/> |
description="Puts all distributable products in single hierarchy"/> |
| 204 |
|
|
| 205 |
|
<target name="release" |
| 206 |
|
depends="dist" |
| 207 |
|
description="Puts entire CVS tree, plus distribution productions, in a jar"> |
| 208 |
|
|
| 209 |
|
<delete dir="${build.dir}"/> |
| 210 |
|
|
| 211 |
|
<property name="release.jar" value="dist/jsr166-${version}-dist.jar"/> |
| 212 |
|
|
| 213 |
|
<jar basedir="${basedir}" destfile="${release.jar}"> |
| 214 |
|
<exclude name="${release.jar}"/> |
| 215 |
|
<exclude name="user.properties"/> |
| 216 |
|
<exclude name="etc/notes/**"/> |
| 217 |
|
<exclude name="lib/gjc/2.1/**"/> |
| 218 |
|
<exclude name="**/SyntaxTest.java"/> |
| 219 |
|
</jar> |
| 220 |
|
|
| 221 |
|
</target> |
| 222 |
|
|
| 223 |
<target name="clean" |
<target name="clean" |
| 224 |
description="Removes all build products"> |
description="Removes all build products"> |
| 302 |
source="${build.sourcelevel}" |
source="${build.sourcelevel}" |
| 303 |
fork="true"> |
fork="true"> |
| 304 |
|
|
| 305 |
<bootclasspath refid="javac.bootclasspath"/> |
<compilerarg line="${gjc.args}"/> |
| 306 |
<compilerarg line="${build.javac.args}"/> |
<bootclasspath refid="compile.bootclasspath"/> |
| 307 |
|
|
| 308 |
</javac> |
</javac> |
| 309 |
|
|
| 317 |
|
|
| 318 |
<jar destfile="${product.jar}" duplicate="add"> |
<jar destfile="${product.jar}" duplicate="add"> |
| 319 |
<fileset dir="${build.classes.dir}"> |
<fileset dir="${build.classes.dir}"> |
| 320 |
<patternset refid="emulation.excludes"/> |
<patternset refid="atomic.exclusion"/> |
| 321 |
|
<patternset refid="unsafe.exclusion"/> |
| 322 |
</fileset> |
</fileset> |
| 323 |
<fileset dir="${build.emulation.dir}"/> |
<fileset dir="${build.emulation.dir}"/> |
| 324 |
</jar> |
</jar> |
| 358 |
</fileset> |
</fileset> |
| 359 |
</copy> |
</copy> |
| 360 |
|
|
| 361 |
|
<!-- Not needed now, used for doccheck filtering: |
| 362 |
|
<property name="generic.declarations" |
| 363 |
|
value="public interface E {} public interface T {} public interface K {} public interface V {}" |
| 364 |
|
/> |
| 365 |
|
--> |
| 366 |
|
|
| 367 |
<copy todir="${build.filter.src.dir}"> |
<copy todir="${build.filter.src.dir}"> |
| 368 |
<fileset dir="${src.dir}"> |
<fileset dir="${src.dir}"> |
| 369 |
<exclude name="**/*.html"/> |
<exclude name="**/*.html"/> |
| 370 |
<patternset refid="emulation.excludes"/> |
<patternset refid="unsafe.exclusion"/> |
| 371 |
</fileset> |
</fileset> |
| 372 |
<filterchain> |
<filterchain> |
| 373 |
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
|
|
classpath="${build.ant.dir}"> |
|
| 374 |
<!-- |
<!-- |
| 375 |
# These arguments are to get rid of angle-bracketed type |
# This filter gets rid of angle-bracketed type parameters |
| 376 |
# parameters so that javadoc can run on the result. The |
# so that javadoc can run on the result. The following |
| 377 |
# following heuristic that seems to work: |
# heuristic seems to work: |
| 378 |
# |
# |
| 379 |
# For all lines not starting with space(s)-asterisk-space(s), |
# For all lines not starting with space(s)-asterisk-space(s), |
| 380 |
# replace <something> with a space, where there may be more |
# replace <something> with a space, where there may be more |
| 382 |
# must not contain parens or pipes. (This may need some |
# must not contain parens or pipes. (This may need some |
| 383 |
# tweaking.) |
# tweaking.) |
| 384 |
--> |
--> |
| 385 |
|
|
| 386 |
|
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
| 387 |
|
classpath="${build.ant.dir}"> |
| 388 |
<param name="notmatching" value="^\s+\*\s.*$"/> |
<param name="notmatching" value="^\s+\*\s.*$"/> |
| 389 |
<param name="pattern" value="<[^|>()]+?>+"/> |
<param name="pattern" value="<[^|>()]+?>+"/> |
| 390 |
<param name="replacement" value=" "/> |
<param name="replacement" value=" "/> |
| 391 |
</filterreader> |
</filterreader> |
| 392 |
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
|
| 393 |
classpath="${build.ant.dir}"> |
|
| 394 |
<!-- |
<!-- |
| 395 |
# These arguments are to uncomment lines beginning with |
# This filter uncomments lines beginning with "//@" so that |
| 396 |
# "//@" so that javadoc can see imports that are needed |
# javadoc can see imports that are needed to resolve links |
| 397 |
# to resolve links but that shouldn't be in the compiled |
# but that shouldn't be in the compiled code. |
|
# code. |
|
| 398 |
--> |
--> |
| 399 |
|
|
| 400 |
|
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
| 401 |
|
classpath="${build.ant.dir}"> |
| 402 |
<param name="matching" value="^//@.*$"/> |
<param name="matching" value="^//@.*$"/> |
| 403 |
<param name="pattern" value="^//@"/> |
<param name="pattern" value="^//@"/> |
| 404 |
<param name="replacement" value=""/> |
<param name="replacement" value=""/> |
| 405 |
</filterreader> |
</filterreader> |
| 406 |
|
|
| 407 |
|
|
| 408 |
|
<!-- |
| 409 |
|
# The next two filters try to make the source look like |
| 410 |
|
# something that doccheck can process. The first removes |
| 411 |
|
# -source 1.4 assertions and the second adds in a bunch |
| 412 |
|
# of single letter public nested marker interfaces so that |
| 413 |
|
# the generic type parameters are recognized. |
| 414 |
|
# |
| 415 |
|
# Currently commented out because doccheck doesn't work. :-( |
| 416 |
|
--> |
| 417 |
|
|
| 418 |
|
<!-- |
| 419 |
|
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
| 420 |
|
classpath="${build.ant.dir}"> |
| 421 |
|
<param name="matching" value="^\s*assert[\s ].*$"/> |
| 422 |
|
<param name="pattern" value="assert"/> |
| 423 |
|
<param name="replacement" value="//assert"/> |
| 424 |
|
</filterreader> |
| 425 |
|
|
| 426 |
|
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
| 427 |
|
classpath="${build.ant.dir}"> |
| 428 |
|
<param name="matching" value="^(.*(class|interface|implements) .*|)\{.*$"/> |
| 429 |
|
<param name="pattern" value="$"/> |
| 430 |
|
<param name="replacement" value=" ${generic.declarations}"/> |
| 431 |
|
</filterreader> |
| 432 |
|
--> |
| 433 |
|
|
| 434 |
</filterchain> |
</filterchain> |
| 435 |
</copy> |
</copy> |
| 436 |
|
|
| 442 |
|
|
| 443 |
<mkdir dir="${build.testcases.dir}"/> |
<mkdir dir="${build.testcases.dir}"/> |
| 444 |
|
|
| 445 |
|
<!-- |
| 446 |
|
<echo>javac ${gjc.args}</echo> |
| 447 |
|
<echo>bootclasspath=${test.compile.bootclasspath}</echo> |
| 448 |
|
<echo>classpath="${test.classpath}"</echo> |
| 449 |
|
--> |
| 450 |
|
|
| 451 |
<javac srcdir="${test.src.dir}" |
<javac srcdir="${test.src.dir}" |
| 452 |
destdir="${build.testcases.dir}" |
destdir="${build.testcases.dir}" |
| 453 |
debug="${build.debug}" |
debug="${build.debug}" |
| 456 |
source="${build.sourcelevel}" |
source="${build.sourcelevel}" |
| 457 |
fork="true"> |
fork="true"> |
| 458 |
|
|
| 459 |
|
<compilerarg line="${gjc.args}"/> |
| 460 |
|
<bootclasspath refid="test.compile.bootclasspath"/> |
| 461 |
<classpath refid="test.classpath"/> |
<classpath refid="test.classpath"/> |
|
<bootclasspath refid="javac.bootclasspath"/> |
|
|
<compilerarg line="${build.javac.args}"/> |
|
| 462 |
|
|
| 463 |
</javac> |
</javac> |
| 464 |
|
|
| 480 |
dir="${build.reports.dir}" |
dir="${build.reports.dir}" |
| 481 |
fork="true"> |
fork="true"> |
| 482 |
|
|
| 483 |
<jvmarg value="${test.bootclasspath.arg}"/> |
<jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/> |
| 484 |
|
|
| 485 |
<formatter type="xml"/> |
<formatter type="xml"/> |
| 486 |
|
|
| 526 |
<property name="gjc.version" |
<property name="gjc.version" |
| 527 |
value="2.0"/> |
value="2.0"/> |
| 528 |
|
|
| 529 |
<condition property="build.novariance" value="-novariance"> |
<condition property="novariance.arg" value="-novariance"> |
| 530 |
<and> |
<and> |
| 531 |
<equals arg1="${gjc.version}" arg2="2.0"/> |
<equals arg1="${gjc.version}" arg2="2.0"/> |
| 532 |
<or> |
<or> |
| 536 |
</and> |
</and> |
| 537 |
</condition> |
</condition> |
| 538 |
|
|
| 539 |
<property name="build.novariance" |
<property name="novariance.arg" |
| 540 |
value=""/> |
value=""/> |
| 541 |
|
|
| 542 |
<property name="gjc.dir" |
<property name="gjc.dir" |
| 546 |
location="${gjc.dir}/${gjc.version}/javac.jar"/> |
location="${gjc.dir}/${gjc.version}/javac.jar"/> |
| 547 |
|
|
| 548 |
<property name="collect.jar" |
<property name="collect.jar" |
| 549 |
location="${gjc.dir}/${gjc.version}/collect${build.novariance}.jar"/> |
location="${gjc.dir}/${gjc.version}/collect${novariance.arg}.jar"/> |
| 550 |
|
|
| 551 |
|
|
| 552 |
<condition property="build.warnunchecked" value="-warnunchecked"> |
<condition property="warnunchecked.arg" value="-warnunchecked"> |
| 553 |
<istrue value="${gjc.warnunchecked}"/> |
<istrue value="${gjc.warnunchecked}"/> |
| 554 |
</condition> |
</condition> |
| 555 |
|
|
| 556 |
<property name="build.warnunchecked" value=""/> |
<property name="warnunchecked.arg" value=""/> |
| 557 |
|
|
| 558 |
<condition property="prepare.src.dir" value="${build.dir}/prepare-src"> |
<condition property="prepare.src.dir" value="${build.dir}/prepare-src"> |
| 559 |
<istrue value="${build.nothreads}"/> |
<istrue value="${build.nothreads}"/> |
| 564 |
! Bootclasspath munging for source compilation. |
! Bootclasspath munging for source compilation. |
| 565 |
--> |
--> |
| 566 |
|
|
| 567 |
<path id="javac.bootclasspath.prefix"> |
<path id="pre.bootclasspath"> |
|
<!-- <pathelement location="${src.dir}"/> --> |
|
| 568 |
<pathelement location="${javac.jar}"/> |
<pathelement location="${javac.jar}"/> |
| 569 |
</path> |
</path> |
| 570 |
|
|
| 571 |
<path id="javac.bootclasspath"> |
<path id="compile.bootclasspath"> |
| 572 |
<!-- <pathelement location="${src.dir}"/> --> |
<pathelement location="${build.classes.dir}"/> |
| 573 |
<pathelement location="${collect.jar}"/> |
<pathelement location="${collect.jar}"/> |
| 574 |
<pathelement location="${rt.jar}"/> |
<pathelement location="${rt.jar}"/> |
| 575 |
</path> |
</path> |
| 576 |
|
|
| 577 |
<!-- Flatten bootclasspath prefix into a platform-appropriate string --> |
<!-- Flatten paths into platform-appropriate strings --> |
| 578 |
<property name="javac.bootclasspath.prefix" |
<property name="pre.bootclasspath" refid="pre.bootclasspath"/> |
| 579 |
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"/> |
|
| 580 |
|
|
|
<!-- Common options in javac invocations --> |
|
|
<property name="build.javac.args" |
|
|
value="${build.bootclasspath.arg} ${build.warnunchecked} ${build.novariance}"/> |
|
| 581 |
|
|
| 582 |
<echo>javac ${build.javac.args}</echo> |
<!-- Common options in javac invocations --> |
| 583 |
<echo>bootclasspath=${javac.bootclasspath}</echo> |
<property name="gjc.args" |
| 584 |
|
value="-J-Xbootclasspath/p:${pre.bootclasspath} ${warnunchecked.arg} ${novariance.arg}" |
| 585 |
|
/> |
| 586 |
|
|
| 587 |
</target> |
</target> |
| 588 |
|
|
| 618 |
</target> |
</target> |
| 619 |
|
|
| 620 |
|
|
| 621 |
<target name="configure-tests"> |
<target name="configure-tests" |
| 622 |
|
depends="configure-compiler"> |
| 623 |
|
|
| 624 |
<!-- 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 --> |
| 625 |
<available property="junit.available" |
<available property="junit.available" |
| 640 |
<pathelement location="${junit.jar}"/> |
<pathelement location="${junit.jar}"/> |
| 641 |
</path> |
</path> |
| 642 |
|
|
| 643 |
<!-- Flatten test classpath into a platform-appropriate string --> |
<path id="test.compile.bootclasspath"> |
| 644 |
<property name="test.classpath" refid="test.classpath"/> |
<pathelement location="${javac.jar}"/> |
| 645 |
|
<pathelement location="${collect.jar}"/> |
| 646 |
|
<pathelement location="${rt.jar}"/> |
| 647 |
|
</path> |
| 648 |
|
|
| 649 |
|
<path id="test.run.bootclasspath"> |
| 650 |
|
<pathelement location="${javac.jar}"/> |
| 651 |
|
<path refid="test.classpath"/> |
| 652 |
|
</path> |
| 653 |
|
|
| 654 |
<!-- Turn the flattened test classpath into a javac argument --> |
<!-- Flatten test classpaths into platform-appropriate strings --> |
| 655 |
<property name="test.bootclasspath.arg" |
<property name="test.classpath" refid="test.classpath"/> |
| 656 |
value='-Xbootclasspath/p:${test.classpath}'/> |
<property name="test.compile.bootclasspath" refid="test.compile.bootclasspath"/> |
| 657 |
|
<property name="test.run.bootclasspath" refid="test.run.bootclasspath"/> |
| 658 |
|
|
| 659 |
</target> |
</target> |
| 660 |
|
|
| 685 |
</target> |
</target> |
| 686 |
|
|
| 687 |
|
|
| 688 |
|
<target name="ng" depends="test"> |
| 689 |
|
<java classname="SuperfluousAbstract" fork="true"> |
| 690 |
|
|
| 691 |
|
<jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/> |
| 692 |
|
|
| 693 |
|
</java> |
| 694 |
|
</target> |
| 695 |
|
|
| 696 |
|
|
| 697 |
</project> |
</project> |