Skip to content

Commit 00ce2c0

Browse files
authored
Auto 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 4d91323 + 5e9149d commit 00ce2c0

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
@@ -676,6 +676,7 @@ valopt_nosave local-rust-root "/usr/local" "set prefix for local rust binary"
676676
valopt_nosave host "${CFG_BUILD}" "GNUs ./configure syntax LLVM host triples"
677677
valopt_nosave target "${CFG_HOST}" "GNUs ./configure syntax LLVM target triples"
678678
valopt_nosave mandir "${CFG_PREFIX}/share/man" "install man pages in PATH"
679+
valopt_nosave docdir "${CFG_PREFIX}/share/doc/rust" "install man pages in PATH"
679680

680681
# On Windows this determines root of the subtree for target libraries.
681682
# Host runtime libs always go to 'bin'.
@@ -1124,6 +1125,7 @@ putvar CFG_STDCPP_NAME
11241125
# a little post-processing of various config values
11251126
CFG_PREFIX=${CFG_PREFIX%/}
11261127
CFG_MANDIR=${CFG_MANDIR%/}
1128+
CFG_DOCDIR=${CFG_DOCDIR%/}
11271129
CFG_HOST="$(echo $CFG_HOST | tr ',' ' ')"
11281130
CFG_TARGET="$(echo $CFG_TARGET | tr ',' ' ')"
11291131
CFG_SUPPORTED_TARGET=""
@@ -1805,6 +1807,7 @@ putvar CFG_ARMV7_LINUX_ANDROIDEABI_NDK
18051807
putvar CFG_I686_LINUX_ANDROID_NDK
18061808
putvar CFG_NACL_CROSS_PATH
18071809
putvar CFG_MANDIR
1810+
putvar CFG_DOCDIR
18081811
putvar CFG_USING_LIBCPP
18091812

18101813
# 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)