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