Remove ghc_ge_504 (it's required to be true now anyway)
[ghc-hetmet.git] / utils / ghc-pkg / Makefile
index f30b087..6a4dbcf 100644 (file)
@@ -12,15 +12,13 @@ SRC_HC_OPTS += -cpp -Wall -fno-warn-name-shadowing -fno-warn-unused-matches
 # This causes libghccompat.a to be used:
 include $(GHC_COMPAT_DIR)/compat.mk
 
+SRC_HC_OPTS += $(PACKAGE_CABAL)
+
 # 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) $(GhcStage1HcOpts)
 
-ifeq "$(ghc_ge_504)" "NO"
-SRC_HC_OPTS +=  -package lang -package util -package text
-endif
-
 # On Windows, ghc-pkg is a standalone program
 # ($bindir/ghc-pkg.exe), whereas on Unix it needs a wrapper script
 # to pass the appropriate flag to the real binary
@@ -103,9 +101,12 @@ endif
 ifeq "$(INSTALLING)$(HOSTPLATFORM)" "0i386-unknown-mingw32"
 all :: $(INPLACE_SCRIPT_PROG).bat
 
+# See "MSys Note 3" in compiler/Makefile
 $(INPLACE_SCRIPT_PROG).bat :
-       echo '@call $(subst /,\\,$(FPTOOLS_TOP_ABS)/utils/ghc-pkg/$(HS_PROG)) --global-conf $(PKGCONF) %*' >> $@
+       echo '@call $(subst /,\,$(FPTOOLS_TOP_ABS_PLATFORM)/utils/ghc-pkg/$(HS_PROG)) --global-conf $(PKGCONF) %*' >> $@
        chmod 755 $@
+
+CLEAN_FILES += $(INPLACE_SCRIPT_PROG).bat
 endif
 
 # ghc-pkg is needed to boot in rts/ and library dirs