X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=utils%2Fghc-pkg%2FMakefile;h=19d5a12affae6b38a42345179baea966ec6e524d;hb=373b03fe979abe898a387e02ca22007b768e343e;hp=9ad63cb26f770aec2a736670a9bf668eadbad5ac;hpb=bc49cbd35e1b9a75ef05de610f845de7bbfef90d;p=ghc-hetmet.git diff --git a/utils/ghc-pkg/Makefile b/utils/ghc-pkg/Makefile index 9ad63cb..19d5a12 100644 --- a/utils/ghc-pkg/Makefile +++ b/utils/ghc-pkg/Makefile @@ -12,6 +12,8 @@ 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: @@ -100,6 +102,14 @@ clean distclean maintainer-clean :: $(MAKE) INSTALLING=0 BIN_DIST=0 $(MFLAGS) $@ endif +ifeq "$(INSTALLING)$(HOSTPLATFORM)" "0i386-unknown-mingw32" +all :: $(INPLACE_SCRIPT_PROG).bat + +$(INPLACE_SCRIPT_PROG).bat : + echo '@call $(subst /,\\,$(FPTOOLS_TOP_ABS)/utils/ghc-pkg/$(HS_PROG)) --global-conf $(PKGCONF) %*' >> $@ + chmod 755 $@ +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'.