Skip to content

Commit 32a39bb

Browse files
committed
Update PHP installation docs
1 parent 9812fcd commit 32a39bb

File tree

1 file changed

+20
-23
lines changed

1 file changed

+20
-23
lines changed

docs/php-installation.md

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
> **Before running the `make install` or `cmake --install` command, be aware
55
> that files will be copied outside of your current build directory.**
66
7-
Installation of built files is a simple copy to a predefined directory structure
8-
on a given system. In this phase the executable binary files, dynamic library
9-
objects, header files, \*nix man documentation pages, and similar files are
10-
copied to system directories.
7+
Installation of built files is usually a simple copy to a predefined directory
8+
structure on a given system. In this phase the executable binary files, dynamic
9+
library objects, header files, \*nix man documentation pages, and similar files
10+
are copied to system directories.
1111

1212
Please note that PHP installation on \*nix systems is typically handled by
1313
system package managers through automated scripts. Additionally, it is common
@@ -36,25 +36,22 @@ make TEST_PHP_ARGS=-j$(nproc) test
3636
make INSTALL_ROOT="/stage" install
3737
```
3838

39-
Above, the optional `--prefix` configure option, sets the location where the
40-
built files layout is put. The optional `INSTALL_ROOT` environment variable can
41-
set the parent location where the prefixed built files layout will be put. By
42-
default the `--prefix` is set to `/usr/local` and `INSTALL_ROOT` is empty. The
43-
`INSTALL_ROOT` is usually used to set the stage directory on some systems to
44-
perform additional tasks on the built files before being packaged or
45-
distributed.
39+
The optional `--prefix` configure option sets the location where the built files
40+
layout is put. By default it is set to `/usr/local`. The optional `INSTALL_ROOT`
41+
environment variable can set the parent location where the prefixed built files
42+
layout will be put. By default it is empty and it is usually used to set the
43+
stage directory to perform additional tasks on the built files before being
44+
packaged or distributed.
4645

4746
> [!NOTE]
48-
> The `INSTALL_ROOT` variable name is used in PHP and software from the early
49-
> Autotools days. Automake and other build systems use a more common variable
50-
> name [`DESTDIR`](https://www.gnu.org/software/automake/manual/html_node/DESTDIR.html),
51-
> however, for historical reasons and since PHP doesn't use Automake, the
52-
> `INSTALL_ROOT` variable name is still used in PHP instead.
47+
> The `INSTALL_ROOT` variable name is used in PHP from the early Autotools days.
48+
> GNU standards and other build systems use a more common name
49+
> [`DESTDIR`](https://www.gnu.org/prep/standards/html_node/DESTDIR.html).
5350
54-
The files are then copied to a predefined directory structure (GNU or PHP
55-
layout). The optional PHP Autotools configuration option
56-
`--with-layout=[GNU|PHP]` defines the installation directory structure. By
57-
default it is set to a PHP style directory structure:
51+
The files are then copied to a predefined directory structure. PHP Autotools has
52+
another optional configure option `--with-layout=[GNU|PHP]` (GNU or PHP layout).
53+
It defines the installation directory structure. By default it is set to a PHP
54+
style directory structure:
5855

5956
```sh
6057
/INSTALL_ROOT
@@ -91,8 +88,8 @@ default it is set to a PHP style directory structure:
9188
This is how the GNU layout directory structure looks like (`--with-layout=GNU`):
9289

9390
```sh
94-
/INSTALL_ROOT
95-
└─ /usr/
91+
/INSTALL_ROOT/
92+
└─ usr/
9693
└─ local/
9794
├─ bin/
9895
└─ etc/
@@ -245,7 +242,7 @@ root directory:
245242
"PHP_BUILD_COMPILER": "GCC",
246243
"PHP_BUILD_ARCH": "x86",
247244
"PHP_VERSION_LABEL": "-acme",
248-
"PHP_EXTENSION_DIR": "/install/prefix/lib/php83/extensions"
245+
"PHP_EXTENSION_DIR": "lib/php83/extensions"
249246
}
250247
}
251248
],

0 commit comments

Comments
 (0)