4 # Install SBCL files into the usual places.
9 test -d $j || mkdir
-p $j
13 if [ "$OSTYPE" = "cygwin" -o "$OSTYPE" = "msys" ] ; then
14 DEFAULT_INSTALL_ROOT
="$PROGRAMFILES/sbcl"
16 OLD_RUNTIME
=sbcl.exe.old
18 DEFAULT_INSTALL_ROOT
=/usr
/local
22 INSTALL_ROOT
=${INSTALL_ROOT-$DEFAULT_INSTALL_ROOT}
23 MAN_DIR
=${MAN_DIR-$INSTALL_ROOT/share/man}
24 INFO_DIR
=${INFO_DIR-$INSTALL_ROOT/share/info}
25 DOC_DIR
=${DOC_DIR-$INSTALL_ROOT/share/doc/sbcl}
27 # Does the environment look sane?
28 if [ -n "$SBCL_HOME" -a "$INSTALL_ROOT/lib/sbcl" != "$SBCL_HOME" ];then
29 echo SBCL_HOME environment variable is
set, and conflicts with INSTALL_ROOT.
30 echo Aborting installation. Unset one or
reset the other
, then try again
31 echo INSTALL_ROOT
="$INSTALL_ROOT"
32 echo SBCL_HOME
="$SBCL_HOME"
36 # Before doing anything else, make sure we have an SBCL to install
37 if [ -f src
/runtime
/$RUNTIME ]; then
38 if [ -f output
/sbcl.core
]; then
41 echo "output/sbcl.core not found, aborting installation."
45 echo "src/runtime/$RUNTIME not found, aborting installation."
49 SBCL_HOME
=$INSTALL_ROOT/lib
/sbcl
50 export SBCL_HOME INSTALL_ROOT
51 ensure_dirs
$BUILD_ROOT$INSTALL_ROOT $BUILD_ROOT$INSTALL_ROOT/bin \
52 $BUILD_ROOT$INSTALL_ROOT/lib \
53 $BUILD_ROOT$MAN_DIR $BUILD_ROOT$MAN_DIR/man1 \
54 $BUILD_ROOT$INFO_DIR $BUILD_ROOT$DOC_DIR \
55 $BUILD_ROOT$DOC_DIR/html \
56 $BUILD_ROOT$SBCL_HOME \
57 $BUILD_ROOT$SBCL_HOME/site-systems
59 # move old versions out of the way. Safer than copying: don't want to
60 # break any running instances that have these files mapped
61 test -f $BUILD_ROOT$INSTALL_ROOT/bin
/$RUNTIME && \
62 mv $BUILD_ROOT$INSTALL_ROOT/bin
/$RUNTIME \
63 $BUILD_ROOT$INSTALL_ROOT/bin
/$OLD_RUNTIME
64 test -f $BUILD_ROOT$SBCL_HOME/sbcl.core
&& \
65 mv $BUILD_ROOT$SBCL_HOME/sbcl.core
$BUILD_ROOT$SBCL_HOME/sbcl.core.old
67 cp src
/runtime
/$RUNTIME $BUILD_ROOT$INSTALL_ROOT/bin
/
68 cp output
/sbcl.core
$BUILD_ROOT$SBCL_HOME/sbcl.core
75 SBCL
="$SBCL_PWD/src/runtime/sbcl --noinform --core $SBCL_PWD/output/sbcl.core --no-userinit --no-sysinit --disable-debugger"
76 SBCL_BUILDING_CONTRIB
=1
77 export SBCL SBCL_BUILDING_CONTRIB
82 for i
in contrib
/*; do
83 test -d $i && test -f $i/test-passed ||
continue;
84 INSTALL_DIR
=$SBCL_HOME/`basename $i `
86 ensure_dirs
$BUILD_ROOT$INSTALL_DIR && $GNUMAKE -C $i install
90 echo "SBCL has been installed:"
91 echo " binary $BUILD_ROOT$INSTALL_ROOT/bin/$RUNTIME"
92 echo " core and contribs in $BUILD_ROOT$INSTALL_ROOT/lib/sbcl/"
94 # Installing manual & misc bits of documentation
96 # Locations based on FHS 2.3.
97 # See: <http://www.pathname.com/fhs/pub/fhs-2.3.html>
99 # share/ architecture independent read-only things
100 # share/man/ manpages, should be the same as man/
101 # share/info/ info files
102 # share/doc/ misc documentation
105 echo "Documentation:"
108 cp doc
/sbcl
.1 $BUILD_ROOT$MAN_DIR/man
1/ && echo " man $BUILD_ROOT$MAN_DIR/man1/sbcl.1"
111 for info
in doc
/manual
/*.info
doc
/manual
/*.info-
*
113 cp $info $BUILD_ROOT$INFO_DIR/ \
114 && echo -n " info $BUILD_ROOT$INFO_DIR/`basename $info` $BUILD_ROOT$INFO_DIR/dir" \
115 && ( install-info
$BUILD_ROOT$INFO_DIR/`basename $info` $BUILD_ROOT$INFO_DIR/dir
> /dev
/null
2>&1 \
116 ||
echo -n " (could not add to system catalog)" ) \
121 for pdf
in doc
/manual
/*.pdf
123 cp $pdf $BUILD_ROOT$DOC_DIR/ \
124 && echo " pdf $BUILD_ROOT$DOC_DIR/`basename $pdf`"
128 for html
in doc
/manual
/sbcl
doc
/manual
/asdf
130 test -d $html && cp -R -L $html $BUILD_ROOT$DOC_DIR/html \
131 && echo " html $BUILD_ROOT$DOC_DIR/html/`basename $html`/index.html"
134 for f
in BUGS SUPPORT CREDITS COPYING NEWS
136 cp $f $BUILD_ROOT$DOC_DIR/