X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Futils%2Fhsc2hs%2FMakefile;h=ccaf68eec8b271c4beb92639ce6ccbb8b13f273c;hb=ac10f8408520a30e8437496d320b8b86afda2e8f;hp=8ccde7f71225cf4e41a3827ba287060ba2459cba;hpb=f04449358ab25d8dbf606b0dc8ba9266a03f7f92;p=ghc-hetmet.git diff --git a/ghc/utils/hsc2hs/Makefile b/ghc/utils/hsc2hs/Makefile index 8ccde7f..ccaf68e 100644 --- a/ghc/utils/hsc2hs/Makefile +++ b/ghc/utils/hsc2hs/Makefile @@ -10,6 +10,14 @@ INCLUDE_DIR=ghc/includes INSTALLING=1 +# This causes libghccompat.a to be used: +include $(GHC_LIB_COMPAT_DIR)/compat.mk + +# This is required because libghccompat.a must be built with +# $(GhcHcOpts) because it is linked to the compiler, and hence +# we must also build with $(GhcHcOpts) here: +SRC_HC_OPTS += $(GhcHcOpts) + HS_PROG = hsc2hs-bin ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32" HS_PROG = hsc2hs$(exeext) @@ -18,8 +26,6 @@ ifeq "$(HOSTPLATFORM)" "i386-unknown-cygwinw32" HS_PROG = hsc2hs$(exeext) endif -ghc_ge_504 = $(shell if (test $(GhcCanonVersion) -ge 504); then echo YES; else echo NO; fi) - ifeq "$(ghc_ge_504)" "NO" SRC_HC_OPTS += -package util endif @@ -27,10 +33,7 @@ endif # Note: Somehow we should pass $(exeext) here, but the history of changes used # for calling the C preprocessor via GHC has changed a few times, making a # clean solution impossible. So we revert to a hack in Main.hs... -SRC_HC_OPTS += -Wall -cpp -ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32" -SRC_HC_OPTS += -Dmingw32_HOST_OS=1 -endif +SRC_HC_OPTS += -Wall ifneq "$(HOSTPLATFORM)" "i386-unknown-mingw32" INSTALLED_SCRIPT_PROG = hsc2hs