Skip to content

Commit

Permalink
Rollup merge of #36360 - orbea:docdir, r=alexcrichton
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Manishearth authored Sep 10, 2016
2 parents ec6fe6e + 5e9149d commit c5f99e7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,7 @@ valopt_nosave local-rust-root "/usr/local" "set prefix for local rust binary"
valopt_nosave host "${CFG_BUILD}" "GNUs ./configure syntax LLVM host triples"
valopt_nosave target "${CFG_HOST}" "GNUs ./configure syntax LLVM target triples"
valopt_nosave mandir "${CFG_PREFIX}/share/man" "install man pages in PATH"
valopt_nosave docdir "${CFG_PREFIX}/share/doc/rust" "install man pages in PATH"

# On Windows this determines root of the subtree for target libraries.
# Host runtime libs always go to 'bin'.
Expand Down Expand Up @@ -1120,6 +1121,7 @@ putvar CFG_STDCPP_NAME
# a little post-processing of various config values
CFG_PREFIX=${CFG_PREFIX%/}
CFG_MANDIR=${CFG_MANDIR%/}
CFG_DOCDIR=${CFG_DOCDIR%/}
CFG_HOST="$(echo $CFG_HOST | tr ',' ' ')"
CFG_TARGET="$(echo $CFG_TARGET | tr ',' ' ')"
CFG_SUPPORTED_TARGET=""
Expand Down Expand Up @@ -1801,6 +1803,7 @@ putvar CFG_ARMV7_LINUX_ANDROIDEABI_NDK
putvar CFG_I686_LINUX_ANDROID_NDK
putvar CFG_NACL_CROSS_PATH
putvar CFG_MANDIR
putvar CFG_DOCDIR
putvar CFG_USING_LIBCPP

# Avoid spurious warnings from clang by feeding it original source on
Expand Down
3 changes: 2 additions & 1 deletion mk/install.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ RUN_INSTALLER = cd tmp/empty_dir && \
sh ../../tmp/dist/$(1)/install.sh \
--prefix="$(DESTDIR)$(CFG_PREFIX)" \
--libdir="$(DESTDIR)$(CFG_LIBDIR)" \
--mandir="$(DESTDIR)$(CFG_MANDIR)"
--mandir="$(DESTDIR)$(CFG_MANDIR)" \
--docdir="$(DESTDIR)$(CFG_DOCDIR)"

install:
ifeq (root user, $(USER) $(patsubst %,user,$(SUDO_USER)))
Expand Down

0 comments on commit c5f99e7

Please sign in to comment.