0.8alpha.0.27:
[sbcl/lichteblau.git] / install.sh
blob4f9383750b1d209907db53dd50ad867bc62ae3bb
1 #!/bin/sh
3 # Install SBCL files into the usual places.
5 ensure_dirs ()
7 for j in $*; do
8 test -d $j || mkdir $j
9 done;
12 INSTALL_ROOT=${INSTALL_ROOT-/usr/local}
13 SBCL_SOURCE=`pwd`
14 if [ -n "$SBCL_HOME" -a "$INSTALL_ROOT/lib/sbcl" != "$SBCL_HOME" ];then
15 echo SBCL_HOME environment variable is set, and conflicts with INSTALL_ROOT.
16 echo Aborting installation. Unset one or reset the other, then try again
17 echo INSTALL_ROOT="$INSTALL_ROOT"
18 echo SBCL_HOME="$SBCL_HOME"
19 exit 1
21 SBCL_HOME=$INSTALL_ROOT/lib/sbcl
22 export SBCL_HOME
23 ensure_dirs $INSTALL_ROOT $INSTALL_ROOT/bin $INSTALL_ROOT/lib \
24 $INSTALL_ROOT/man $INSTALL_ROOT/man/man1 \
25 $SBCL_HOME $SBCL_HOME/systems $SBCL_HOME/site-systems
27 # move old versions out of the way. Safer than copying: don't want to
28 # break any running instances that have these files mapped
29 test -f $INSTALL_ROOT/bin/sbcl && \
30 mv $INSTALL_ROOT/bin/sbcl $INSTALL_ROOT/bin/sbcl.old
31 test -f $SBCL_HOME/sbcl.core && \
32 mv $SBCL_HOME/sbcl.core $SBCL_HOME/sbcl.core.old
34 cp src/runtime/sbcl $INSTALL_ROOT/bin/
35 cp output/sbcl.core $SBCL_HOME/sbcl.core
36 cp doc/sbcl.1 $INSTALL_ROOT/man/man1/
38 # installing contrib
40 SBCL="`pwd`/src/runtime/sbcl --noinform --core `pwd`/output/sbcl.core --userinit /dev/null --sysinit /dev/null --disable-debugger"
41 SBCL_BUILDING_CONTRIB=1
42 export SBCL SBCL_BUILDING_CONTRIB
44 gnumake=${GNUMAKE:-gmake}
45 for i in contrib/*; do
46 test -d $i && test -f $i/test-passed || continue;
47 INSTALL_DIR=$SBCL_HOME/`basename $i `
48 export INSTALL_DIR
49 ensure_dirs $INSTALL_DIR && $gnumake -C $i install
50 done