X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=utils%2Fghc-pkg%2Fghc.mk;h=6bc9be57a4bc3bdb7377365651e30a4fefe88540;hb=c8c2f6bb7d79a2a6aeaa3233363fdf0bbbfad205;hp=d45ebacd5e1c9a264bf6b7285779a5ab4212ec08;hpb=af2280a7ae3d90c787db419dd90879f000f1bc9b;p=ghc-hetmet.git diff --git a/utils/ghc-pkg/ghc.mk b/utils/ghc-pkg/ghc.mk index d45ebac..6bc9be5 100644 --- a/utils/ghc-pkg/ghc.mk +++ b/utils/ghc-pkg/ghc.mk @@ -44,10 +44,13 @@ endif endif -# depend on ghc-cabal, otherwise we build Cabal twice when building in parallel +# depend on ghc-cabal, otherwise we build Cabal twice when building in parallel. +# (ghc-cabal is an order-only dependency, we don't need to rebuild ghc-pkg +# if ghc-cabal is newer). # The binary package is not warning-clean, so we need a few -fno-warns here. -utils/ghc-pkg/dist/build/$(utils/ghc-pkg_dist_PROG)$(exeext): utils/ghc-pkg/Main.hs utils/ghc-pkg/Version.hs $(GHC_CABAL_INPLACE) | bootstrapping/. $$(dir $$@)/. +utils/ghc-pkg/dist/build/$(utils/ghc-pkg_dist_PROG)$(exeext): utils/ghc-pkg/Main.hs utils/ghc-pkg/Version.hs | bootstrapping/. $$(dir $$@)/. $(GHC_CABAL_INPLACE) "$(GHC)" $(SRC_HC_OPTS) --make utils/ghc-pkg/Main.hs -o $@ \ + -no-user-package-conf \ -Wall -fno-warn-unused-imports \ -DCABAL_VERSION=$(CABAL_VERSION) \ -DBOOTSTRAPPING \ @@ -78,12 +81,10 @@ $(eval $(call clean-target,utils/ghc-pkg,dist,\ # ----------------------------------------------------------------------------- # Building ghc-pkg with stage 1 +utils/ghc-pkg_dist-install_USES_CABAL = YES +utils/ghc-pkg_PACKAGE = ghc-pkg + utils/ghc-pkg_dist-install_PROG = ghc-pkg -utils/ghc-pkg_dist-install_MODULES = Main Version -utils/ghc-pkg_dist-install_DEPS = Cabal bin-package-db -ifeq "$(Windows)" "NO" -utils/ghc-pkg_dist-install_DEPS += terminfo -endif utils/ghc-pkg_dist-install_SHELL_WRAPPER = YES utils/ghc-pkg_dist-install_INSTALL_SHELL_WRAPPER = YES utils/ghc-pkg_dist-install_INSTALL_SHELL_WRAPPER_NAME = ghc-pkg-$(ProjectVersion) @@ -100,7 +101,7 @@ install: install_utils/ghc-pkg_link .PNONY: install_utils/ghc-pkg_link install_utils/ghc-pkg_link: - $(INSTALL_DIR) "$(DESTDIR)$(bindir)" + $(call INSTALL_DIR,"$(DESTDIR)$(bindir)") "$(RM)" $(RM_OPTS) "$(DESTDIR)$(bindir)/ghc-pkg" $(LN_S) ghc-pkg-$(ProjectVersion) "$(DESTDIR)$(bindir)/ghc-pkg" endif