Commit b4bd9a58 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Tweak how shell wrappers are built

parent f5b3f16c
......@@ -92,7 +92,7 @@ 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)"
echo 'executablename="$$exedir/ghc"' >> "$(WRAPPER)"
endef
# stage 1 is enabled unless $(stage) is set to something other than 1
......
......@@ -32,6 +32,7 @@ endif
ifneq "$$($1_$2_INSTALL_INPLACE)" "NO"
all_$1_$2 : $$(INPLACE_BIN)/$$($1_$2_PROG)
$$(INPLACE_BIN)/$$($1_$2_PROG): WRAPPER=$$@
$$(INPLACE_BIN)/$$($1_$2_PROG): $$($1_$2_INPLACE)
"$$(RM)" $$(RM_OPTS) $$@
echo '#!$$(SHELL)' >> $$@
......@@ -39,8 +40,8 @@ $$(INPLACE_BIN)/$$($1_$2_PROG): $$($1_$2_INPLACE)
echo 'datadir="$$(TOP)/$$(INPLACE_LIB)"' >> $$@
echo 'bindir="$$(TOP)/$$(INPLACE_BIN)"' >> $$@
echo 'topdir="$$(TOP)/$$(INPLACE_TOPDIR)"' >> $$@
$($1_$2_SHELL_WRAPPER_EXTRA)
$($1_$2_INPLACE_SHELL_WRAPPER_EXTRA)
$$($1_$2_SHELL_WRAPPER_EXTRA)
$$($1_$2_INPLACE_SHELL_WRAPPER_EXTRA)
cat $$($1_$2_SHELL_WRAPPER_NAME) >> $$@
$$(EXECUTABLE_FILE) $$@
endif
......@@ -70,8 +71,8 @@ install_$1_$2_wrapper:
echo 'datadir="$$(datadir)"' >> "$$(WRAPPER)"
echo 'bindir="$$(bindir)"' >> "$$(WRAPPER)"
echo 'topdir="$$(topdir)"' >> "$$(WRAPPER)"
$($1_$2_SHELL_WRAPPER_EXTRA)
$($1_$2_INSTALL_SHELL_WRAPPER_EXTRA)
$$($1_$2_SHELL_WRAPPER_EXTRA)
$$($1_$2_INSTALL_SHELL_WRAPPER_EXTRA)
cat $$($1_$2_SHELL_WRAPPER_NAME) >> "$$(WRAPPER)"
$$(EXECUTABLE_FILE) "$$(WRAPPER)"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment