4 # Install SBCL files into the usual places.
11 test -d "$j" || mkdir
-p "$j"
16 if [ "$OSTYPE" = "cygwin" -o "$OSTYPE" = "msys" ] ; then
17 DEFAULT_INSTALL_ROOT
="$PROGRAMFILES/sbcl"
19 OLD_RUNTIME
=sbcl.exe.old
21 DEFAULT_INSTALL_ROOT
=/usr
/local
25 INSTALL_ROOT
=${INSTALL_ROOT-$DEFAULT_INSTALL_ROOT}
26 MAN_DIR
=${MAN_DIR-"$INSTALL_ROOT"/share/man}
27 INFO_DIR
=${INFO_DIR-"$INSTALL_ROOT"/share/info}
28 DOC_DIR
=${DOC_DIR-"$INSTALL_ROOT"/share/doc/sbcl}
30 # Does the environment look sane?
31 if [ -n "$SBCL_HOME" -a "$INSTALL_ROOT/lib/sbcl" != "$SBCL_HOME" ];then
32 echo SBCL_HOME environment variable is
set, and conflicts with INSTALL_ROOT.
33 echo Aborting installation. Unset one or
reset the other
, then try again
34 echo INSTALL_ROOT
="$INSTALL_ROOT"
35 echo SBCL_HOME
="$SBCL_HOME"
39 # Before doing anything else, make sure we have an SBCL to install
40 if [ -f src
/runtime
/$RUNTIME ]; then
41 if [ -f output
/sbcl.core
]; then
44 echo "output/sbcl.core not found, aborting installation."
48 echo "src/runtime/$RUNTIME not found, aborting installation."
52 SBCL_HOME
="$INSTALL_ROOT"/lib
/sbcl
53 export SBCL_HOME INSTALL_ROOT
54 ensure_dirs
"$BUILD_ROOT$INSTALL_ROOT" "$BUILD_ROOT$INSTALL_ROOT"/bin \
55 "$BUILD_ROOT$INSTALL_ROOT"/lib \
56 "$BUILD_ROOT$MAN_DIR" "$BUILD_ROOT$MAN_DIR"/man1 \
57 "$BUILD_ROOT$INFO_DIR" "$BUILD_ROOT$DOC_DIR" \
58 "$BUILD_ROOT$DOC_DIR"/html \
59 "$BUILD_ROOT$SBCL_HOME" \
60 "$BUILD_ROOT$SBCL_HOME"/site-systems
62 # move old versions out of the way. Safer than copying: don't want to
63 # break any running instances that have these files mapped
64 test -f "$BUILD_ROOT$INSTALL_ROOT"/bin
/$RUNTIME && \
65 mv "$BUILD_ROOT$INSTALL_ROOT"/bin
/$RUNTIME \
66 "$BUILD_ROOT$INSTALL_ROOT"/bin
/$OLD_RUNTIME
67 test -f "$BUILD_ROOT$SBCL_HOME"/sbcl.core
&& \
68 mv "$BUILD_ROOT$SBCL_HOME"/sbcl.core
"$BUILD_ROOT$SBCL_HOME"/sbcl.core.old
70 cp src
/runtime
/$RUNTIME "$BUILD_ROOT$INSTALL_ROOT"/bin
/
71 cp output
/sbcl.core
"$BUILD_ROOT$SBCL_HOME"/sbcl.core
78 SBCL
="$SBCL_PWD/src/runtime/sbcl --noinform --core $SBCL_PWD/output/sbcl.core --no-userinit --no-sysinit --disable-debugger"
79 SBCL_BUILDING_CONTRIB
=1
80 export SBCL SBCL_BUILDING_CONTRIB
85 for i
in contrib
/*; do
86 test -d $i && test -f $i/test-passed ||
continue;
87 INSTALL_DIR
="$SBCL_HOME"/`basename $i `
89 ensure_dirs
"$BUILD_ROOT$INSTALL_DIR" && $GNUMAKE -C $i install
93 echo "SBCL has been installed:"
94 echo " binary $BUILD_ROOT$INSTALL_ROOT/bin/$RUNTIME"
95 echo " core and contribs in $BUILD_ROOT$INSTALL_ROOT/lib/sbcl/"
97 # Installing manual & misc bits of documentation
99 # Locations based on FHS 2.3.
100 # See: <http://www.pathname.com/fhs/pub/fhs-2.3.html>
102 # share/ architecture independent read-only things
103 # share/man/ manpages, should be the same as man/
104 # share/info/ info files
105 # share/doc/ misc documentation
108 echo "Documentation:"
111 cp doc
/sbcl
.1 "$BUILD_ROOT$MAN_DIR"/man
1/ && echo " man $BUILD_ROOT$MAN_DIR/man1/sbcl.1"
114 for info
in doc
/manual
/*.info
doc
/manual
/*.info-
*
116 cp $info "$BUILD_ROOT$INFO_DIR"/ \
117 && echo -n " info $BUILD_ROOT$INFO_DIR/`basename $info` $BUILD_ROOT$INFO_DIR/dir" \
118 && ( install-info
"$BUILD_ROOT$INFO_DIR"/`basename $info` "$BUILD_ROOT$INFO_DIR"/dir
> /dev
/null
2>&1 \
119 ||
echo -n " (could not add to system catalog)" ) \
124 for pdf
in doc
/manual
/*.pdf
126 cp $pdf "$BUILD_ROOT$DOC_DIR"/ \
127 && echo " pdf $BUILD_ROOT$DOC_DIR/`basename $pdf`"
131 for html
in doc
/manual
/sbcl
doc
/manual
/asdf
133 test -d $html && cp -R -L $html "$BUILD_ROOT$DOC_DIR"/html \
134 && echo " html $BUILD_ROOT$DOC_DIR/html/`basename $html`/index.html"
137 for f
in BUGS SUPPORT CREDITS COPYING NEWS
139 cp $f "$BUILD_ROOT$DOC_DIR"/