3 # Install SBCL files into the usual places.
8 test -d $j || mkdir -p $j
12 INSTALL_ROOT=${INSTALL_ROOT-/usr/local}
13 MAN_DIR=${MAN_DIR-$INSTALL_ROOT/share/man}
14 INFO_DIR=${INFO_DIR-$INSTALL_ROOT/share/info}
15 DOC_DIR=${DOC_DIR-$INSTALL_ROOT/share/doc/sbcl}
18 if [ -n "$SBCL_HOME" -a "$INSTALL_ROOT/lib/sbcl" != "$SBCL_HOME" ];then
19 echo SBCL_HOME environment variable is set, and conflicts with INSTALL_ROOT.
20 echo Aborting installation. Unset one or reset the other, then try again
21 echo INSTALL_ROOT="$INSTALL_ROOT"
22 echo SBCL_HOME="$SBCL_HOME"
25 SBCL_HOME=$INSTALL_ROOT/lib/sbcl
26 export SBCL_HOME INSTALL_ROOT
27 ensure_dirs $BUILD_ROOT$INSTALL_ROOT $BUILD_ROOT$INSTALL_ROOT/bin \
28 $BUILD_ROOT$INSTALL_ROOT/lib \
29 $BUILD_ROOT$MAN_DIR $BUILD_ROOT$MAN_DIR/man1 \
30 $BUILD_ROOT$INFO_DIR $BUILD_ROOT$DOC_DIR \
31 $BUILD_ROOT$SBCL_HOME $BUILD_ROOT$SBCL_HOME/systems \
32 $BUILD_ROOT$SBCL_HOME/site-systems
34 # move old versions out of the way. Safer than copying: don't want to
35 # break any running instances that have these files mapped
36 test -f $BUILD_ROOT$INSTALL_ROOT/bin/sbcl && \
37 mv $BUILD_ROOT$INSTALL_ROOT/bin/sbcl $BUILD_ROOT$INSTALL_ROOT/bin/sbcl.old
38 test -f $BUILD_ROOT$SBCL_HOME/sbcl.core && \
39 mv $BUILD_ROOT$SBCL_HOME/sbcl.core $BUILD_ROOT$SBCL_HOME/sbcl.core.old
41 cp src/runtime/sbcl $BUILD_ROOT$INSTALL_ROOT/bin/
42 cp output/sbcl.core $BUILD_ROOT$SBCL_HOME/sbcl.core
46 SBCL="`pwd`/src/runtime/sbcl --noinform --core `pwd`/output/sbcl.core --userinit /dev/null --sysinit /dev/null --disable-debugger"
47 SBCL_BUILDING_CONTRIB=1
48 export SBCL SBCL_BUILDING_CONTRIB
53 for i in contrib/*; do
54 test -d $i && test -f $i/test-passed || continue;
55 INSTALL_DIR=$SBCL_HOME/`basename $i `
57 ensure_dirs $BUILD_ROOT$INSTALL_DIR && $GNUMAKE -C $i install
61 echo "SBCL has been installed:"
62 echo " binary $BUILD_ROOT$INSTALL_ROOT/bin/sbcl"
63 echo " core and contribs in $BUILD_ROOT$INSTALL_ROOT/lib/sbcl/"
65 # Installing manual & misc bits of documentation
67 # Locations based on FHS 2.3.
68 # See: <http://www.pathname.com/fhs/pub/fhs-2.3.html>
70 # share/ architecture independent read-only things
71 # share/man/ manpages, should be the same as man/
72 # share/info/ info files
73 # share/doc/ misc documentation
79 cp doc/sbcl.1 $BUILD_ROOT$MAN_DIR/man1/ && echo " man $BUILD_ROOT$MAN_DIR/man1/sbcl.1"
82 INFO_FILE=doc/manual/sbcl.info
83 test -f $INFO_FILE && cp $INFO_FILE $BUILD_ROOT$INFO_DIR/ \
84 && echo -n " info $BUILD_ROOT$INFO_DIR/sbcl.info" \
85 && ( install-info $BUILD_ROOT$INFO_DIR/sbcl.info > /dev/null 2>&1 \
86 || echo -n " (could not add to system catalog)" ) \
90 PDF_FILE=doc/manual/sbcl.pdf
91 test -f $PDF_FILE && cp $PDF_FILE $BUILD_ROOT$DOC_DIR/ \
92 && echo " pdf $BUILD_ROOT$DOC_DIR/sbcl.pdf"
96 test -d $HTMLS && cp -r $HTMLS $BUILD_ROOT$DOC_DIR/html \
97 && echo " html $BUILD_ROOT$DOC_DIR/html/index.html"
99 for f in BUGS SUPPORT CREDITS COPYING NEWS
101 cp $f $BUILD_ROOT$DOC_DIR/