--- bin/.mkexec.orig	2003-01-21 01:03:32.000000000 -0500
+++ bin/.mkexec	2009-02-12 21:24:27.000000000 -0500
@@ -7,8 +7,9 @@
 # $2 = Twelf root directory
 # $3 = Type of executable (e.g. twelf-server, twelf-sml)
 # $4 = Name of executable (e.g. twelf-server, twelf-sml)
+# $5 = Twelf installation directory (e.g. /usr/local/libexec/twelf)
 cat > "$2/bin/$4" <<EOF
 #! /bin/sh
-exec "$1" @SMLload="$2/bin/.heap/$3" @SMLdebug=/dev/null
+exec "$1" @SMLload="$5/bin/.heap/$3" @SMLdebug=/dev/null
 EOF
 chmod a+x "$2/bin/$4"
