summaryrefslogtreecommitdiff
path: root/rules/shell-wrapper.mk
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2009-08-14 22:45:49 +0000
committerIan Lynagh <igloo@earth.li>2009-08-14 22:45:49 +0000
commit926ae90b75cd3368049854898062a563e57c9ad2 (patch)
tree543ef37498be98d3cb18a587c26b589e8d78d311 /rules/shell-wrapper.mk
parent328681951873b54dade3d0ecef2bea9bf97fff29 (diff)
downloadhaskell-926ae90b75cd3368049854898062a563e57c9ad2.tar.gz
Make our install variables etc compliant with GNU standards; fixes #1924
Diffstat (limited to 'rules/shell-wrapper.mk')
-rw-r--r--rules/shell-wrapper.mk18
1 files changed, 10 insertions, 8 deletions
diff --git a/rules/shell-wrapper.mk b/rules/shell-wrapper.mk
index 312504e278..9535a7d720 100644
--- a/rules/shell-wrapper.mk
+++ b/rules/shell-wrapper.mk
@@ -38,6 +38,7 @@ $$(INPLACE_BIN)/$$($1_$2_PROG): $$($1_$2_INPLACE)
echo 'executablename=$$(TOP)/$$<' >> $$@
echo 'datadir=$$(TOP)/$$(INPLACE_LIB)' >> $$@
echo 'bindir=$$(TOP)/$$(INPLACE_BIN)' >> $$@
+ echo 'topdir=$$(TOP)/$$(INPLACE_TOPDIR)' >> $$@
cat $$($1_$2_SHELL_WRAPPER_NAME) >> $$@
$$(EXECUTABLE_FILE) $$@
endif
@@ -58,14 +59,15 @@ install: install_$1_$2_wrapper
install_$1_$2_wrapper: WRAPPER=$$(DESTDIR)$$(bindir)/$$($1_$2_INSTALL_SHELL_WRAPPER_NAME)
install_$1_$2_wrapper:
$$(INSTALL_DIR) $$(DESTDIR)$$(bindir)
- "$$(RM)" $$(RM_OPTS) $$(WRAPPER)
- $$(CREATE_SCRIPT) $$(WRAPPER)
- echo '#!$$(SHELL)' >> $$(WRAPPER)
- echo 'executablename=$$(libexecdir)/$$($1_$2_PROG)' >> $$(WRAPPER)
- echo 'datadir=$$(datadir)' >> $$(WRAPPER)
- echo 'bindir=$$(bindir)' >> $$(WRAPPER)
- cat $$($1_$2_SHELL_WRAPPER_NAME) >> $$(WRAPPER)
- $$(EXECUTABLE_FILE) $$(WRAPPER)
+ "$$(RM)" $$(RM_OPTS) $$(WRAPPER)
+ $$(CREATE_SCRIPT) $$(WRAPPER)
+ echo '#!$$(SHELL)' >> $$(WRAPPER)
+ echo 'executablename=$$(ghclibexecdir)/$$($1_$2_PROG)' >> $$(WRAPPER)
+ echo 'datadir=$$(datadir)' >> $$(WRAPPER)
+ echo 'bindir=$$(bindir)' >> $$(WRAPPER)
+ echo 'topdir=$$(topdir)' >> $$(WRAPPER)
+ cat $$($1_$2_SHELL_WRAPPER_NAME) >> $$(WRAPPER)
+ $$(EXECUTABLE_FILE) $$(WRAPPER)
endif # $1_$2_INSTALL_SHELL_WRAPPER