[Git][ghc/ghc][master] hadrian: Don't attempt to install documentation if doc/ doesn't exist
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Wed Aug 10 19:38:14 UTC 2022
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
7cabea7c by Ben Gamari at 2022-08-10T15:37:58-04:00
hadrian: Don't attempt to install documentation if doc/ doesn't exist
Previously we would attempt to install documentation even if the `doc`
directory doesn't exist (e.g. due to `--docs=none`). This would result
in the surprising side-effect of the entire contents of the bindist
being installed in the destination documentation directory. Fix this.
Fixes #21976.
- - - - -
1 changed file:
- hadrian/bindist/Makefile
Changes:
=====================================
hadrian/bindist/Makefile
=====================================
@@ -184,10 +184,12 @@ install_lib: lib/settings
install_docs:
@echo "Copying docs to $(DESTDIR)$(docdir)"
$(INSTALL_DIR) "$(DESTDIR)$(docdir)"
- cd doc; $(FIND) . -type f -exec sh -c \
- '$(INSTALL_DIR) "$(DESTDIR)$(docdir)/`dirname $$1`" && \
- $(INSTALL_DATA) "$$1" "$(DESTDIR)$(docdir)/`dirname $$1`" \
- ' sh '{}' \;
+
+ 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/"; \
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7cabea7c9b10d2d15a4798be9f3130994393dd9c
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7cabea7c9b10d2d15a4798be9f3130994393dd9c
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/20220810/494a6a43/attachment-0001.html>
More information about the ghc-commits
mailing list