ghc.mk: Make install_docs rule sh-compatible
authorBen Gamari <ben@well-typed.com>
Mon, 16 Nov 2015 14:56:12 +0000 (16:56 +0200)
committerBen Gamari <ben@smart-cactus.org>
Mon, 16 Nov 2015 20:59:46 +0000 (21:59 +0100)
ghc.mk

diff --git a/ghc.mk b/ghc.mk
index 5e74b7b..caa903d 100644 (file)
--- a/ghc.mk
+++ b/ghc.mk
@@ -929,14 +929,14 @@ ifneq "$(INSTALL_LIBRARY_DOCS)" ""
        $(INSTALL_SCRIPT) $(INSTALL_OPTS) libraries/gen_contents_index "$(DESTDIR)$(docdir)/html/libraries/"
 endif
 ifneq "$(INSTALL_HTML_DOC_DIRS)" ""
+       # We need to filter out the directories so install doesn't choke on them
        for i in $(INSTALL_HTML_DOC_DIRS); do \
                $(INSTALL_DIR) "$(DESTDIR)$(docdir)/html/`basename $$i`"; \
-    for f in $$i/*; do \
-# We filter out the directories so install doesn't choke on them \
-      if test -f $$f; then \
-                   $(INSTALL_DOC) $(INSTALL_OPTS) "$$f" "$(DESTDIR)$(docdir)/html/`basename $$i`"; \
-      fi \
-    done \
+               for f in $$i/*; do \
+                       if test -f $$f; then \
+                               $(INSTALL_DOC) $(INSTALL_OPTS) "$$f" "$(DESTDIR)$(docdir)/html/`basename $$i`"; \
+                       fi \
+               done \
        done
 endif