X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=utils%2Fhsc2hs%2FMakefile;h=b9bcaf1c40126b25216060bb40c2d4675ed9792e;hb=966eddaab3b30ae85f95ea3c981462a9778f1dd7;hp=29995d0480a3c7e377090d0b696a40e14b5b1770;hpb=7ef211e8d6aed14f77b344d976e207bc77e365a7;p=ghc-hetmet.git diff --git a/utils/hsc2hs/Makefile b/utils/hsc2hs/Makefile index 29995d0..b9bcaf1 100644 --- a/utils/hsc2hs/Makefile +++ b/utils/hsc2hs/Makefile @@ -33,10 +33,6 @@ INPLACE_HS=hsc2hs-inplace.hs INPLACE_PROG=hsc2hs-inplace EXCLUDED_SRCS+=$(INPLACE_HS) -# FPTOOLS_TOP_ABS platform uses backslashes, at least on Cygwin, but that -# will go wrong when we use it in a Haskell string below. -TOP_ABS=$(subst \\,/,$(FPTOOLS_TOP_ABS_PLATFORM)) - ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32" extra_flags=$(addprefix --cflag=,$(filter-out -O,$(SRC_CC_OPTS))) else @@ -45,7 +41,7 @@ endif $(INPLACE_HS): Makefile $(FPTOOLS_TOP)/mk/config.mk echo "import System.Cmd; import System.Environment; import System.Exit" > $@ - 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)\":\"-I$(TOP_ABS)/gmp/gmpbuild\":args) >>= exitWith" >> $@ + echo "main = do args <- getArgs; rawSystem \"$(FPTOOLS_TOP_ABS)/$(GHC_HSC2HS_DIR_REL)/$(HS_PROG)\" (\"--template=$(FPTOOLS_TOP_ABS)/$(GHC_HSC2HS_DIR_REL)/template-hsc.h\":\"--cc=$(CC)\":\"--ld=$(CC)\"$(patsubst %,:\"%\",$(extra_flags)):\"--cflag=-D__GLASGOW_HASKELL__=$(ProjectVersionInt)\":\"-I$(FPTOOLS_TOP_ABS)/$(GHC_INCLUDE_DIR_REL)\":\"-I$(FPTOOLS_TOP_ABS)/gmp/gmpbuild\":args) >>= exitWith" >> $@ $(INPLACE_PROG): $(INPLACE_HS) $(HC) --make $< -o $@