4 # Install SBCL files into the usual places.
9 test -d "$j" || mkdir
-p "$j"
14 DEFAULT_INSTALL_ROOT
=$SBCL_PREFIX
16 if [ "$OSTYPE" = "cygwin" -o "$OSTYPE" = "msys" ] ; then
18 OLD_RUNTIME
=sbcl.exe.old
23 INSTALL_ROOT
=${INSTALL_ROOT-$DEFAULT_INSTALL_ROOT}
24 MAN_DIR
=${MAN_DIR-"$INSTALL_ROOT"/share/man}
25 INFO_DIR
=${INFO_DIR-"$INSTALL_ROOT"/share/info}
26 DOC_DIR
=${DOC_DIR-"$INSTALL_ROOT"/share/doc/sbcl}
28 # Does the environment look sane?
29 if [ -n "$SBCL_HOME" -a "$INSTALL_ROOT/lib/sbcl" != "$SBCL_HOME" ];then
30 echo SBCL_HOME environment variable is
set, and conflicts with INSTALL_ROOT.
31 echo Aborting installation. Unset one or
reset the other
, then try again
32 echo INSTALL_ROOT
="$INSTALL_ROOT"
33 echo SBCL_HOME
="$SBCL_HOME"
37 # Before doing anything else, make sure we have an SBCL to install
38 if [ -f src
/runtime
/$RUNTIME ]; then
39 if [ -f output
/sbcl.core
]; then
42 echo "output/sbcl.core not found, aborting installation."
46 echo "src/runtime/$RUNTIME not found, aborting installation."
50 SBCL_HOME
="$INSTALL_ROOT"/lib
/sbcl
51 export SBCL_HOME INSTALL_ROOT
52 ensure_dirs
"$BUILD_ROOT$INSTALL_ROOT" "$BUILD_ROOT$INSTALL_ROOT"/bin \
53 "$BUILD_ROOT$INSTALL_ROOT"/lib \
54 "$BUILD_ROOT$MAN_DIR" "$BUILD_ROOT$MAN_DIR"/man1 \
55 "$BUILD_ROOT$INFO_DIR" "$BUILD_ROOT$DOC_DIR" \
56 "$BUILD_ROOT$DOC_DIR"/html \
57 "$BUILD_ROOT$SBCL_HOME" \
58 "$BUILD_ROOT$SBCL_HOME"/site-systems
60 # move old versions out of the way. Safer than copying: don't want to
61 # break any running instances that have these files mapped
62 test -f "$BUILD_ROOT$INSTALL_ROOT"/bin
/$RUNTIME && \
63 mv "$BUILD_ROOT$INSTALL_ROOT"/bin
/$RUNTIME \
64 "$BUILD_ROOT$INSTALL_ROOT"/bin
/$OLD_RUNTIME
65 test -f "$BUILD_ROOT$SBCL_HOME"/sbcl.core
&& \
66 mv "$BUILD_ROOT$SBCL_HOME"/sbcl.core
"$BUILD_ROOT$SBCL_HOME"/sbcl.core.old
68 cp src
/runtime
/$RUNTIME "$BUILD_ROOT$INSTALL_ROOT"/bin
/
69 cp output
/sbcl.core
"$BUILD_ROOT$SBCL_HOME"/sbcl.core
76 SBCL
="$SBCL_PWD/src/runtime/sbcl --noinform --core $SBCL_PWD/output/sbcl.core --no-userinit --no-sysinit --disable-debugger"
77 SBCL_BUILDING_CONTRIB
=1
78 export SBCL SBCL_BUILDING_CONTRIB SBCL_PWD
83 for i
in `cd obj/asdf-cache ; echo *`; do
84 test -d obj
/asdf-cache
/$i && test -f obj
/asdf-cache
/$i/test-passed.test-report ||
continue;
85 INSTALL_DIR
="$SBCL_HOME/contrib/"
87 ensure_dirs
"$BUILD_ROOT$INSTALL_DIR" && $GNUMAKE -C contrib
/$i install < /dev
/null
91 echo "SBCL has been installed:"
92 echo " binary $BUILD_ROOT$INSTALL_ROOT/bin/$RUNTIME"
93 echo " core and contribs in $BUILD_ROOT$INSTALL_ROOT/lib/sbcl/"
95 # Installing manual & misc bits of documentation
97 # Locations based on FHS 2.3.
98 # See: <http://www.pathname.com/fhs/pub/fhs-2.3.html>
100 # share/ architecture independent read-only things
101 # share/man/ manpages, should be the same as man/
102 # share/info/ info files
103 # share/doc/ misc documentation
106 echo "Documentation:"
109 cp doc
/sbcl
.1 "$BUILD_ROOT$MAN_DIR"/man
1/ && echo " man $BUILD_ROOT$MAN_DIR/man1/sbcl.1"
112 for info
in doc
/manual
/*.info
114 cp $info "$BUILD_ROOT$INFO_DIR"/ \
115 && BN
=`basename $info` \
116 && DIRFAIL
=`install-info --info-dir="$BUILD_ROOT$INFO_DIR" \
117 "$BUILD_ROOT$INFO_DIR"/$BN > /dev/null 2>&1 \
118 || echo "(could not add to system catalog)"` \
119 && echo " info $BUILD_ROOT$INFO_DIR/`basename $info` [$BUILD_ROOT$INFO_DIR/dir] $DIRFAIL"
122 for info
in doc
/manual
/*.info-
*
124 cp $info "$BUILD_ROOT$INFO_DIR"/ \
125 && echo " info $BUILD_ROOT$INFO_DIR/`basename $info`"
129 for pdf
in doc
/manual
/*.pdf
131 cp $pdf "$BUILD_ROOT$DOC_DIR"/ \
132 && echo " pdf $BUILD_ROOT$DOC_DIR/`basename $pdf`"
136 for html
in doc
/manual
/sbcl
doc
/manual
/asdf
138 test -d $html && cp -R -L $html "$BUILD_ROOT$DOC_DIR"/html \
139 && echo " html $BUILD_ROOT$DOC_DIR/html/`basename $html`/index.html"
142 for html
in doc
/manual
/sbcl.html
doc
/manual
/asdf.html
144 cp $html "$BUILD_ROOT$DOC_DIR"/ \
145 && echo " html $BUILD_ROOT$DOC_DIR/`basename $html`"
148 for f
in BUGS CREDITS COPYING NEWS
150 cp $f "$BUILD_ROOT$DOC_DIR"/