X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Futils%2Fhsc2hs%2FMakefile;h=f107167940eb34727d83829eb4dfbb955d8faca6;hb=153b9cb9b11e05c4edb1b6bc0a7b972660e41f70;hp=94ed5483754e83cd4bce26495c0fb15a7337b3b1;hpb=5cb4bb13a817c44cdc4369c7f82949d9490d69a0;p=ghc-hetmet.git diff --git a/ghc/utils/hsc2hs/Makefile b/ghc/utils/hsc2hs/Makefile index 94ed548..f107167 100644 --- a/ghc/utils/hsc2hs/Makefile +++ b/ghc/utils/hsc2hs/Makefile @@ -1,4 +1,6 @@ # ----------------------------------------------------------------------------- +# To compile with nhc98 on unix: +# nhc98 -cpp -package base -o hsc2hs-bin Main.hs TOP=../.. include $(TOP)/mk/boilerplate.mk @@ -8,6 +10,9 @@ INCLUDE_DIR=ghc/includes INSTALLING=1 +SRC_HC_OPTS += -i$(GHC_LIB_COMPAT_DIR) +SRC_LD_OPTS += -L$(GHC_LIB_COMPAT_DIR) -lghccompat + HS_PROG = hsc2hs-bin ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32" HS_PROG = hsc2hs$(exeext) @@ -16,16 +21,14 @@ 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 -SRC_HC_OPTS += -Wall -cpp '-DEXEEXT="$(exeext)"' -ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32" -SRC_HC_OPTS += -Dmingw32_HOST_OS=1 -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 ifneq "$(HOSTPLATFORM)" "i386-unknown-mingw32" INSTALLED_SCRIPT_PROG = hsc2hs