Commit f4cf5ca9 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

More quoting fixes

parent 910fa59c
......@@ -116,7 +116,7 @@ LOCAL_GHC_PKG1750 = '$(GHC_PKG)' --no-user-package-conf -f $(PKGCONF1750)
$(LOCAL_GHC_PKG1750) init $(PKGCONF1750)
$(LOCAL_GHC_PKG1750) register --force 1750A.pkg >1750.out 2>&1
$(LOCAL_GHC_PKG1750) register --force 1750B.pkg >1750.out 2>&1
GHC_PACKAGE_PATH=$(PKGCONF1750) $(GHC_PKG) --no-user-package-conf list
GHC_PACKAGE_PATH=$(PKGCONF1750) '$(GHC_PKG)' --no-user-package-conf list
# GHC_PACKAGE_PATH trick is to make this work with 6.8.2 which doesn't have
# the patch "Change the command-line semantics for query commands" to
# ghc-pkg
......
......@@ -3,5 +3,5 @@ include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
conflicting_flags:
$(TEST_HC) -V --print-libdir 2>&1 | sed "s/, version.*//"
'$(TEST_HC)' -V --print-libdir 2>&1 | sed "s/, version.*//"
......@@ -3,10 +3,10 @@ include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
ffi018_ghci_setup :
$(TEST_HC) -c ffi018_ghci_c.c
'$(TEST_HC)' -c ffi018_ghci_c.c
1288_ghci_setup :
$(TEST_HC) -c 1288_ghci_c.c
'$(TEST_HC)' -c 1288_ghci_c.c
2276_ghci_setup :
$(TEST_HC) -c 2276_ghci_c.c
'$(TEST_HC)' -c 2276_ghci_c.c
......@@ -25,13 +25,13 @@ main
main
-- compile D & reload
:shell $HC $HC_OPTS -fforce-recomp -c D.hs
:shell "$HC" $HC_OPTS -fforce-recomp -c D.hs
:reload
main
-- change D, recompile & reload
:shell cp D2.hs D.hs
:shell $HC $HC_OPTS -fforce-recomp -c D.hs
:shell "$HC" $HC_OPTS -fforce-recomp -c D.hs
:reload
:load A.hs
......
......@@ -11,7 +11,7 @@
:load D.hs
-- compile A & reload
:shell $HC $HC_OPTS -fforce-recomp -c A.hs
:shell "$HC" $HC_OPTS -fforce-recomp -c A.hs
:reload
B.g 42
......@@ -21,7 +21,7 @@ B.g 42
-- swap A2 for A, compile & reload
:shell sleep 1
:shell cp A2.hs A.hs
:shell $HC $HC_OPTS -fforce-recomp -c A.hs
:shell "$HC" $HC_OPTS -fforce-recomp -c A.hs
:reload
-- the system should ignore the compiled version and compile its own.
......
......@@ -28,7 +28,7 @@ a 42
putStrLn "Run 3"
-- compile D, check that :reload doesn't pick it up
:shell $HC $HC_OPTS -c D.hs
:shell "$HC" $HC_OPTS -c D.hs
:reload
:type (A.a,B.b,C.c,D.d)
a 42
......@@ -41,21 +41,21 @@ a 42
putStrLn "Run 5"
-- D,C compiled
:shell $HC $HC_OPTS -c C.hs
:shell "$HC" $HC_OPTS -c C.hs
:load A
:type (A.a,B.b,C.c,D.d)
a 42
putStrLn "Run 6"
-- D,C,B compiled
:shell $HC $HC_OPTS -c B.hs
:shell "$HC" $HC_OPTS -c B.hs
:load A
:type (A.a,B.b,C.c,D.d)
a 42
putStrLn "Run 7"
-- D,C,B,A compiled
:shell $HC $HC_OPTS -c A.hs
:shell "$HC" $HC_OPTS -c A.hs
:load A
:type (A.a,B.b,C.c,D.d)
a 42
......@@ -83,7 +83,7 @@ a 42
putStrLn "Run 11"
-- A,B,C compiled (better not use A.o, B.o, C.o)
:shell $HC $HC_OPTS --make -v0 A
:shell "$HC" $HC_OPTS --make -v0 A
:shell rm D.o
:load A
:type (A.a,B.b,C.c,D.d)
......
......@@ -7,5 +7,5 @@ include $(TOP)/mk/test.mk
ghciprog004:
rm -f ctest.o
echo "int foo(){}" >ctest.c
$(TEST_HC) -optc-g -c ctest.c
echo ":q" | $(TEST_HC) -v0 --interactive -ignore-dot-ghci ctest.o
'$(TEST_HC)' -optc-g -c ctest.c
echo ":q" | '$(TEST_HC)' -v0 --interactive -ignore-dot-ghci ctest.o
{-# OPTIONS -cpp #-}
-- Used to present a consistent shell view for :! commands in GHCi
-- scripts. We're assuming that sh.exe is in the path and that it
-- scripts. We're assuming that sh is in the path and that it
-- is a Bourne-compatible shell.
import System.Cmd
#ifdef mingw32_HOST_OS
shell s = system ("sh.exe -c '" ++ s ++ "'")
#else
shell s = system s
#endif
import System.Exit
shell :: String -> IO ExitCode
shell s = rawSystem "sh" ["-c", s]
......@@ -25,7 +25,7 @@ rn.prog006:
echo "name: test" >>pkg.conf
echo "version: 1.0" >>pkg.conf
echo "id: test-XXX" >>pkg.conf
echo "import-dirs: `pwd`" >>pkg.conf
echo "import-dirs: `./pwd`" >>pkg.conf
echo "exposed-modules: B.C" >>pkg.conf
echo "[]" >$(LOCAL_PKGCONF)
$(LOCAL_GHC_PKG) register pkg.conf -v0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment