]> git.pld-linux.org Git - packages/sbcl.git/blame - sbcl.sh
fix overriden CFLAGS; add CPPFLAGS and LDFLAGS
[packages/sbcl.git] / sbcl.sh
CommitLineData
294d3014
JB
1#!/bin/sh
2
3if [ ! -f /usr/share/common-lisp/source/common-lisp-controller/common-lisp-controller.lisp ] ; then
4 cat <<EOF
5OF
6$0: cannot find the common-lisp-controller source.
7EOF
8 exit 0
9fi
10
11build_error()
12{
13 echo "Build failure $1"
14 exit 1
15}
16
17if [ -f /etc/sbcl.rc ] ; then
18 RCFILE=/etc/sbcl.rc
19else
20 RCFILE=/dev/null
21fi
22
23case $1 in
24 install-clc)
25 echo $0 loading and dumping clc.
26 ( cd /usr/lib/sbcl
27 /usr/bin/sbcl \
54f94c02 28 --noinform --disable-ldb \
294d3014
JB
29 --core /usr/lib/sbcl/sbcl-dist.core \
30 --sysinit ${RCFILE} --no-userinit \
54f94c02 31 --load "/usr/lib/sbcl/install-clc.lisp" --non-interactive # 2> /dev/null
294d3014
JB
32 (mv sbcl-new.core sbcl.core && touch sbcl.core --reference=sbcl-dist.core ) || (echo FAILED ; cp -a sbcl-dist.core sbcl.core ) )
33 ;;
34 remove-clc)
35 echo $0 removing clc-enabled image
36 cp -a /usr/lib/sbcl/sbcl-dist.core /usr/lib/sbcl/sbcl.core
37 ;;
38 rebuild)
39 echo $0 rebuilding...
40 shift
41 echo rebuilding $1
42 /usr/bin/sbcl \
54f94c02 43 --noinform --disable-ldb \
294d3014
JB
44 --sysinit ${RCFILE} --no-userinit \
45 --eval \
46"(handler-case
47 (progn
48 (asdf:operate 'asdf:compile-op (quote $1))
54f94c02 49 (sb-sys:os-exit 0))
294d3014
JB
50 (error (e)
51 (ignore-errors (format t \"~&Build error: ~A~%\" e))
52 (finish-output)
54f94c02 53 (sb-sys:os-exit 1)))" --non-interactive || build_error
294d3014
JB
54 ;;
55 remove)
56 echo $0 removing packages...
57 shift
58 while [ ! -z "$1" ] ; do
59rm -rf "/var/cache/common-lisp-controller/*/sbcl/${1}"
60shift
61 done
62 ;;
63 *)
64 echo $0 unkown command $1
65 echo known commands: rebuild, remove, install-clc, and remove-clc
66 exit 1
67 ;;
68esac
69
70exit 0
This page took 0.113479 seconds and 4 git commands to generate.