summaryrefslogtreecommitdiff
path: root/ghc/ghc.mk
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2009-11-07 18:36:14 +0000
committerIan Lynagh <igloo@earth.li>2009-11-07 18:36:14 +0000
commitf5b3f16c9321a1594ce1ed0b73914feabaa321a8 (patch)
treeff9568aaad7fd55b1803f01e2bf1d97b0e14f693 /ghc/ghc.mk
parent24e30dfa3fe0bb1efef01b1f216d9b5e45309f9c (diff)
downloadhaskell-f5b3f16c9321a1594ce1ed0b73914feabaa321a8.tar.gz
ghc-stage2 is now renamed to ghc when it is installed
This means that we get the right program name in error messages etc.
Diffstat (limited to 'ghc/ghc.mk')
-rw-r--r--ghc/ghc.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/ghc/ghc.mk b/ghc/ghc.mk
index 4c78e7fecb..2f505cf0c7 100644
--- a/ghc/ghc.mk
+++ b/ghc/ghc.mk
@@ -89,6 +89,12 @@ ghc_stage3_SHELL_WRAPPER_NAME = ghc/ghc.wrapper
ghc_stage$(INSTALL_GHC_STAGE)_INSTALL_SHELL_WRAPPER = YES
ghc_stage$(INSTALL_GHC_STAGE)_INSTALL_SHELL_WRAPPER_NAME = ghc-$(ProjectVersion)
+# We override the program name to be ghc, rather than ghc-stage2.
+# This means the right program name is used in error messages etc.
+define ghc_stage$(INSTALL_GHC_STAGE)_INSTALL_SHELL_WRAPPER_EXTRA
+echo 'executablename="$$$$exedir/ghc"' >> "$$(WRAPPER)"
+endef
+
# stage 1 is enabled unless $(stage) is set to something other than 1
ifeq "$(filter-out 1,$(stage))" ""
$(eval $(call build-prog,ghc,stage1,0))