From a05938fd5b7d2249904d6eb628322cdf1dfcf9e6 Mon Sep 17 00:00:00 2001 From: "Naveen R. Iyer" Date: Sat, 28 Sep 2024 20:27:51 -0500 Subject: [PATCH] add clarity for custom path installation install.sysconfdir is another value, in addition to install.prefix, that could be set for custom path installation. Signed-off-by: Naveen R. Iyer --- INSTALL.md | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index ded0b59fc6cd3..a5258e6aeb7f7 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -79,9 +79,30 @@ See [the rustc-dev-guide for more info][sysllvm]. ./configure ``` - If you plan to use `x.py install` to create an installation, it is - recommended that you set the `prefix` value in the `[install]` section to a - directory: `./configure --set install.prefix=` + If you plan to use `x.py install` to create an installation, you can either + set `DESTDIR` environment variable to your custom directory path: + + ```bash + export DESTDIR= + ``` + + or set `prefix` and `sysconfdir` in the `[install]` section to your custom + directory path: + + ```sh + ./configure --set install.prefix= --set install.sysconfdir= + ``` + + When the `DESTDIR` environment variable is present, the `prefix` and + `sysconfdir` values are combined with the path from the `DESTDIR` + environment variable. + + More information on the `DESTDIR` environment variable is available here: + https://www.gnu.org/prep/standards/html_node/DESTDIR.html + https://rustc-dev-guide.rust-lang.org/building/new-target.html?highlight=DESTDIR#cross-compiling + + More information on the `prefix` and `sysconfdir` values is available here: + https://www.gnu.org/prep/standards/html_node/Directory-Variables.html 3. Build and install: