summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-12-13 11:39:53 +0000
committerMatthew Pickering <matthewtpickering@gmail.com>2022-12-13 11:41:59 +0000
commitbc31aea42accefaef5e35f4c8cea892a421933d6 (patch)
tree80f19fb2af545b97f2a0207ab33314379b72e7b9
parentbfd7c1e653c207dd5dea599f16ee4afad03f2ea5 (diff)
downloadhaskell-wip/t22371.tar.gz
hadrian bindist: Install manpages to share/man/man1/ghc.1wip/t22371
When the installation makefile was copied over the manpages were no longer installed in the correct place. Now we install it into share/man/man1/ghc.1 as the make build system did. Fixes #22371
-rw-r--r--configure.ac2
-rw-r--r--hadrian/bindist/Makefile17
2 files changed, 15 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 62c9a6b54e..7e61534fdc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -224,7 +224,7 @@ if test "$WithGhc" = ""
then
AC_MSG_ERROR([GHC is required.])
fi
-MinBootGhcVersion="9.0"
+MinBootGhcVersion="9.2"
FP_COMPARE_VERSIONS([$GhcVersion],[-lt],[$MinBootGhcVersion],
[AC_MSG_ERROR([GHC version $MinBootGhcVersion or later is required to compile GHC.])])
diff --git a/hadrian/bindist/Makefile b/hadrian/bindist/Makefile
index 215c2665d9..2b0903796e 100644
--- a/hadrian/bindist/Makefile
+++ b/hadrian/bindist/Makefile
@@ -66,7 +66,7 @@ install_bin: install_bin_libdir install_wrappers
endif
install: install_bin install_lib
-install: install_docs update_package_db
+install: install_man install_docs update_package_db
ActualBinsDir=${ghclibdir}/bin
ifeq "$(RelocatableBuild)" "YES"
@@ -187,19 +187,30 @@ install_lib: lib/settings
install_docs:
@echo "Copying docs to $(DESTDIR)$(docdir)"
$(INSTALL_DIR) "$(DESTDIR)$(docdir)"
-
+
if [ -d doc ]; then \
cd doc; $(FIND) . -type f -exec sh -c \
'$(INSTALL_DIR) "$(DESTDIR)$(docdir)/`dirname $$1`" && $(INSTALL_DATA) "$$1" "$(DESTDIR)$(docdir)/`dirname $$1`"' \
sh '{}' ';'; \
fi
-
+
if [ -d docs-utils ]; then \
$(INSTALL_DIR) "$(DESTDIR)$(docdir)/html/libraries/"; \
$(INSTALL_DATA) docs-utils/prologue.txt "$(DESTDIR)$(docdir)/html/libraries/"; \
$(INSTALL_SCRIPT) docs-utils/gen_contents_index "$(DESTDIR)$(docdir)/html/libraries/"; \
fi
+MAN_SECTION := 1
+MAN_PAGES := doc/users_guide/build-man/ghc.1
+
+.PHONY: install_man
+install_man:
+ if [ -f $(MAN_PAGES) ]; then \
+ $(INSTALL_DIR) "$(DESTDIR)$(mandir)"; \
+ $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man$(MAN_SECTION)"; \
+ $(INSTALL_MAN) $(INSTALL_OPTS) $(MAN_PAGES) "$(DESTDIR)$(mandir)/man$(MAN_SECTION)"; \
+ fi
+
export SHELL
install_wrappers: install_bin_libdir
@echo "Installing wrapper scripts"