summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ghc/ghc.mk2
-rw-r--r--rules/build-prog.mk8
-rw-r--r--rules/shell-wrapper.mk19
-rw-r--r--utils/ghc-pkg/ghc.mk2
-rw-r--r--utils/runghc/ghc.mk2
5 files changed, 12 insertions, 21 deletions
diff --git a/ghc/ghc.mk b/ghc/ghc.mk
index e1545033be..e177b9274c 100644
--- a/ghc/ghc.mk
+++ b/ghc/ghc.mk
@@ -78,7 +78,7 @@ ghc_stage1_SHELL_WRAPPER_NAME = ghc/ghc.wrapper
ghc_stage2_SHELL_WRAPPER_NAME = ghc/ghc.wrapper
ghc_stage3_SHELL_WRAPPER_NAME = ghc/ghc.wrapper
-ghc_stage$(INSTALL_GHC_STAGE)_INSTALL_SHELL_WRAPPER = YES
+ghc_stage$(INSTALL_GHC_STAGE)_INSTALL = YES
ghc_stage$(INSTALL_GHC_STAGE)_INSTALL_SHELL_WRAPPER_NAME = ghc-$(ProjectVersion)
# We override the program name to be ghc, rather than ghc-stage2.
diff --git a/rules/build-prog.mk b/rules/build-prog.mk
index 27d410e1a0..2a76943301 100644
--- a/rules/build-prog.mk
+++ b/rules/build-prog.mk
@@ -184,10 +184,12 @@ endif
$(call clean-target,$1,$2_inplace,$$($1_$2_INPLACE))
ifeq "$$($1_$2_INSTALL)" "YES"
-ifeq "$$($1_$2_TOPDIR)" "YES"
-INSTALL_TOPDIRS += $1/$2/build/tmp/$$($1_$2_PROG)
+ifeq "$$($1_$2_SHELL_WRAPPER) $$(Windows)" "YES NO"
+INSTALL_LIBEXECS += $1/$2/build/tmp/$$($1_$2_PROG)
+else ifeq "$$($1_$2_TOPDIR)" "YES"
+INSTALL_TOPDIRS += $1/$2/build/tmp/$$($1_$2_PROG)
else
-INSTALL_BINS += $1/$2/build/tmp/$$($1_$2_PROG)
+INSTALL_BINS += $1/$2/build/tmp/$$($1_$2_PROG)
endif
endif
diff --git a/rules/shell-wrapper.mk b/rules/shell-wrapper.mk
index a291d852fe..1fab27f0c4 100644
--- a/rules/shell-wrapper.mk
+++ b/rules/shell-wrapper.mk
@@ -16,16 +16,7 @@ $(call profStart, shell-wrapper($1,$2))
# $1 = dir
# $2 = distdir
-ifeq "$$($1_$2_SHELL_WRAPPER)" "YES"
-
-ifeq "$$(Windows)" "YES"
-
-ifeq "$$($1_$2_INSTALL_SHELL_WRAPPER)" "YES"
-# Just install the binary on Windows
-$1_$2_INSTALL = YES
-endif
-
-else
+ifeq "$$($1_$2_SHELL_WRAPPER) $$(Windows)" "YES NO"
ifeq "$$($1_$2_SHELL_WRAPPER_NAME)" ""
$1_$2_SHELL_WRAPPER_NAME = $1/$$($1_$2_PROG).wrapper
@@ -49,7 +40,7 @@ $$(INPLACE_BIN)/$$($1_$2_PROG): $$($1_$2_INPLACE) $$($1_$2_SHELL_WRAPPER_NAME)
$$(EXECUTABLE_FILE) $$@
endif
-ifeq "$$($1_$2_INSTALL_SHELL_WRAPPER)" "YES"
+ifeq "$$($1_$2_INSTALL)" "YES"
ifeq "$$($1_$2_INSTALL_SHELL_WRAPPER_NAME)" ""
$1_$2_INSTALL_SHELL_WRAPPER_NAME = $$($1_$2_PROG)
@@ -79,11 +70,9 @@ install_$1_$2_wrapper:
cat $$($1_$2_SHELL_WRAPPER_NAME) >> "$$(WRAPPER)"
$$(EXECUTABLE_FILE) "$$(WRAPPER)"
-endif # $1_$2_INSTALL_SHELL_WRAPPER
-
-endif
+endif # $1_$2_INSTALL
-endif # $1_$2_SHELL_WRAPPER
+endif # $1_$2_SHELL_WRAPPER && !Windows
$(call profEnd, shell-wrapper($1,$2))
endef
diff --git a/utils/ghc-pkg/ghc.mk b/utils/ghc-pkg/ghc.mk
index ba553d29e9..68c63e2a1f 100644
--- a/utils/ghc-pkg/ghc.mk
+++ b/utils/ghc-pkg/ghc.mk
@@ -96,7 +96,7 @@ utils/ghc-pkg_PACKAGE = ghc-pkg
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_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
diff --git a/utils/runghc/ghc.mk b/utils/runghc/ghc.mk
index 128987daf6..6ff84f0c62 100644
--- a/utils/runghc/ghc.mk
+++ b/utils/runghc/ghc.mk
@@ -14,7 +14,7 @@ utils/runghc_PACKAGE = runghc
utils/runghc_dist-install_USES_CABAL = YES
utils/runghc_dist-install_PROG = runghc$(exeext)
utils/runghc_dist-install_SHELL_WRAPPER = YES
-utils/runghc_dist-install_INSTALL_SHELL_WRAPPER = YES
+utils/runghc_dist-install_INSTALL = YES
utils/runghc_dist-install_INSTALL_SHELL_WRAPPER_NAME = runghc-$(ProjectVersion)
utils/runghc_dist-install_EXTRA_HC_OPTS = -cpp -DVERSION="\"$(ProjectVersion)\""