Commit 3369e8c3 authored by Simon Marlow's avatar Simon Marlow
Browse files

FIX BUILD: all builds need --template, not just Windows

parent d4f77b05
......@@ -38,14 +38,14 @@ EXCLUDED_SRCS+=$(INPLACE_HS)
TOP_ABS=$(subst \\,/,$(FPTOOLS_TOP_ABS_PLATFORM))
ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32"
extra_flags=--template=$(TOP_ABS)/$(GHC_HSC2HS_DIR_REL)/template-hsc.h $(addprefix --cflag=,$(filter-out -O,$(SRC_CC_OPTS)))
extra_flags=$(addprefix --cflag=,$(filter-out -O,$(SRC_CC_OPTS)))
else
extra_flags=
endif
$(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_HSC2HS_DIR_REL)/$(HS_PROG)\" (\"--cc=$(CC)\":\"--ld=$(CC)\"$(patsubst %,:\"%\",$(extra_flags)):\"--cflag=-D__GLASGOW_HASKELL__=$(ProjectVersionInt)\":\"-I$(TOP_ABS)/$(GHC_INCLUDE_DIR_REL)\":args) >>= exitWith" >> $@
echo "main = getArgs >>= \args -> 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)\":args) >>= exitWith" >> $@
$(INPLACE_PROG): $(INPLACE_HS)
$(GHC) --make $< -o $@
......
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