RFR: CODETOOLS-7903604: Provide Build.java to (eventually) replace `build.sh`
Jonathan Gibbons
jjg at openjdk.org
Tue Jan 16 18:56:13 UTC 2024
Please review a new, alternative way to download the dependencies needed to build `jtreg`.
Currently, the generally recommended way to download or otherwise find the dependencies is to use the `make/build.sh` script. This PR provides an essentially equivalent alternative written in Java: `make/Build.java`, which is a single source file and so can be run with the standard support for running single source file programs in the Java launcher.
old: sh make/build.sh options...
new: path/to/java make/Build.java options...
The configuration values are essentially the same; in particular, the default configuration values in `make/build-support/version-numbers` are exactly the same as for `build.sh`. Configuration values may now also be given on the command-line or in a file specified on the command line. The primary configuration difference is that there is no longer support for downloading a version of JDK to build jtreg; the default is to use the same version of JDK as is used to run `Build.java` although an alternate version of JDK to build `jtreg` itself can be specified as an option to `Build.java`.
As with `build.sh`, the new `Build.java` writes and optionally executes a shell script to run `make` with variables set up to point to the local version of the dependencies.
There is no change to the makefiles, or to the functionality of `jtreg` itself.
There are minor internal changes to the organization of the dependencies in the `build/deps` directory, and minor changes to the logging output written by the program.
The old `build.sh` and related shell files remain in place for now, but may be removed at some point in the future.
-------------
Commit messages:
- Fix whitespace
- address review feedback
- collect all use of external commands and tools in a single new class `Tools` to facilitate use in different operating systems.
- CODETOOLS-7903604: Provide Build.java to (eventually) replace `build.sh`.
Changes: https://git.openjdk.org/jtreg/pull/177/files
Webrev: https://webrevs.openjdk.org/?repo=jtreg&pr=177&range=00
Issue: https://bugs.openjdk.org/browse/CODETOOLS-7903604
Stats: 1616 lines in 1 file changed: 1616 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/jtreg/pull/177.diff
Fetch: git fetch https://git.openjdk.org/jtreg.git pull/177/head:pull/177
PR: https://git.openjdk.org/jtreg/pull/177
More information about the jtreg-dev
mailing list