summaryrefslogtreecommitdiff
path: root/hadrian
diff options
context:
space:
mode:
authorJens Petersen <juhpetersen@gmail.com>2022-05-06 18:11:19 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-05-09 16:25:17 -0400
commitc7902078617f711a2313e3c04ef4e52fdb0f2f09 (patch)
tree633fd0fc3d457019d6f1b1d8bf4273b98d112ab3 /hadrian
parent1ea414b6555fea246fc3ed772e39f3c2a0ccbba1 (diff)
downloadhaskell-c7902078617f711a2313e3c04ef4e52fdb0f2f09.tar.gz
avoid hadrian/bindist/Makefile install_docs error when --docs=none
When docs are disabled the bindist does not have docs/ and hence docs-utils/ is not generated. Here we just test that docs-utils exists before attempting to install prologue.txt and gen_contents_index to avoid the error: /usr/bin/install: cannot stat 'docs-utils/prologue.txt': No such file or directory make: *** [Makefile:195: install_docs] Error 1
Diffstat (limited to 'hadrian')
-rw-r--r--hadrian/bindist/Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/hadrian/bindist/Makefile b/hadrian/bindist/Makefile
index 5290a5e9df..dbed7a0502 100644
--- a/hadrian/bindist/Makefile
+++ b/hadrian/bindist/Makefile
@@ -193,9 +193,10 @@ install_docs:
for i in $(DOCS); do \
cp -R $$i "$(docdir)/"; \
done
-
- $(INSTALL_DATA) docs-utils/prologue.txt "$(docdir)/html/libraries/"
- $(INSTALL_SCRIPT) docs-utils/gen_contents_index "$(docdir)/html/libraries/"
+ if [ -d docs-utils ]; then \
+ $(INSTALL_DATA) docs-utils/prologue.txt "$(docdir)/html/libraries/"; \
+ $(INSTALL_SCRIPT) docs-utils/gen_contents_index "$(docdir)/html/libraries/"; \
+ fi
BINARY_NAMES=$(shell ls ./wrappers/)
install_wrappers: install_bin_libdir