blob: c652392782b45b07d06c60a5460862207c754f53 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
--- config/install-sml-wrapper_sh.in.orig Thu May 10 23:24:11 2007
+++ config/install-sml-wrapper_sh.in Sun Jul 22 16:49:42 2007
@@ -9,9 +9,10 @@
#
# install-sml-wrapper.sh <program-name> <install-dir>
-INSTALL="@INSTALL@"
-INSTALL_DATA="@INSTALL_DATA@"
+INSTALL="$BSD_INSTALL_PROGRAM"
+INSTALL_DATA="$BSD_INSTALL_DATA"
HEAP_SUFFIX="@SMLNJ_HEAP_SUFFIX@"
+HEAP2EXEC=/usr/local/bin/heap2exec
if test $# -ne 2 ; then
echo "usage: install-sml-wrapper.sh <program-name> <install-dir>"
@@ -22,29 +23,17 @@
TARGET=`basename $SRC`
HEAP_IMAGE=$SRC.$HEAP_SUFFIX
INSTALL_DIR=$2
-INSTALL_HEAP_DIR=$INSTALL_DIR/.heap
-INSTALL_HEAP_IMAGE=$INSTALL_HEAP_DIR/$TARGET.$HEAP_SUFFIX
if test ! -f $HEAP_IMAGE ; then
echo "heap image $HEAP_IMAGE not found"
exit 1
fi
-# create the wrapper script
-#
-cat > $TARGET <<XXXX
-#!/bin/sh
-#
-exec @SMLNJ_CMD@ @SMLcmdname=\$0 @SMLload=$INSTALL_HEAP_IMAGE \$@
-XXXX
+$HEAP2EXEC $HEAP_IMAGE $TARGET
#install the script and heap image
#
$INSTALL $TARGET $INSTALL_DIR/$TARGET || exit 1
-if test ! -d $INSTALL_HEAP_DIR ; then
- mkdir $INSTALL_HEAP_DIR || exit 1
-fi
-$INSTALL_DATA $HEAP_IMAGE $INSTALL_HEAP_IMAGE || exit 1
# remove the local copy of the script
rm -f $TARGET
|