Skip to content

Commit c5f99e7

Browse files
authored
Rollup merge of #36360 - orbea:docdir, r=alexcrichton
Allow setting --docdir This will allow setting `--docdir` during configure, this is useful because not all linux distributions install documentation to `/usr/share/doc`. For example in Slackware documentation is installed to `/usr/doc/$PRGNAM-$VERSION` and `/usr/share/doc` is a symlink to `/usr/doc`. To use this `./configure --docdir=/usr/doc/$PRGNAM-$VERSION` can be used.
2 parents ec6fe6e + 5e9149d commit c5f99e7

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

configure

+3
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,7 @@ valopt_nosave local-rust-root "/usr/local" "set prefix for local rust binary"
672672
valopt_nosave host "${CFG_BUILD}" "GNUs ./configure syntax LLVM host triples"
673673
valopt_nosave target "${CFG_HOST}" "GNUs ./configure syntax LLVM target triples"
674674
valopt_nosave mandir "${CFG_PREFIX}/share/man" "install man pages in PATH"
675+
valopt_nosave docdir "${CFG_PREFIX}/share/doc/rust" "install man pages in PATH"
675676

676677
# On Windows this determines root of the subtree for target libraries.
677678
# Host runtime libs always go to 'bin'.
@@ -1120,6 +1121,7 @@ putvar CFG_STDCPP_NAME
11201121
# a little post-processing of various config values
11211122
CFG_PREFIX=${CFG_PREFIX%/}
11221123
CFG_MANDIR=${CFG_MANDIR%/}
1124+
CFG_DOCDIR=${CFG_DOCDIR%/}
11231125
CFG_HOST="$(echo $CFG_HOST | tr ',' ' ')"
11241126
CFG_TARGET="$(echo $CFG_TARGET | tr ',' ' ')"
11251127
CFG_SUPPORTED_TARGET=""
@@ -1801,6 +1803,7 @@ putvar CFG_ARMV7_LINUX_ANDROIDEABI_NDK
18011803
putvar CFG_I686_LINUX_ANDROID_NDK
18021804
putvar CFG_NACL_CROSS_PATH
18031805
putvar CFG_MANDIR
1806+
putvar CFG_DOCDIR
18041807
putvar CFG_USING_LIBCPP
18051808

18061809
# Avoid spurious warnings from clang by feeding it original source on

mk/install.mk

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ RUN_INSTALLER = cd tmp/empty_dir && \
1212
sh ../../tmp/dist/$(1)/install.sh \
1313
--prefix="$(DESTDIR)$(CFG_PREFIX)" \
1414
--libdir="$(DESTDIR)$(CFG_LIBDIR)" \
15-
--mandir="$(DESTDIR)$(CFG_MANDIR)"
15+
--mandir="$(DESTDIR)$(CFG_MANDIR)" \
16+
--docdir="$(DESTDIR)$(CFG_DOCDIR)"
1617

1718
install:
1819
ifeq (root user, $(USER) $(patsubst %,user,$(SUDO_USER)))

0 commit comments

Comments
 (0)