[Git][ghc/ghc][master] hadrian bindist: Install manpages to share/man/man1/ghc.1

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Fri Dec 23 04:37:25 UTC 2022



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
32b32d7f by Matthew Pickering at 2022-12-22T23:36:46-05:00
hadrian bindist: Install manpages to share/man/man1/ghc.1

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

- - - - -


1 changed file:

- hadrian/bindist/Makefile


Changes:

=====================================
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"



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/32b32d7fbc5544ad6c435a1ea26e6353ec567a9b

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/32b32d7fbc5544ad6c435a1ea26e6353ec567a9b
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20221222/a0890977/attachment-0001.html>


More information about the ghc-commits mailing list