--- old/doc/building.md 2018-01-25 22:27:17.920575560 +0100 +++ new/doc/building.md 2018-01-25 22:27:17.772574826 +0100 @@ -7,13 +7,14 @@ on Windows) and cloned the top-level OpenJDK repository that you want to build. 1. [Get the complete source code](#getting-the-source-code): \ - `hg clone http://hg.openjdk.java.net/jdk10/master` + `hg clone http://hg.openjdk.java.net/jdk/jdk` 2. [Run configure](#running-configure): \ `bash configure` If `configure` fails due to missing dependencies (to either the - [toolchain](#native-compiler-toolchain-requirements), [external libraries]( + [toolchain](#native-compiler-toolchain-requirements), [build tools]( + #build-tools-requirements), [external libraries]( #external-library-requirements) or the [boot JDK](#boot-jdk-requirements)), most of the time it prints a suggestion on how to resolve the situation on your platform. Follow the instructions, and try running `bash configure` @@ -195,13 +196,14 @@ Apart from the basic Cygwin installation, the following packages must also be installed: + * `autoconf` * `make` * `zip` * `unzip` Often, you can install these packages using the following command line: ``` -/setup-x86_64 -q -P make -P unzip -P zip +/setup-x86_64 -q -P autoconf -P make -P unzip -P zip ``` Unfortunately, Cygwin can be unreliable in certain circumstances. If you @@ -552,7 +554,27 @@ Use `--with-libffi=` if `configure` does not properly locate your libffi files. -## Other Tooling Requirements +## Build Tools Requirements + +### Autoconf + +OpenJDK requires [Autoconf](http://www.gnu.org/software/autoconf) on all +platforms. At least version 2.69 is required. + + * To install on an apt-based Linux, try running `sudo apt-get install + autoconf`. + * To install on an rpm-based Linux, try running `sudo yum install + autoconf`. + * To install on macOS, try running `brew install autoconf`. + * To install on Windows, try running `/setup-x86_64 -q + -P autoconf`. + +If `configure` has problems locating your installation of autoconf, you can +specify it using the `AUTOCONF` environment variable, like this: + +``` +AUTOCONF= configure ... +``` ### GNU Make @@ -585,19 +607,6 @@ At least version 3.2 of GNU Bash must be used. -### Autoconf - -If you want to modify the build system itself, you need to install [Autoconf]( -http://www.gnu.org/software/autoconf). - -However, if you only need to build OpenJDK or if you only edit the actual -OpenJDK source files, there is no dependency on autoconf, since the source -distribution includes a pre-generated `configure` shell script. - -See the section on [Autoconf Details](#autoconf-details) for details on how -OpenJDK uses autoconf. This is especially important if you plan to contribute -changes to OpenJDK that modifies the build system. - ## Running Configure To build OpenJDK, you need a "configuration", which consists of a directory @@ -1660,32 +1669,19 @@ deviate from a normal autoconf `configure` script. The `configure` script in the top level directory of OpenJDK is just a thin -wrapper that calls `make/autoconf/configure`. This in turn provides -functionality that is not easily expressed in the normal Autoconf framework, -and then calls into the core of the `configure` script, which is the -`make/autoconf/generated-configure.sh` file. - -As the name implies, this file is generated by Autoconf. It is checked in after -regeneration, to alleviate the common user to have to install Autoconf. +wrapper that calls `make/autoconf/configure`. This in turn will run `autoconf` +to create the runnable (generated) configure script, as +`.build/generated-configure.sh`. Apart from being responsible for the +generation of the runnable script, the `configure` script also provides +functionality that is not easily expressed in the normal Autoconf framework. As +part of this functionality, the generated script is called. The build system will detect if the Autoconf source files have changed, and -will trigger a regeneration of `make/autoconf/generated-configure.sh` if -needed. You can also manually request such an update by `bash -make/autoconf/autogen.sh`. - -If you make changes to the build system that requires a re-generation, note the -following: - - * You must use *exactly* version 2.69 of autoconf for your patch to be - accepted. This is to avoid spurious changes in the generated file. Note - that Ubuntu 16.04 ships a patched version of autoconf which claims to be - 2.69, but is not. - - * You do not need to include the generated file in reviews. - - * If the generated file needs updating, the Oracle JDK closed counter-part - will also need to be updated. It is very much appreciated if you ask for an - Oracle engineer to sponsor your push so this can be made in tandem. +will trigger a regeneration of the generated script if needed. You can also +manually request such an update by `bash configure autogen`. + +In previous versions of the OpenJDK, the generated script was checked in at +`make/autoconf/generated-configure.sh`. This is no longer the case. ### Developing the Build System Itself @@ -1736,8 +1732,7 @@ Please check that you adhere to the [Code Conventions for the Build System]( http://openjdk.java.net/groups/build/doc/code-conventions.html) before -submitting patches. Also see the section in [Autoconf Details]( -#autoconf-details) about the generated configure script. +submitting patches. ## Contributing to OpenJDK