[commit: ghc] master: install ghc-pkg correctly when Stage1Only=YES (#7639) (0403da6)

Simon Marlow marlowsd at gmail.com
Tue Feb 5 14:53:31 CET 2013


Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/0403da668db740c70c606329021fcfd0164c2573

>---------------------------------------------------------------

commit 0403da668db740c70c606329021fcfd0164c2573
Author: Simon Marlow <marlowsd at gmail.com>
Date:   Tue Feb 5 12:39:50 2013 +0000

    install ghc-pkg correctly when Stage1Only=YES (#7639)

>---------------------------------------------------------------

 utils/ghc-pkg/ghc.mk |   47 +++++++++++++++++++++++++++--------------------
 1 files changed, 27 insertions(+), 20 deletions(-)

diff --git a/utils/ghc-pkg/ghc.mk b/utils/ghc-pkg/ghc.mk
index 2a721de..d904c48 100644
--- a/utils/ghc-pkg/ghc.mk
+++ b/utils/ghc-pkg/ghc.mk
@@ -81,37 +81,45 @@ utils/ghc-pkg/dist-install/build/Version.hs: mk/project.mk | $$(dir $$@)/.
 $(eval $(call clean-target,utils/ghc-pkg,dist,utils/ghc-pkg/dist))
 
 # -----------------------------------------------------------------------------
-# Cross-compile case: Install our dist version
-# Normal case: Build ghc-pkg with stage 1
+# Cross-compile case: install our dist version
 
 ifeq "$(Stage1Only)" "YES"
-GHC_PKG_DISTDIR=dist
-else
-GHC_PKG_DISTDIR=dist-install
-endif
 
-utils/ghc-pkg_$(GHC_PKG_DISTDIR)_USES_CABAL = YES
-utils/ghc-pkg_PACKAGE = ghc-pkg
+utils/ghc-pkg_dist_INSTALL = YES
+utils/ghc-pkg_dist_SHELL_WRAPPER = YES
+utils/ghc-pkg_dist_INSTALL_SHELL_WRAPPER_NAME = ghc-pkg-$(ProjectVersion)
+utils/ghc-pkg_dist_WANT_INSTALLED_WRAPPER = YES
 
-utils/ghc-pkg_$(GHC_PKG_DISTDIR)_PROG = ghc-pkg
-utils/ghc-pkg_$(GHC_PKG_DISTDIR)_SHELL_WRAPPER = YES
-utils/ghc-pkg_$(GHC_PKG_DISTDIR)_INSTALL = YES
-utils/ghc-pkg_$(GHC_PKG_DISTDIR)_INSTALL_SHELL_WRAPPER_NAME = ghc-pkg-$(ProjectVersion)
-utils/ghc-pkg_$(GHC_PKG_DISTDIR)_INSTALL_INPLACE = NO
+INSTALL_LIBEXECS += utils/ghc-pkg/dist/build/tmp/$(utils/ghc-pkg_dist_PROG)
+
+$(eval $(call shell-wrapper,utils/ghc-pkg,dist))
 
-ifeq "$(BootingFromHc)" "YES"
-utils/ghc-pkg_dist-install_OTHER_OBJS += $(ALL_STAGE1_LIBS) $(ALL_STAGE1_LIBS) $(ALL_STAGE1_LIBS) $(ALL_RTS_LIBS) $(libffi_STATIC_LIB)
 endif
 
-ifeq "$(Stage1Only)" "YES"
-$(eval $(call shell-wrapper,utils/ghc-pkg,dist))
-else
+# -----------------------------------------------------------------------------
+# Normal case: Build ghc-pkg with stage 1 and install it
+
+ifneq "$(Stage1Only)" "YES"
+
+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_SHELL_WRAPPER = YES
+utils/ghc-pkg_dist-install_INSTALL = YES
+utils/ghc-pkg_dist-install_INSTALL_SHELL_WRAPPER_NAME = ghc-pkg-$(ProjectVersion)
+utils/ghc-pkg_dist-install_INSTALL_INPLACE = NO
+
 $(eval $(call build-prog,utils/ghc-pkg,dist-install,1))
-endif
 
 utils/ghc-pkg/dist-install/package-data.mk: \
     utils/ghc-pkg/dist-install/build/Version.hs
 
+endif
+
+# -----------------------------------------------------------------------------
+# Link ghc-pkg to ghc-pkg-$(ProjectVersion) when installing
+
 ifeq "$(Windows)" "NO"
 install: install_utils/ghc-pkg_link
 
@@ -121,4 +129,3 @@ install_utils/ghc-pkg_link:
 	$(call removeFiles,"$(DESTDIR)$(bindir)/$(CrossCompilePrefix)ghc-pkg")
 	$(LN_S) $(CrossCompilePrefix)ghc-pkg-$(ProjectVersion) "$(DESTDIR)$(bindir)/$(CrossCompilePrefix)ghc-pkg"
 endif
-





More information about the ghc-commits mailing list