]> granicus.if.org Git - php/commitdiff
Improve build instructions in README
authorNikita Popov <nikita.ppv@gmail.com>
Wed, 18 Mar 2020 15:29:09 +0000 (16:29 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 18 Mar 2020 15:29:09 +0000 (16:29 +0100)
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

index 204fe71489d929ff3beb59d09d5a344a18bda0a6..b2bef9624769227171f417020c519c709bd45ff8 100644 (file)
--- 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