diff options
author | Ian Lynagh <igloo@earth.li> | 2009-05-30 22:00:21 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2009-05-30 22:00:21 +0000 |
commit | 0ef6ba7b28187a4bf5309f9702eeaf53a281204b (patch) | |
tree | 653c84d5647c6efa71836dbd7a7231b2ae725988 /utils | |
parent | d5629b335a3254612887be8091b76dbdf2b582f8 (diff) | |
download | haskell-0ef6ba7b28187a4bf5309f9702eeaf53a281204b.tar.gz |
Quote commands that we run, so they work if there are space in their paths
I've also added some missing $s to some makefiles. These aren't
technically necessary, but it's nice to be consistent.
Diffstat (limited to 'utils')
-rw-r--r-- | utils/ghc-cabal/ghc.mk | 12 | ||||
-rw-r--r-- | utils/ghc-pkg/ghc.mk | 18 | ||||
-rw-r--r-- | utils/mkdependC/ghc.mk | 4 | ||||
-rw-r--r-- | utils/mkdirhier/ghc.mk | 2 | ||||
-rw-r--r-- | utils/runghc/ghc.mk | 8 |
5 files changed, 22 insertions, 22 deletions
diff --git a/utils/ghc-cabal/ghc.mk b/utils/ghc-cabal/ghc.mk index 32f31b0a53..6ae87e5cc3 100644 --- a/utils/ghc-cabal/ghc.mk +++ b/utils/ghc-cabal/ghc.mk @@ -19,13 +19,13 @@ CABAL_VERSION := $(subst .,$(comma),$(CABAL_DOTTED_VERSION)) CABAL_CONSTRAINT := --constraint="Cabal == $(CABAL_DOTTED_VERSION)" $(GHC_CABAL_INPLACE) : $(GHC_CABAL_DIR)/dist/build/tmp/ghc-cabal$(exeext) - $(MKDIRHIER) $(dir $@) - $(CP) $< $@ + "$(MKDIRHIER)" $(dir $@) + "$(CP)" $< $@ $(GHC_CABAL_DIR)/dist/build/tmp/ghc-cabal$(exeext): $(GHC_CABAL_DIR)/ghc-cabal.hs $(MKDIRHIER) - $(MKDIRHIER) bootstrapping - $(MKDIRHIER) $(dir $@) - $(GHC) $(SRC_HC_OPTS) --make $(GHC_CABAL_DIR)/ghc-cabal.hs -o $@ \ + "$(MKDIRHIER)" bootstrapping + "$(MKDIRHIER)" $(dir $@) + "$(GHC)" $(SRC_HC_OPTS) --make $(GHC_CABAL_DIR)/ghc-cabal.hs -o $@ \ -Wall $(WERROR) \ -DCABAL_VERSION=$(CABAL_VERSION) \ -odir bootstrapping \ @@ -55,7 +55,7 @@ $(GHC_CABAL_DIR)_dist-dummy-ghc_PROG = dummy-ghc$(exeext) # depend on config.mk, so we pick up the new version number if it changes. $(GHC_CABAL_DIR)/dist-dummy-ghc/build/dummy-ghc.hs : $(GHC_CABAL_DIR)/ghc.mk $(MKDIRHIER) mk/config.mk - $(MKDIRHIER) $(dir $@) + "$(MKDIRHIER)" $(dir $@) echo "import System.Environment; import System.Cmd; import System.Exit" >$@ echo "main :: IO ()" >>$@ echo "main = do args <- getArgs; if args == [\"--numeric-version\"] then putStrLn \"$(ProjectVersion)\" else do e <- rawSystem \"$(GHC_STAGE0)\" args; exitWith e" >>$@ diff --git a/utils/ghc-pkg/ghc.mk b/utils/ghc-pkg/ghc.mk index 1afd962112..0c99661ec6 100644 --- a/utils/ghc-pkg/ghc.mk +++ b/utils/ghc-pkg/ghc.mk @@ -21,7 +21,7 @@ inplace/bin/ghc-pkg : utils/ghc-pkg/dist-install/build/tmp/$(utils/ghc-pkg_dist_ ifeq "$(Windows)" "YES" cp $< $@ else - $(RM) $@ + "$(RM)" $(RM_OPTS) $@ echo "#!/bin/sh" >>$@ echo "PKGCONF=$(TOP)/$(INPLACE_PACKAGE_CONF)" >>$@ echo '$(TOP)/$< --global-conf $$PKGCONF $${1+"$$@"}' >> $@ @@ -31,12 +31,12 @@ endif else $(GHC_PKG_INPLACE) : utils/ghc-pkg/dist/build/$(utils/ghc-pkg_dist_PROG)$(exeext) $(MKDIRHIER) - $(MKDIRHIER) $(dir $(INPLACE_PACKAGE_CONF)) + "$(MKDIRHIER)" $(dir $(INPLACE_PACKAGE_CONF)) echo "[]" > $(INPLACE_PACKAGE_CONF) ifeq "$(Windows)" "YES" cp $< $@ else - $(RM) $@ + "$(RM)" $(RM_OPTS) $@ echo "#!/bin/sh" >>$@ echo "PKGCONF=$(TOP)/$(INPLACE_PACKAGE_CONF)" >>$@ echo '$(TOP)/$< --global-conf $$PKGCONF $${1+"$$@"}' >> $@ @@ -47,9 +47,9 @@ endif # depend on ghc-cabal, otherwise we build Cabal twice when building in parallel utils/ghc-pkg/dist/build/$(utils/ghc-pkg_dist_PROG)$(exeext): utils/ghc-pkg/Main.hs utils/ghc-pkg/Version.hs $(GHC_CABAL_INPLACE) $(MKDIRHIER) - $(MKDIRHIER) bootstrapping - $(MKDIRHIER) utils/ghc-pkg/dist/build - $(GHC) $(SRC_HC_OPTS) --make utils/ghc-pkg/Main.hs -o $@ \ + "$(MKDIRHIER)" bootstrapping + "$(MKDIRHIER)" utils/ghc-pkg/dist/build + "$(GHC)" $(SRC_HC_OPTS) --make utils/ghc-pkg/Main.hs -o $@ \ -Wall \ -DCABAL_VERSION=$(CABAL_VERSION) \ -odir bootstrapping \ @@ -62,7 +62,7 @@ utils/ghc-pkg/dist/build/$(utils/ghc-pkg_dist_PROG)$(exeext): utils/ghc-pkg/Main -ilibraries/hpc utils/ghc-pkg/Version.hs: mk/config.mk - $(RM) -f $@ + "$(RM)" $(RM_OPTS) $@ echo "module Version where" >> $@ echo "version, targetOS, targetARCH :: String" >> $@ echo "version = \"$(ProjectVersion)\"" >> $@ @@ -95,8 +95,8 @@ install: install_utils/ghc-pkg_link .PNONY: install_utils/ghc-pkg_link install_utils/ghc-pkg_link: - $(MKDIRHIER) $(DESTDIR)$(bindir) - $(RM) -f $(DESTDIR)$(bindir)/ghc-pkg + "$(MKDIRHIER)" $(DESTDIR)$(bindir) + "$(RM)" $(RM_OPTS) $(DESTDIR)$(bindir)/ghc-pkg $(LN_S) ghc-pkg-$(ProjectVersion) $(DESTDIR)$(bindir)/ghc-pkg endif diff --git a/utils/mkdependC/ghc.mk b/utils/mkdependC/ghc.mk index d49c5cf2f2..1fa673a767 100644 --- a/utils/mkdependC/ghc.mk +++ b/utils/mkdependC/ghc.mk @@ -11,8 +11,8 @@ # ----------------------------------------------------------------------------- $(MKDEPENDC) : utils/mkdependC/mkdependC.prl $(MKDIRHIER) - $(MKDIRHIER) $(dir $@) - $(RM) -f $@ + "$(MKDIRHIER)" $(dir $@) + "$(RM)" $(RM_OPTS) $@ echo '#!$(PERL)' >> $@ echo '$$DEFAULT_TMPDIR = "$(DEFAULT_TMPDIR)";' >> $@ echo '$$CPP = "$(CPP)";' >> $@ diff --git a/utils/mkdirhier/ghc.mk b/utils/mkdirhier/ghc.mk index 4ea063088f..5bc5fabf0f 100644 --- a/utils/mkdirhier/ghc.mk +++ b/utils/mkdirhier/ghc.mk @@ -14,7 +14,7 @@ $(MKDIRHIER) : utils/mkdirhier/mkdirhier.sh -mkdir $(INPLACE) -mkdir $(INPLACE_BIN) -mkdir $(INPLACE_LIB) - $(RM) -f $@ + "$(RM)" $(RM_OPTS) -f $@ echo '#!$(SHELL)' >> $@ cat utils/mkdirhier/mkdirhier.sh >> $@ $(EXECUTABLE_FILE) $@ diff --git a/utils/runghc/ghc.mk b/utils/runghc/ghc.mk index 09d8044fee..7d6769d1a9 100644 --- a/utils/runghc/ghc.mk +++ b/utils/runghc/ghc.mk @@ -20,8 +20,8 @@ ifneq "$(BINDIST)" "YES" # hack: the build system has trouble with Main modules not called Main.hs utils/runghc/dist/build/Main.hs : utils/runghc/runghc.hs $(MKDIRHIER) - $(MKDIRHIER) $(dir $@) - $(CP) $< $@ + "$(MKDIRHIER)" $(dir $@) + "$(CP)" $< $@ $(eval $(call build-prog,utils/runghc,dist,1)) @@ -32,10 +32,10 @@ install: install_runhaskell .PHONY: install_runhaskell ifeq "$(Windows)" "YES" install_runhaskell: install_bins - $(CP) $(DESTDIR)$(bindir)/runghc$(exeext) $(DESTDIR)$(bindir)/runhaskell$(exeext) + "$(CP)" $(DESTDIR)$(bindir)/runghc$(exeext) $(DESTDIR)$(bindir)/runhaskell$(exeext) else install_runhaskell: - $(RM) $(DESTDIR)$(bindir)/runhaskell + "$(RM)" $(RM_OPTS) $(DESTDIR)$(bindir)/runhaskell $(LN_S) runghc $(DESTDIR)$(bindir)/runhaskell endif |