From ee805722b9c2f539ae6436c5d3f2b013817c2694 Mon Sep 17 00:00:00 2001 From: KSAGlory <178437733+KSAGlory@users.noreply.github.com> Date: Tue, 15 Sep 2026 08:48:01 +0200 Subject: [PATCH] docs: clarify make install paths --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 3aa01a0c1d1..50025acb718 100644 --- a/README.md +++ b/README.md @@ -135,6 +135,20 @@ Other standard targets include: - `make install` : install zstd cli, library and man pages - `make check` : run `zstd`, test its essential behavior on local platform +`make install` uses `/usr/local` as the default installation prefix. Set `PREFIX` to install under a different prefix: + +```console +make install PREFIX=/opt/zstd +``` + +Set `DESTDIR` to stage the installation under a temporary root while preserving the final directory layout: + +```console +make install DESTDIR=/tmp/zstd-package +``` + +This stages the default `/usr/local` layout under `/tmp/zstd-package/usr/local`. + 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.