From e58f0bfbdc3d8459e9546aad293ed46aec5ca66b Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Sat, 23 Jun 2007 20:00:06 +0000 Subject: [PATCH] make inplace scripts less sensitive to /bin/sh quoting by avoiding \ --- compiler/Makefile | 2 +- utils/ghc-pkg/Makefile | 2 +- utils/hsc2hs/Makefile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/Makefile b/compiler/Makefile index c832f43..f330340 100644 --- a/compiler/Makefile +++ b/compiler/Makefile @@ -712,7 +712,7 @@ TOP_ABS=$(subst \\,/,$(FPTOOLS_TOP_ABS_PLATFORM)) $(INPLACE_HS): Makefile $(FPTOOLS_TOP)/mk/config.mk echo "import System.Cmd; import System.Environment; import System.Exit" > $@ - echo "main = getArgs >>= \args -> rawSystem \"$(TOP_ABS)/$(GHC_COMPILER_DIR_REL)/$(GHC_PROG)\" (\"-B$(TOP_ABS)\":args) >>= exitWith" >> $@ + echo "main = do args <- getArgs; rawSystem \"$(TOP_ABS)/$(GHC_COMPILER_DIR_REL)/$(GHC_PROG)\" (\"-B$(TOP_ABS)\":args) >>= exitWith" >> $@ $(INPLACE_PROG): $(INPLACE_HS) $(GHC) --make $< -o $@ diff --git a/utils/ghc-pkg/Makefile b/utils/ghc-pkg/Makefile index 9508b52..47b4ebe 100644 --- a/utils/ghc-pkg/Makefile +++ b/utils/ghc-pkg/Makefile @@ -67,7 +67,7 @@ TOP_ABS=$(subst \\,/,$(FPTOOLS_TOP_ABS_PLATFORM)) $(INPLACE_HS): Makefile $(FPTOOLS_TOP)/mk/config.mk echo "import System.Cmd; import System.Environment; import System.Exit" > $@ - echo "main = getArgs >>= \args -> rawSystem \"$(TOP_ABS)/$(GHC_PKG_DIR_REL)/$(HS_PROG)\" (\"--global-conf\":\"$(TOP_ABS)/driver/package.conf.inplace\":args) >>= exitWith" >> $@ + echo "main = do args <- getArgs; rawSystem \"$(TOP_ABS)/$(GHC_PKG_DIR_REL)/$(HS_PROG)\" (\"--global-conf\":\"$(TOP_ABS)/driver/package.conf.inplace\":args) >>= exitWith" >> $@ $(INPLACE_PROG): $(INPLACE_HS) $(GHC) --make $< -o $@ diff --git a/utils/hsc2hs/Makefile b/utils/hsc2hs/Makefile index b2e4d5b..b11617f 100644 --- a/utils/hsc2hs/Makefile +++ b/utils/hsc2hs/Makefile @@ -45,7 +45,7 @@ endif $(INPLACE_HS): Makefile $(FPTOOLS_TOP)/mk/config.mk echo "import System.Cmd; import System.Environment; import System.Exit" > $@ - echo "main = getArgs >>= \args -> rawSystem \"$(TOP_ABS)/$(GHC_HSC2HS_DIR_REL)/$(HS_PROG)\" (\"--template=$(TOP_ABS)/$(GHC_HSC2HS_DIR_REL)/template-hsc.h\":\"--cc=$(CC)\":\"--ld=$(CC)\"$(patsubst %,:\"%\",$(extra_flags)):\"--cflag=-D__GLASGOW_HASKELL__=$(ProjectVersionInt)\":\"-I$(TOP_ABS)/$(GHC_INCLUDE_DIR_REL)\":args) >>= exitWith" >> $@ + echo "main = do args <- getArgs; rawSystem \"$(TOP_ABS)/$(GHC_HSC2HS_DIR_REL)/$(HS_PROG)\" (\"--template=$(TOP_ABS)/$(GHC_HSC2HS_DIR_REL)/template-hsc.h\":\"--cc=$(CC)\":\"--ld=$(CC)\"$(patsubst %,:\"%\",$(extra_flags)):\"--cflag=-D__GLASGOW_HASKELL__=$(ProjectVersionInt)\":\"-I$(TOP_ABS)/$(GHC_INCLUDE_DIR_REL)\":args) >>= exitWith" >> $@ $(INPLACE_PROG): $(INPLACE_HS) $(GHC) --make $< -o $@ -- 1.7.10.4