Skip to content

Commit 22a2817

Browse files
committed
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.
1 parent f768a55 commit 22a2817

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

README.md

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,24 +39,31 @@ For other systems, see the [installation chapter](https://php.net/install).
3939

4040
*For Windows, see [Build your own PHP on Windows](https://wiki.php.net/internals/windows/stepbystepbuild_sdk_2).*
4141

42-
PHP uses autotools on Unix systems to configure the build:
42+
For a minimal PHP build from Git, you will need autoconf, bison, and re2c. For
43+
a default build, you will additionally need libxml2 and libsqlite3. On Ubuntu,
44+
you can install these using:
4345

44-
./buildconf
45-
./configure [options]
46+
sudo apt install -y build-essential autoconf bison re2c \
47+
libxml2-dev libsqlite3-dev
48+
49+
Generate configure:
4650

47-
*See `./configure -h` for configuration options.*
51+
./buildconf
4852

49-
make [options]
53+
Configure your build. `--enable-debug` is recommended for development, see
54+
`./configure --help` for a full list of options.
5055

51-
*See `make -h` for make options.*
56+
# For development
57+
./configure --enable-debug
58+
# For production
59+
./configure
5260

53-
The `-j` option shall set the maximum number of jobs `make` can use for the
54-
build:
61+
Build PHP. To speed up the build, specify the maximum number of jobs using `-j`:
5562

5663
make -j4
5764

58-
Shall run `make` with a maximum of 4 concurrent jobs: Generally the maximum
59-
number of jobs should not exceed the number of cores available.
65+
The number of jobs should usually match the number of available cores, which
66+
can be determined using `nproc`.
6067

6168
## Testing PHP source code
6269

0 commit comments

Comments
 (0)