3 # a quick and dirty way of partially rebuilding the system after a
6 # ("smooth duct tape: the mark of a true craftsman":-)
8 # This software is part of the SBCL system. See the README file for
11 # This software is derived from the CMU CL system, which was
12 # written at Carnegie Mellon University and released into the
13 # public domain. The software is in the public domain and is
14 # provided with absolutely no warranty. See the COPYING and CREDITS
15 # files for more information.
17 #######################################################################
18 # You probably don't want to be using this script unless you
19 # understand the ordinary system build process pretty well already.
21 # This script is not a reliable way to build the system, but it is
22 # fast.:-| It can be useful if you are trying to debug a low-level
23 # problem, e.g. a problem in src/runtime/*.c or in
24 # src/code/cold-init.lisp. Soon, you'll find yourself wanting to
25 # test a small change in a file compiled into cold-sbcl.core without
26 # redoing the entire rebuild-the-system-from-scratch process. You may be
27 # able to avoid a complete make-host-2.sh by just letting this script
28 # rebuild only files that have changed. On the other hand, it might
31 # It's not anywhere rigorously correct for all small changes, much
32 # less for all large changes. It can't be, unless we either solve the
33 # halting problem or totally rearchitect the SBCL sources to support
34 # incremental recompilation. Beyond that fundamental limitation, even
35 # an easy special case might not work unless someone's paid attention
36 # to making it work. Here are some highlights to help you understand
38 # * It will rebuild a .fasl file when the corresponding
39 # .lisp file is out of date.
40 # * It rebuilds the src/runtime/ files completely, since that
41 # doesn't take very long anyway.
42 # * Apparently it will not rebuild assembly-code-in-.lisp files
43 # even when the sources are out of date. This is probably not a
44 # fundamental limitation, it's just that I (WHN 2002-01-16)
45 # have made vanishingly nontrivial changes to assembler files,
46 # so I'm not motivated. If you're motivated, please send a patch.
47 # * It will not notice when you change something in one .lisp file
48 # which should affect the compilation of code in another .lisp
50 # ** changing the definition of a macro used in another file (or a
51 # function or a variable which is used at macroexpansion time)
52 # ** changing the value of a DEFCONSTANT used in another file
53 # ** changing the layout of a structure used in another file
54 # ** changing the PROCLAIMed type of something used in another
56 # Mostly it looks as though such limitations aren't fixable without
57 # the aforementioned rearchitecting or solving the halting problem.
59 # To make this work, you need an after-xc.core file. To cause the
60 # system to generate an after-xc.core file, you need
61 # :SB-AFTER-XC-CORE in target features during an ordinary build.
62 # See the comments in base-target-features.lisp-expr for the
63 # recommended way to make that happen.
64 #######################################################################
66 if [ "" != "$*" ]; then
67 echo no
command line arguments supported
in this version of slam
71 # We don't try to be general about this in this script the way we are
72 # in make.sh, since the idiosyncrasies of SBCL command line argument
73 # order dependence, the meaninglessness of duplicate --core arguments,
74 # and the SBCL-vs-CMUCL dependence of --core/-core argument syntax
75 # make it too messy to try deal with arbitrary SBCL_XC_HOST variants.
76 # So you have no choice:
77 export SBCL_XC_HOST
='sbcl --disable-debugger'
79 # (We don't do make-host-1.sh at all. Hopefully nothing relevant has
82 sh make-target-1.sh ||
exit 1
84 # Instead of doing the full make-host-2.sh, we (1) use after-xc.core
85 # to rebuild only obviously-out-of-date Lisp files, then (2) run
87 sbcl
--core output
/after-xc.core
--sysinit /dev
/null
--userinit /dev
/null
<<'EOF' || exit 1
88 (load "src/cold/slam.lisp")
91 # for f in $*; do echo "(target-compile-stem \"$f\")"; done \
92 # | sbcl --core output/after-xc.core || exit 1
93 # and perhaps we do something like this again, allowing explicit
94 # rebuild-this-stem requests on the command line to supplement
95 # the rebuild-obviously-outdated-stems logic above.)
97 sh make-genesis-2.sh ||
exit 1
99 sh make-target-2.sh ||
exit 1
101 echo //ordinary termination of slam.sh