From b61f5f734d08fe9cdca3ac06560fc15e97aa77ab Mon Sep 17 00:00:00 2001 From: Thomas Miedema Date: Fri, 29 Jan 2016 20:30:47 +0100 Subject: Put docs in /usr/share/doc/ghc- `make install` puts libraries in a direcory containing the version number. Do the same for the docs, such that multiple installs can live side-by-side. Delete unused ghcdocdir. Test Plan: ``` ./boot ./configure make show! VALUE=docdir ``` Reviewed by: bgamari Differential Revision: https://phabricator.haskell.org/D1868 GHC Trac Issues: #11354 --- mk/install.mk.in | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'mk/install.mk.in') diff --git a/mk/install.mk.in b/mk/install.mk.in index e404397647..aa3afea2b9 100644 --- a/mk/install.mk.in +++ b/mk/install.mk.in @@ -40,7 +40,7 @@ # # NOTE: The default e.g. ${docdir} above means that autoconf substitutes the # string "${docdir}", not the value of docdir! This is crucial for the GNU -# coding standards. +# coding standards. See Trac #1924. define set_default # $1 = variable to set @@ -52,9 +52,6 @@ $1 = $2 endif endef -# This gets used in the default docdir when autoconf >= 2.60 is used -PACKAGE_TARNAME = @PACKAGE_TARNAME@ - prefix = @prefix@ datarootdir = @datarootdir@ @@ -67,8 +64,10 @@ libdir = @libdir@ includedir = @includedir@ mandir = @mandir@ +# Note that `./configure --docdir=/foo/bar` should work. docdir = @docdir@ -$(eval $(call set_default,docdir,$${datarootdir}/doc/ghc)) +PACKAGE_TARNAME = ghc-${ProjectVersion} +$(eval $(call set_default,docdir,$${datarootdir}/doc/$${PACKAGE_TARNAME})) htmldir = @htmldir@ dvidir = @dvidir@ @@ -94,14 +93,12 @@ pdfdir = $(docdir) psdir = $(docdir) ghclibdir = $(libdir) -ghcdocdir = $(datarootdir)/doc else # Unix: override libdir and datadir to put ghc-specific stuff in # a subdirectory with the version number included. ghclibdir = $(libdir)/$(CrossCompilePrefix)ghc-$(ProjectVersion) -ghcdocdir = $(datarootdir)/doc/ghc endif ghclibexecdir = $(ghclibdir) -- cgit v1.2.1