From e2974194f075d174132c615430e20849dd42739a Mon Sep 17 00:00:00 2001 From: mukunda katta Date: Mon, 11 May 2026 15:05:53 -0700 Subject: [PATCH] docs: clarify install path variables --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 3aa01a0c1d1..0163c2d5b68 100644 --- a/README.md +++ b/README.md @@ -138,6 +138,13 @@ Other standard targets include: The `Makefile` follows the [GNU Standard Makefile conventions](https://www.gnu.org/prep/standards/html_node/Makefile-Conventions.html), allowing staged install, standard compilation flags, directory variables and command variables. +Common install variables include: +- `PREFIX` : sets the final installation prefix recorded in installed metadata, such as `libzstd.pc`. + For example, `make install PREFIX=/usr` installs under `/usr` instead of `/usr/local`. +- `DESTDIR` : prepends a staging directory to the install path without changing installed metadata. + For example, `make install PREFIX=/usr DESTDIR="$PWD/staging"` installs files under + `staging/usr`, while `libzstd.pc` still records `prefix=/usr`. + For advanced use cases, specialized flags which control binary generation and installation paths are documented in [`lib/README.md`](lib/README.md#modular-build) for the `libzstd` library and in [`programs/README.md`](programs/README.md#compilation-variables) for the `zstd` CLI.