0.6.12.37;
[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 (1) we use our command line args as names of files
35 # to recompile, and (2) the idiosyncrasies of SBCL command line
36 # argument order dependence, the meaninglessness of duplicate --core
37 # arguments, and the SBCL-vs-CMUCL dependence of --core/-core argument
38 # syntax make it too messy to try deal with arbitrary SBCL commands.
39 # So you have no choice:
40 export SBCL_XC_HOST='sbcl --noprogrammer'
41
42 # (We don't do make-host-1.sh at all. Hopefully nothing relevant has
43 # changed.)
44
45 sh make-target-1.sh || exit 1
46
47 # Instead of doing the full make-host-2.sh, we (1) use after-xc.core
48 # to rebuild only obviously-out-of-date Lisp files, then (2) run
49 # GENESIS.
50 sbcl --core output/after-xc.core <<'EOF' || exit 1
51   (load "src/cold/slam.lisp")
52 EOF
53 # (This ^ used to be
54 #   for f in $*; do echo "(target-compile-stem \"$f\")"; done \
55 #     | sbcl --core output/after-xc.core || exit 1
56 # and perhaps we do something like this again, allowing explicit
57 # rebuild-this-stem requests on the command line to supplement
58 # the rebuild-obviously-outdated-stems logic above.)
59 #
60 sh make-genesis-2.sh || exit 1 
61
62 sh make-target-2.sh || exit 1
63
64 echo /ordinary termination of slam.sh