0.pre7.31:
[sbcl.git] / slam.sh
1 #!/bin/sh
2
3 # ("smooth duct tape: the mark of a true craftsman":-)
4
5 # a quick and dirty way of partially rebuilding the system after a
6 # change
7 #
8 # This script is not a reliable way to build the system, but it is
9 # fast.:-| It can be useful if you are trying to debug a low-level
10 # problem, e.g. a problem in src/runtime/*.c or in
11 # src/code/cold-init.lisp, and you find yourself wanting to make a
12 # small change and test it without going through the entire
13 # build-the-system-from-scratch cycle.
14 #
15 # You probably don't want to be using this script unless you
16 # understand the system build process well enough to be able to guess
17 # when it won't work.
18
19 # This software is part of the SBCL system. See the README file for
20 # more information.
21 #
22 # This software is derived from the CMU CL system, which was
23 # written at Carnegie Mellon University and released into the
24 # public domain. The software is in the public domain and is
25 # provided with absolutely no warranty. See the COPYING and CREDITS
26 # files for more information.
27
28 if [ "" != "$*" ]; then
29     echo no command line arguments supported in this version of slam
30     exit 1
31 fi
32
33 # We don't try to be general about this in this script the way we are
34 # in make.sh, since the idiosyncrasies of SBCL command line argument
35 # order dependence, the meaninglessness of duplicate --core arguments,
36 # and the SBCL-vs-CMUCL dependence of --core/-core argument syntax
37 # make it too messy to try deal with arbitrary SBCL_XC_HOST variants.
38 # So you have no choice:
39 export SBCL_XC_HOST='sbcl --noprogrammer'
40
41 # (We don't do make-host-1.sh at all. Hopefully nothing relevant has
42 # changed.)
43
44 sh make-target-1.sh || exit 1
45
46 # Instead of doing the full make-host-2.sh, we (1) use after-xc.core
47 # to rebuild only obviously-out-of-date Lisp files, then (2) run
48 # GENESIS.
49 sbcl --core output/after-xc.core --sysinit /dev/null --userinit /dev/null <<'EOF' || exit 1
50   (load "src/cold/slam.lisp")
51 EOF
52 # (This ^ used to be
53 #   for f in $*; do echo "(target-compile-stem \"$f\")"; done \
54 #     | sbcl --core output/after-xc.core || exit 1
55 # and perhaps we do something like this again, allowing explicit
56 # rebuild-this-stem requests on the command line to supplement
57 # the rebuild-obviously-outdated-stems logic above.)
58 #
59 sh make-genesis-2.sh || exit 1 
60
61 sh make-target-2.sh || exit 1
62
63 echo /ordinary termination of slam.sh