From 22a2817d3c5da0f57c6e05134ffd6a6d55629cdd Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 18 Mar 2020 16:29:09 +0100 Subject: [PATCH] Improve build instructions in README Provide enough information to get a build going without hunting down packages. If someone wants to add info for macos or other distros, that would probably be nice as well. --- README.md | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 204fe71489..b2bef96247 100644 --- a/README.md +++ b/README.md @@ -39,24 +39,31 @@ For other systems, see the [installation chapter](https://php.net/install). *For Windows, see [Build your own PHP on Windows](https://wiki.php.net/internals/windows/stepbystepbuild_sdk_2).* -PHP uses autotools on Unix systems to configure the build: +For a minimal PHP build from Git, you will need autoconf, bison, and re2c. For +a default build, you will additionally need libxml2 and libsqlite3. On Ubuntu, +you can install these using: - ./buildconf - ./configure [options] + sudo apt install -y build-essential autoconf bison re2c \ + libxml2-dev libsqlite3-dev + +Generate configure: -*See `./configure -h` for configuration options.* + ./buildconf - make [options] +Configure your build. `--enable-debug` is recommended for development, see +`./configure --help` for a full list of options. -*See `make -h` for make options.* + # For development + ./configure --enable-debug + # For production + ./configure -The `-j` option shall set the maximum number of jobs `make` can use for the -build: +Build PHP. To speed up the build, specify the maximum number of jobs using `-j`: make -j4 -Shall run `make` with a maximum of 4 concurrent jobs: Generally the maximum -number of jobs should not exceed the number of cores available. +The number of jobs should usually match the number of available cores, which +can be determined using `nproc`. ## Testing PHP source code -- 2.40.0