[commit: ghc] master: Make ghc.mk compatible with pedantic /bin/sh impls (df67940)

git at git.haskell.org git at git.haskell.org
Sun Dec 6 10:55:55 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/df6794035f1e4397d89896f329525e5368b7d1cc/ghc

>---------------------------------------------------------------

commit df6794035f1e4397d89896f329525e5368b7d1cc
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Sun Dec 6 11:52:35 2015 +0100

    Make ghc.mk compatible with pedantic /bin/sh impls
    
    This fixes `for`-loops introduced via
    64761ce9a899954a12d8e3ae8b400c5ad9648137
    which can result in `for i in ;` which some
    `/bin/sh` implementations don't like.


>---------------------------------------------------------------

df6794035f1e4397d89896f329525e5368b7d1cc
 ghc.mk | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/ghc.mk b/ghc.mk
index 9dd1c91..4aea480 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -875,17 +875,17 @@ install_bins: $(INSTALL_BINS) $(INSTALL_SCRIPTS)
 	for i in $(INSTALL_BINS); do \
 		$(INSTALL_PROGRAM) $(INSTALL_BIN_OPTS) $$i "$(DESTDIR)$(bindir)" ;  \
 	done
+ifneq "$(INSTALL_SCRIPTS)" ""
 	for i in $(INSTALL_SCRIPTS); do \
 		$(INSTALL_SCRIPT) $(INSTALL_OPTS) $$i "$(DESTDIR)$(bindir)" ;  \
 	done
+endif
 
 install_libs: $(INSTALL_LIBS)
 	$(call installLibsTo, $(INSTALL_LIBS), "$(DESTDIR)$(ghclibdir)")
 
 install_libexecs:  $(INSTALL_LIBEXECS)
-ifeq "$(INSTALL_LIBEXECS)" ""
-	@:
-else
+ifneq "$(INSTALL_LIBEXECS)" ""
 	$(INSTALL_DIR) "$(DESTDIR)$(ghclibexecdir)/bin"
 	for i in $(INSTALL_LIBEXECS); do \
 		$(INSTALL_PROGRAM) $(INSTALL_BIN_OPTS) $$i "$(DESTDIR)$(ghclibexecdir)/bin"; \
@@ -900,9 +900,11 @@ install_topdirs: $(INSTALL_TOPDIR_BINS) $(INSTALL_TOPDIR_SCRIPTS)
 	for i in $(INSTALL_TOPDIR_BINS); do \
 		$(INSTALL_PROGRAM) $(INSTALL_BIN_OPTS) $$i "$(DESTDIR)$(topdir)"; \
 	done
+ifneq "$(INSTALL_TOPDIR_SCRIPTS)" ""
 	for i in $(INSTALL_TOPDIR_SCRIPTS); do \
 		$(INSTALL_SCRIPT) $(INSTALL_OPTS) $$i "$(DESTDIR)$(topdir)"; \
 	done
+endif
 
 install_docs: $(INSTALL_DOCS)
 	$(INSTALL_DIR) "$(DESTDIR)$(docdir)"
@@ -922,7 +924,7 @@ 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
+# 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 \



More information about the ghc-commits mailing list