| 77 |
|
|
| 78 |
<mkdir dir="${build.classes.dir}"/> |
<mkdir dir="${build.classes.dir}"/> |
| 79 |
|
|
| 80 |
|
<!-- |
| 81 |
|
<echo>javac ${gjc.args}</echo> |
| 82 |
|
<echo>bootclasspath=${compile.bootclasspath}</echo> |
| 83 |
|
--> |
| 84 |
|
|
| 85 |
<javac srcdir="${prepare.src.dir}" |
<javac srcdir="${prepare.src.dir}" |
| 86 |
destdir="${build.classes.dir}" |
destdir="${build.classes.dir}" |
| 87 |
debug="${build.debug}" |
debug="${build.debug}" |
| 90 |
source="${build.sourcelevel}" |
source="${build.sourcelevel}" |
| 91 |
fork="true"> |
fork="true"> |
| 92 |
|
|
| 93 |
<bootclasspath refid="javac.bootclasspath"/> |
<compilerarg line="${gjc.args}"/> |
| 94 |
<compilerarg line="${build.javac.args}"/> |
<bootclasspath refid="compile.bootclasspath"/> |
| 95 |
|
|
| 96 |
</javac> |
</javac> |
| 97 |
|
|
| 182 |
source="${build.sourcelevel}" |
source="${build.sourcelevel}" |
| 183 |
fork="true"> |
fork="true"> |
| 184 |
|
|
| 185 |
<bootclasspath refid="javac.bootclasspath"/> |
<compilerarg line="${gjc.args} -s"/> |
| 186 |
<compilerarg line="${build.javac.args} -s"/> |
<bootclasspath refid="compile.bootclasspath"/> |
| 187 |
|
|
| 188 |
</javac> |
</javac> |
| 189 |
|
|
| 277 |
source="${build.sourcelevel}" |
source="${build.sourcelevel}" |
| 278 |
fork="true"> |
fork="true"> |
| 279 |
|
|
| 280 |
<bootclasspath refid="javac.bootclasspath"/> |
<compilerarg line="${gjc.args}"/> |
| 281 |
<compilerarg line="${build.javac.args}"/> |
<bootclasspath refid="compile.bootclasspath"/> |
| 282 |
|
|
| 283 |
</javac> |
</javac> |
| 284 |
|
|
| 332 |
</fileset> |
</fileset> |
| 333 |
</copy> |
</copy> |
| 334 |
|
|
| 335 |
|
<!-- Not needed now, used for doccheck filtering: |
| 336 |
|
<property name="generic.declarations" |
| 337 |
|
value="public interface E {} public interface T {} public interface K {} public interface V {}" |
| 338 |
|
/> |
| 339 |
|
--> |
| 340 |
|
|
| 341 |
<copy todir="${build.filter.src.dir}"> |
<copy todir="${build.filter.src.dir}"> |
| 342 |
<fileset dir="${src.dir}"> |
<fileset dir="${src.dir}"> |
| 343 |
<exclude name="**/*.html"/> |
<exclude name="**/*.html"/> |
| 344 |
<patternset refid="emulation.excludes"/> |
<patternset refid="emulation.excludes"/> |
| 345 |
</fileset> |
</fileset> |
| 346 |
<filterchain> |
<filterchain> |
| 347 |
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
|
|
classpath="${build.ant.dir}"> |
|
| 348 |
<!-- |
<!-- |
| 349 |
# These arguments are to get rid of angle-bracketed type |
# This filter gets rid of angle-bracketed type parameters |
| 350 |
# parameters so that javadoc can run on the result. The |
# so that javadoc can run on the result. The following |
| 351 |
# following heuristic that seems to work: |
# heuristic seems to work: |
| 352 |
# |
# |
| 353 |
# For all lines not starting with space(s)-asterisk-space(s), |
# For all lines not starting with space(s)-asterisk-space(s), |
| 354 |
# replace <something> with a space, where there may be more |
# replace <something> with a space, where there may be more |
| 356 |
# must not contain parens or pipes. (This may need some |
# must not contain parens or pipes. (This may need some |
| 357 |
# tweaking.) |
# tweaking.) |
| 358 |
--> |
--> |
| 359 |
|
|
| 360 |
|
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
| 361 |
|
classpath="${build.ant.dir}"> |
| 362 |
<param name="notmatching" value="^\s+\*\s.*$"/> |
<param name="notmatching" value="^\s+\*\s.*$"/> |
| 363 |
<param name="pattern" value="<[^|>()]+?>+"/> |
<param name="pattern" value="<[^|>()]+?>+"/> |
| 364 |
<param name="replacement" value=" "/> |
<param name="replacement" value=" "/> |
| 365 |
</filterreader> |
</filterreader> |
| 366 |
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
|
| 367 |
classpath="${build.ant.dir}"> |
|
| 368 |
<!-- |
<!-- |
| 369 |
# These arguments are to uncomment lines beginning with |
# This filter uncomments lines beginning with "//@" so that |
| 370 |
# "//@" so that javadoc can see imports that are needed |
# javadoc can see imports that are needed to resolve links |
| 371 |
# to resolve links but that shouldn't be in the compiled |
# but that shouldn't be in the compiled code. |
|
# code. |
|
| 372 |
--> |
--> |
| 373 |
|
|
| 374 |
|
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
| 375 |
|
classpath="${build.ant.dir}"> |
| 376 |
<param name="matching" value="^//@.*$"/> |
<param name="matching" value="^//@.*$"/> |
| 377 |
<param name="pattern" value="^//@"/> |
<param name="pattern" value="^//@"/> |
| 378 |
<param name="replacement" value=""/> |
<param name="replacement" value=""/> |
| 379 |
</filterreader> |
</filterreader> |
| 380 |
|
|
| 381 |
|
|
| 382 |
|
<!-- |
| 383 |
|
# The next two filters try to make the source look like |
| 384 |
|
# something that doccheck can process. The first removes |
| 385 |
|
# -source 1.4 assertions and the second adds in a bunch |
| 386 |
|
# of single letter public nested marker interfaces so that |
| 387 |
|
# the generic type parameters are recognized. |
| 388 |
|
# |
| 389 |
|
# Currently commented out because doccheck doesn't work. :-( |
| 390 |
|
--> |
| 391 |
|
|
| 392 |
|
<!-- |
| 393 |
|
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
| 394 |
|
classpath="${build.ant.dir}"> |
| 395 |
|
<param name="matching" value="^\s*assert[\s ].*$"/> |
| 396 |
|
<param name="pattern" value="assert"/> |
| 397 |
|
<param name="replacement" value="//assert"/> |
| 398 |
|
</filterreader> |
| 399 |
|
|
| 400 |
|
<filterreader classname="jsr166.ant.filters.ReplaceFilter" |
| 401 |
|
classpath="${build.ant.dir}"> |
| 402 |
|
<param name="matching" value="^(.*(class|interface|implements) .*|)\{.*$"/> |
| 403 |
|
<param name="pattern" value="$"/> |
| 404 |
|
<param name="replacement" value=" ${generic.declarations}"/> |
| 405 |
|
</filterreader> |
| 406 |
|
--> |
| 407 |
|
|
| 408 |
</filterchain> |
</filterchain> |
| 409 |
</copy> |
</copy> |
| 410 |
|
|
| 416 |
|
|
| 417 |
<mkdir dir="${build.testcases.dir}"/> |
<mkdir dir="${build.testcases.dir}"/> |
| 418 |
|
|
| 419 |
|
<!-- |
| 420 |
|
<echo>javac ${gjc.args}</echo> |
| 421 |
|
<echo>bootclasspath=${test.compile.bootclasspath}</echo> |
| 422 |
|
<echo>classpath="${test.classpath}"</echo> |
| 423 |
|
--> |
| 424 |
|
|
| 425 |
<javac srcdir="${test.src.dir}" |
<javac srcdir="${test.src.dir}" |
| 426 |
destdir="${build.testcases.dir}" |
destdir="${build.testcases.dir}" |
| 427 |
debug="${build.debug}" |
debug="${build.debug}" |
| 430 |
source="${build.sourcelevel}" |
source="${build.sourcelevel}" |
| 431 |
fork="true"> |
fork="true"> |
| 432 |
|
|
| 433 |
|
<compilerarg line="${gjc.args}"/> |
| 434 |
|
<bootclasspath refid="test.compile.bootclasspath"/> |
| 435 |
<classpath refid="test.classpath"/> |
<classpath refid="test.classpath"/> |
|
<bootclasspath refid="javac.bootclasspath"/> |
|
|
<compilerarg line="${build.javac.args}"/> |
|
| 436 |
|
|
| 437 |
</javac> |
</javac> |
| 438 |
|
|
| 454 |
dir="${build.reports.dir}" |
dir="${build.reports.dir}" |
| 455 |
fork="true"> |
fork="true"> |
| 456 |
|
|
| 457 |
<jvmarg value="${test.bootclasspath.arg}"/> |
<jvmarg value="-Xbootclasspath/p:${test.run.bootclasspath}"/> |
| 458 |
|
|
| 459 |
<formatter type="xml"/> |
<formatter type="xml"/> |
| 460 |
|
|
| 498 |
<target name="configure-compiler"> |
<target name="configure-compiler"> |
| 499 |
|
|
| 500 |
<property name="gjc.version" |
<property name="gjc.version" |
| 501 |
value="1.3"/> |
value="2.0"/> |
| 502 |
|
|
| 503 |
<condition property="build.novariance" value="-novariance"> |
<condition property="novariance.arg" value="-novariance"> |
| 504 |
<and> |
<and> |
| 505 |
<equals arg1="${gjc.version}" arg2="2.0"/> |
<equals arg1="${gjc.version}" arg2="2.0"/> |
| 506 |
<or> |
<or> |
| 510 |
</and> |
</and> |
| 511 |
</condition> |
</condition> |
| 512 |
|
|
| 513 |
<property name="build.novariance" |
<property name="novariance.arg" |
| 514 |
value=""/> |
value=""/> |
| 515 |
|
|
| 516 |
<property name="gjc.dir" |
<property name="gjc.dir" |
| 520 |
location="${gjc.dir}/${gjc.version}/javac.jar"/> |
location="${gjc.dir}/${gjc.version}/javac.jar"/> |
| 521 |
|
|
| 522 |
<property name="collect.jar" |
<property name="collect.jar" |
| 523 |
location="${gjc.dir}/${gjc.version}/collect${build.novariance}.jar"/> |
location="${gjc.dir}/${gjc.version}/collect${novariance.arg}.jar"/> |
| 524 |
|
|
| 525 |
|
|
| 526 |
<condition property="build.warnunchecked" value="-warnunchecked"> |
<condition property="warnunchecked.arg" value="-warnunchecked"> |
| 527 |
<istrue value="${gjc.warnunchecked}"/> |
<istrue value="${gjc.warnunchecked}"/> |
| 528 |
</condition> |
</condition> |
| 529 |
|
|
| 530 |
<property name="build.warnunchecked" value=""/> |
<property name="warnunchecked.arg" value=""/> |
| 531 |
|
|
| 532 |
|
<condition property="prepare.src.dir" value="${build.dir}/prepare-src"> |
| 533 |
|
<istrue value="${build.nothreads}"/> |
| 534 |
|
</condition> |
| 535 |
|
|
| 536 |
|
|
| 537 |
<!-- |
<!-- |
| 538 |
! Bootclasspath munging for source compilation. |
! Bootclasspath munging for source compilation. |
| 539 |
--> |
--> |
| 540 |
|
|
| 541 |
<path id="javac.bootclasspath.prefix"> |
<path id="pre.bootclasspath"> |
|
<!-- <pathelement location="${src.dir}"/> --> |
|
| 542 |
<pathelement location="${javac.jar}"/> |
<pathelement location="${javac.jar}"/> |
| 543 |
</path> |
</path> |
| 544 |
|
|
| 545 |
<path id="javac.bootclasspath"> |
<path id="compile.bootclasspath"> |
|
<!-- <pathelement location="${src.dir}"/> --> |
|
| 546 |
<pathelement location="${collect.jar}"/> |
<pathelement location="${collect.jar}"/> |
| 547 |
<pathelement location="${rt.jar}"/> |
<pathelement location="${rt.jar}"/> |
| 548 |
</path> |
</path> |
| 549 |
|
|
| 550 |
<!-- Flatten bootclasspath prefix into a platform-appropriate string --> |
<!-- Flatten paths into platform-appropriate strings --> |
| 551 |
<property name="javac.bootclasspath.prefix" |
<property name="pre.bootclasspath" refid="pre.bootclasspath"/> |
| 552 |
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"/> |
|
| 553 |
|
|
|
<!-- Common options in javac invocations --> |
|
|
<property name="build.javac.args" |
|
|
value="${build.bootclasspath.arg} ${build.warnunchecked} ${build.novariance}"/> |
|
| 554 |
|
|
| 555 |
<echo>javac ${build.javac.args}</echo> |
<!-- Common options in javac invocations --> |
| 556 |
<echo>bootclasspath=${javac.bootclasspath}</echo> |
<property name="gjc.args" |
| 557 |
|
value="-J-Xbootclasspath/p:${pre.bootclasspath} ${warnunchecked.arg} ${novariance.arg}" |
| 558 |
|
/> |
| 559 |
|
|
| 560 |
</target> |
</target> |
| 561 |
|
|
| 562 |
|
|
|
<target name="configure-src"> |
|
|
|
|
|
<condition property="prepare.src.dir" value="${build.dir}/prepare-src"> |
|
|
<istrue value="${build.nothreads}"/> |
|
|
</condition> |
|
|
|
|
|
</target> |
|
|
|
|
| 563 |
<target name="prepare-src" |
<target name="prepare-src" |
| 564 |
depends="configure-src" |
depends="configure-compiler" |
| 565 |
if="prepare.src.dir"> |
if="prepare.src.dir"> |
| 566 |
|
|
| 567 |
<mkdir dir="${prepare.src.dir}"/> |
<mkdir dir="${prepare.src.dir}"/> |
| 591 |
</target> |
</target> |
| 592 |
|
|
| 593 |
|
|
| 594 |
<target name="configure-tests"> |
<target name="configure-tests" |
| 595 |
|
depends="configure-compiler"> |
| 596 |
|
|
| 597 |
<!-- 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 --> |
| 598 |
<available property="junit.available" |
<available property="junit.available" |
| 613 |
<pathelement location="${junit.jar}"/> |
<pathelement location="${junit.jar}"/> |
| 614 |
</path> |
</path> |
| 615 |
|
|
| 616 |
<!-- Flatten test classpath into a platform-appropriate string --> |
<path id="test.compile.bootclasspath"> |
| 617 |
<property name="test.classpath" refid="test.classpath"/> |
<pathelement location="${javac.jar}"/> |
| 618 |
|
<pathelement location="${collect.jar}"/> |
| 619 |
|
<pathelement location="${rt.jar}"/> |
| 620 |
|
</path> |
| 621 |
|
|
| 622 |
<!-- Turn the flattened test classpath into a javac argument --> |
<path id="test.run.bootclasspath"> |
| 623 |
<property name="test.bootclasspath.arg" |
<pathelement location="${javac.jar}"/> |
| 624 |
value='-Xbootclasspath/p:${test.classpath}'/> |
<path refid="test.classpath"/> |
| 625 |
|
</path> |
| 626 |
|
|
| 627 |
|
<!-- Flatten test classpaths into platform-appropriate strings --> |
| 628 |
|
<property name="test.classpath" refid="test.classpath"/> |
| 629 |
|
<property name="test.compile.bootclasspath" refid="test.compile.bootclasspath"/> |
| 630 |
|
<property name="test.run.bootclasspath" refid="test.run.bootclasspath"/> |
| 631 |
|
|
| 632 |
</target> |
</target> |
| 633 |
|
|