Tweak the shell wrapper scripts
authorIan Lynagh <igloo@earth.li>
Sat, 7 Nov 2009 18:05:02 +0000 (18:05 +0000)
committerIan Lynagh <igloo@earth.li>
Sat, 7 Nov 2009 18:05:02 +0000 (18:05 +0000)
We now separate the executable path from the executable name.
This will allow us to change one but not the other easily.

rules/shell-wrapper.mk

index 3f01286..dda78aa 100644 (file)
@@ -62,7 +62,9 @@ install_$1_$2_wrapper:
        "$$(RM)" $$(RM_OPTS)                                        "$$(WRAPPER)"
        $$(CREATE_SCRIPT)                                           "$$(WRAPPER)"
        echo '#!$$(SHELL)'                                       >> "$$(WRAPPER)"
-       echo 'executablename="$$(ghclibexecdir)/$$($1_$2_PROG)"' >> "$$(WRAPPER)"
+       echo 'exedir="$$(ghclibexecdir)"'                        >> "$$(WRAPPER)"
+       echo 'exeprog="$$($1_$2_PROG)"'                          >> "$$(WRAPPER)"
+       echo 'executablename="$$$$exedir/$$$$exeprog"'           >> "$$(WRAPPER)"
        echo 'datadir="$$(datadir)"'                             >> "$$(WRAPPER)"
        echo 'bindir="$$(bindir)"'                               >> "$$(WRAPPER)"
        echo 'topdir="$$(topdir)"'                               >> "$$(WRAPPER)"