Skip to content

Commit a05938f

Browse files
committed
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 <iyernaveenr@gmail.com>
1 parent ed04567 commit a05938f

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

Diff for: INSTALL.md

+24-3
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,30 @@ See [the rustc-dev-guide for more info][sysllvm].
7979
./configure
8080
```
8181

82-
If you plan to use `x.py install` to create an installation, it is
83-
recommended that you set the `prefix` value in the `[install]` section to a
84-
directory: `./configure --set install.prefix=<path>`
82+
If you plan to use `x.py install` to create an installation, you can either
83+
set `DESTDIR` environment variable to your custom directory path:
84+
85+
```bash
86+
export DESTDIR=<path>
87+
```
88+
89+
or set `prefix` and `sysconfdir` in the `[install]` section to your custom
90+
directory path:
91+
92+
```sh
93+
./configure --set install.prefix=<path> --set install.sysconfdir=<path>
94+
```
95+
96+
When the `DESTDIR` environment variable is present, the `prefix` and
97+
`sysconfdir` values are combined with the path from the `DESTDIR`
98+
environment variable.
99+
100+
More information on the `DESTDIR` environment variable is available here:
101+
https://www.gnu.org/prep/standards/html_node/DESTDIR.html
102+
https://rustc-dev-guide.rust-lang.org/building/new-target.html?highlight=DESTDIR#cross-compiling
103+
104+
More information on the `prefix` and `sysconfdir` values is available here:
105+
https://www.gnu.org/prep/standards/html_node/Directory-Variables.html
85106

86107
3. Build and install:
87108

0 commit comments

Comments
 (0)