make inplace scripts less sensitive to /bin/sh quoting by avoiding \
[ghc-hetmet.git] / compiler / Makefile
index c832f43..f330340 100644 (file)
@@ -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 $@