diff options
author | Ian Lynagh <igloo@earth.li> | 2007-08-18 13:54:31 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2007-08-18 13:54:31 +0000 |
commit | 861cfcf09aba53e4bb20bfd1eaa23d7b5ba14e76 (patch) | |
tree | 1bac5a1a751e50f783704cca39e137586a4d5192 /rts/Makefile | |
parent | 3c8339e501570a147e2cb2acf6322461c9439364 (diff) | |
download | haskell-861cfcf09aba53e4bb20bfd1eaa23d7b5ba14e76.tar.gz |
Fix passing double quotes to GHC on Windows
Diffstat (limited to 'rts/Makefile')
-rw-r--r-- | rts/Makefile | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/rts/Makefile b/rts/Makefile index 2bc31b3882..9af9671a0e 100644 --- a/rts/Makefile +++ b/rts/Makefile @@ -148,14 +148,22 @@ LIB_LD_OPTS += $(foreach libdir,$(shell $(GHC_PKG_INPLACE) field rts library-dir endif endif -RtsMessages_CC_OPTS += -DProjectVersion=\"$(ProjectVersion)\" -RtsUtils_CC_OPTS += -DProjectVersion=\"$(ProjectVersion)\" -RtsUtils_CC_OPTS += -DRtsWay=\"rts$(_way)\" -RtsUtils_CC_OPTS += -DHostPlatform=\"$(HOSTPLATFORM)\" -RtsUtils_CC_OPTS += -DBuildPlatform=\"$(BUILDPLATFORM)\" -RtsUtils_CC_OPTS += -DTargetPlatform=\"$(TARGETPLATFORM)\" -RtsUtils_CC_OPTS += -DGhcUnregisterised=\"$(GhcUnregisterised)\" -RtsUtils_CC_OPTS += -DGhcEnableTablesNextToCode=\"$(GhcEnableTablesNextToCode)\" +ifeq "$(Windows)" "YES" +# On Windows GHC does its own commandline parsing, so we need extra +# doublequote protection. Sigh. +DQ = \\\" +else +DQ = \" +endif + +RtsMessages_CC_OPTS += -DProjectVersion=$(DQ)$(ProjectVersion)$(DQ) +RtsUtils_CC_OPTS += -DProjectVersion=$(DQ)$(ProjectVersion)$(DQ) +RtsUtils_CC_OPTS += -DRtsWay=$(DQ)rts$(_way)$(DQ) +RtsUtils_CC_OPTS += -DHostPlatform=$(DQ)$(HOSTPLATFORM)$(DQ) +RtsUtils_CC_OPTS += -DBuildPlatform=$(DQ)$(BUILDPLATFORM)$(DQ) +RtsUtils_CC_OPTS += -DTargetPlatform=$(DQ)$(TARGETPLATFORM)$(DQ) +RtsUtils_CC_OPTS += -DGhcUnregisterised=$(DQ)$(GhcUnregisterised)$(DQ) +RtsUtils_CC_OPTS += -DGhcEnableTablesNextToCode=$(DQ)$(GhcEnableTablesNextToCode)$(DQ) ifeq "$(way)" "mp" SRC_HC_OPTS += -I$$PVM_ROOT/include |