projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix the build with GHC 6.12.3
[ghc-hetmet.git]
/
utils
/
ghc-pkg
/
ghc.mk
diff --git
a/utils/ghc-pkg/ghc.mk
b/utils/ghc-pkg/ghc.mk
index
5aa091f
..
6bc9be5
100644
(file)
--- a/
utils/ghc-pkg/ghc.mk
+++ b/
utils/ghc-pkg/ghc.mk
@@
-13,7
+13,7
@@
# -----------------------------------------------------------------------------
# Bootstrapping ghc-pkg
# -----------------------------------------------------------------------------
# Bootstrapping ghc-pkg
-utils/ghc-pkg_dist_PROG = ghc-pkg
+utils/ghc-pkg_dist_PROG = ghc-pkg$(exeext)
ifeq "$(BootingFromHc)" "YES"
ifeq "$(BootingFromHc)" "YES"
@@
-30,8
+30,7
@@
endif
else
else
-$(GHC_PKG_INPLACE) : utils/ghc-pkg/dist/build/$(utils/ghc-pkg_dist_PROG)$(exeext) $(MKDIRHIER)
- "$(MKDIRHIER)" $(INPLACE_PACKAGE_CONF)
+$(GHC_PKG_INPLACE) : utils/ghc-pkg/dist/build/$(utils/ghc-pkg_dist_PROG)$(exeext) | $$(dir $$@)/. $(INPLACE_PACKAGE_CONF)/.
"$(RM)" $(RM_OPTS) $(INPLACE_PACKAGE_CONF)/*
ifeq "$(Windows)" "YES"
cp $< $@
"$(RM)" $(RM_OPTS) $(INPLACE_PACKAGE_CONF)/*
ifeq "$(Windows)" "YES"
cp $< $@
@@
-45,14
+44,16
@@
endif
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.
# 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) $(MKDIRHIER)
- "$(MKDIRHIER)" bootstrapping
- "$(MKDIRHIER)" utils/ghc-pkg/dist/build
+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 $@ \
"$(GHC)" $(SRC_HC_OPTS) --make utils/ghc-pkg/Main.hs -o $@ \
+ -no-user-package-conf \
-Wall -fno-warn-unused-imports \
-DCABAL_VERSION=$(CABAL_VERSION) \
-Wall -fno-warn-unused-imports \
-DCABAL_VERSION=$(CABAL_VERSION) \
+ -DBOOTSTRAPPING \
-odir bootstrapping \
-hidir bootstrapping \
-iutils/ghc-pkg \
-odir bootstrapping \
-hidir bootstrapping \
-iutils/ghc-pkg \
@@
-80,9
+81,10
@@
$(eval $(call clean-target,utils/ghc-pkg,dist,\
# -----------------------------------------------------------------------------
# Building ghc-pkg with stage 1
# -----------------------------------------------------------------------------
# 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_PROG = ghc-pkg
-utils/ghc-pkg_dist-install_MODULES = Main Version
-utils/ghc-pkg_dist-install_DEPS = Cabal terminfo bin-package-db
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)
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)
@@
-99,8
+101,8
@@
install: install_utils/ghc-pkg_link
.PNONY: install_utils/ghc-pkg_link
install_utils/ghc-pkg_link:
.PNONY: install_utils/ghc-pkg_link
install_utils/ghc-pkg_link:
- $(INSTALL_DIR) $(DESTDIR)$(bindir)
- "$(RM)" $(RM_OPTS) $(DESTDIR)$(bindir)/ghc-pkg
- $(LN_S) ghc-pkg-$(ProjectVersion) $(DESTDIR)$(bindir)/ghc-pkg
+ $(call INSTALL_DIR,"$(DESTDIR)$(bindir)")
+ "$(RM)" $(RM_OPTS) "$(DESTDIR)$(bindir)/ghc-pkg"
+ $(LN_S) ghc-pkg-$(ProjectVersion) "$(DESTDIR)$(bindir)/ghc-pkg"
endif
endif