1 | --- etc/install-sml.orig 2007-11-30 23:59:59.000000000 +0100 |
---|
2 | +++ etc/install-sml 2007-12-01 00:23:51.000000000 +0100 |
---|
3 | @@ -1,5 +1,5 @@ |
---|
4 | #!/bin/sh |
---|
5 | -# usage: install-sml APPNAME PREFIX SMLCM HEAP_SUFFIX GOROOT |
---|
6 | +# usage: install-sml APPNAME PREFIX SMLCM HEAP_SUFFIX GOROOT DESTROOT |
---|
7 | |
---|
8 | APPNAME=$1 |
---|
9 | PREFIX=$2 |
---|
10 | @@ -7,30 +7,30 @@ |
---|
11 | HEAP_SUFFIX=$4 |
---|
12 | TARGET=$5 |
---|
13 | GOROOT=$6 |
---|
14 | +DESTROOT=$7 |
---|
15 | |
---|
16 | - |
---|
17 | -$GOROOT/etc/mkdirhier $PREFIX/bin |
---|
18 | -$GOROOT/etc/mkdirhier $PREFIX/lib |
---|
19 | +$GOROOT/etc/mkdirhier $DESTROOT/bin |
---|
20 | +$GOROOT/etc/mkdirhier $DESTROOT/lib |
---|
21 | case "$TARGET" in |
---|
22 | x86-mingw32-gcc) |
---|
23 | SMLDIR=`$GOROOT/etc/which_dir sml.bat` |
---|
24 | RUN="$SMLDIR/.run/run.x86-win32.exe" |
---|
25 | - (echo '#!/bin/sh'; echo exec $RUN @SMLquiet @SMLload=\"$PREFIX/lib/$APPNAME.$HEAP_SUFFIX\" '$*') > $PREFIX/bin/$APPNAME |
---|
26 | - chmod +x $PREFIX/bin/$APPNAME |
---|
27 | - cp $APPNAME.$HEAP_SUFFIX $PREFIX/lib |
---|
28 | + (echo '#!/bin/sh'; echo exec $RUN @SMLquiet @SMLload=\"$PREFIX/lib/$APPNAME.$HEAP_SUFFIX\" '$*') > $DESTROOT/bin/$APPNAME |
---|
29 | + chmod +x $DESTROOT/bin/$APPNAME |
---|
30 | + cp $APPNAME.$HEAP_SUFFIX $DESTROOT/lib |
---|
31 | ;; |
---|
32 | x86-cygwin-gcc) |
---|
33 | SMLDIR=`$GOROOT/etc/which_dir sml.bat` |
---|
34 | RUN="$SMLDIR/.run/run.x86-win32.exe" |
---|
35 | CYG_RML_PATH=`cygpath -w "$PREFIX/lib/"` |
---|
36 | - (echo '#!/bin/sh'; echo exec $RUN @SMLquiet @SMLload=\"$CYG_RML_PATH\\$APPNAME.$HEAP_SUFFIX\" '$*') > $PREFIX/bin/$APPNAME |
---|
37 | - chmod +x $PREFIX/bin/$APPNAME |
---|
38 | - cp $APPNAME.$HEAP_SUFFIX $PREFIX/lib |
---|
39 | + (echo '#!/bin/sh'; echo exec $RUN @SMLquiet @SMLload=\"$CYG_RML_PATH\\$APPNAME.$HEAP_SUFFIX\" '$*') > $DESTROOT/bin/$APPNAME |
---|
40 | + chmod +x $DESTROOT/bin/$APPNAME |
---|
41 | + cp $APPNAME.$HEAP_SUFFIX $DESTROOT/lib |
---|
42 | ;; |
---|
43 | *) |
---|
44 | RUN="$SMLCM" |
---|
45 | - (echo '#!/bin/sh'; echo exec $RUN @SMLquiet @SMLload=$PREFIX/lib/$APPNAME.$HEAP_SUFFIX '$*') > $PREFIX/bin/$APPNAME |
---|
46 | - chmod +x $PREFIX/bin/$APPNAME |
---|
47 | - cp $APPNAME.$HEAP_SUFFIX $PREFIX/lib |
---|
48 | + (echo '#!/bin/sh'; echo exec $RUN @SMLquiet @SMLload=$PREFIX/lib/$APPNAME.$HEAP_SUFFIX '$*') > $DESTROOT/bin/$APPNAME |
---|
49 | + chmod +x $DESTROOT/bin/$APPNAME |
---|
50 | + cp $APPNAME.$HEAP_SUFFIX $DESTROOT/lib |
---|
51 | ;; |
---|
52 | esac |
---|