X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=utils%2Fghc-pkg%2FMakefile;h=6a4dbcf253f72d8acdf778ce71d21a660c4c11c9;hb=ad9d754d2b18d4dd027884e082c20777a29ef7d4;hp=0e4d06f8904f37d0e267b7705639b0b166e63f65;hpb=b93eb0c23bed01905e86c0a8c485edb388626761;p=ghc-hetmet.git diff --git a/utils/ghc-pkg/Makefile b/utils/ghc-pkg/Makefile index 0e4d06f..6a4dbcf 100644 --- a/utils/ghc-pkg/Makefile +++ b/utils/ghc-pkg/Makefile @@ -12,14 +12,12 @@ 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) - -ifeq "$(ghc_ge_504)" "NO" -SRC_HC_OPTS += -package lang -package util -package text -endif +SRC_HC_OPTS += $(GhcHcOpts) $(GhcStage1HcOpts) # On Windows, ghc-pkg is a standalone program # ($bindir/ghc-pkg.exe), whereas on Unix it needs a wrapper script @@ -100,6 +98,17 @@ clean distclean maintainer-clean :: $(MAKE) INSTALLING=0 BIN_DIST=0 $(MFLAGS) $@ 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_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 # Do a recursive 'make all' after generating dependencies, because this # will work with 'make -j'.