Commit c5f4f95c authored by thomie's avatar thomie Committed by Ben Gamari
Browse files

Put docs in /usr/share/doc/ghc-<version>

`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

(cherry picked from commit b61f5f73)
parent 555825c7
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment