4 # Install SBCL files into the usual places.
9 test -d $j || mkdir
-p $j
13 INSTALL_ROOT
=${INSTALL_ROOT-/usr/local}
14 MAN_DIR
=${MAN_DIR-$INSTALL_ROOT/share/man}
15 INFO_DIR
=${INFO_DIR-$INSTALL_ROOT/share/info}
16 DOC_DIR
=${DOC_DIR-$INSTALL_ROOT/share/doc/sbcl}
18 # Does the environment look sane?
20 if [ -n "$SBCL_HOME" -a "$INSTALL_ROOT/lib/sbcl" != "$SBCL_HOME" ];then
21 echo SBCL_HOME environment variable is
set, and conflicts with INSTALL_ROOT.
22 echo Aborting installation. Unset one or
reset the other
, then try again
23 echo INSTALL_ROOT
="$INSTALL_ROOT"
24 echo SBCL_HOME
="$SBCL_HOME"
28 # Before doing anything else, make sure we have an SBCL to install
29 if [ -f src
/runtime
/sbcl
]; then
30 if [ -f output
/sbcl.core
]; then
33 echo "output/sbcl.core not found, aborting installation."
37 echo "src/runtime/sbcl not found, aborting installation."
41 SBCL_HOME
=$INSTALL_ROOT/lib
/sbcl
42 export SBCL_HOME INSTALL_ROOT
43 ensure_dirs
$BUILD_ROOT$INSTALL_ROOT $BUILD_ROOT$INSTALL_ROOT/bin \
44 $BUILD_ROOT$INSTALL_ROOT/lib \
45 $BUILD_ROOT$MAN_DIR $BUILD_ROOT$MAN_DIR/man1 \
46 $BUILD_ROOT$INFO_DIR $BUILD_ROOT$DOC_DIR \
47 $BUILD_ROOT$DOC_DIR/html \
48 $BUILD_ROOT$SBCL_HOME $BUILD_ROOT$SBCL_HOME/systems \
49 $BUILD_ROOT$SBCL_HOME/site-systems
51 # move old versions out of the way. Safer than copying: don't want to
52 # break any running instances that have these files mapped
53 test -f $BUILD_ROOT$INSTALL_ROOT/bin
/sbcl
&& \
54 mv $BUILD_ROOT$INSTALL_ROOT/bin
/sbcl
$BUILD_ROOT$INSTALL_ROOT/bin
/sbcl.old
55 test -f $BUILD_ROOT$SBCL_HOME/sbcl.core
&& \
56 mv $BUILD_ROOT$SBCL_HOME/sbcl.core
$BUILD_ROOT$SBCL_HOME/sbcl.core.old
58 cp src
/runtime
/sbcl
$BUILD_ROOT$INSTALL_ROOT/bin
/
59 cp output
/sbcl.core
$BUILD_ROOT$SBCL_HOME/sbcl.core
63 SBCL
="`pwd`/src/runtime/sbcl --noinform --core `pwd`/output/sbcl.core --userinit /dev/null --sysinit /dev/null --disable-debugger"
64 SBCL_BUILDING_CONTRIB
=1
65 export SBCL SBCL_BUILDING_CONTRIB
70 for i
in contrib
/*; do
71 test -d $i && test -f $i/test-passed ||
continue;
72 INSTALL_DIR
=$SBCL_HOME/`basename $i `
74 ensure_dirs
$BUILD_ROOT$INSTALL_DIR && $GNUMAKE -C $i install
78 echo "SBCL has been installed:"
79 echo " binary $BUILD_ROOT$INSTALL_ROOT/bin/sbcl"
80 echo " core and contribs in $BUILD_ROOT$INSTALL_ROOT/lib/sbcl/"
82 # Installing manual & misc bits of documentation
84 # Locations based on FHS 2.3.
85 # See: <http://www.pathname.com/fhs/pub/fhs-2.3.html>
87 # share/ architecture independent read-only things
88 # share/man/ manpages, should be the same as man/
89 # share/info/ info files
90 # share/doc/ misc documentation
96 cp doc
/sbcl
.1 $BUILD_ROOT$MAN_DIR/man
1/ && echo " man $BUILD_ROOT$MAN_DIR/man1/sbcl.1"
99 for info
in doc
/manual
/*.info
101 cp $info $BUILD_ROOT$INFO_DIR/ \
102 && echo -n " info $BUILD_ROOT$INFO_DIR/`basename $info` $BUILD_ROOT$INFO_DIR/dir" \
103 && ( install-info
$BUILD_ROOT$INFO_DIR/`basename $info` $BUILD_ROOT$INFO_DIR/dir
> /dev
/null
2>&1 \
104 ||
echo -n " (could not add to system catalog)" ) \
109 for pdf
in doc
/manual
/*.pdf
111 cp $pdf $BUILD_ROOT$DOC_DIR/ \
112 && echo " pdf $BUILD_ROOT$DOC_DIR/`basename $pdf`"
116 for html
in doc
/manual
/sbcl
doc
/manual
/asdf
118 test -d $html && cp -R -L $html $BUILD_ROOT$DOC_DIR/html \
119 && echo " html $BUILD_ROOT$DOC_DIR/html/`basename $html`/index.html"
122 for f
in BUGS SUPPORT CREDITS COPYING NEWS
124 cp $f $BUILD_ROOT$DOC_DIR/