[ Home ]
SBCL Internals

The pages on this CLiki-driven site can be edited by anybody at any time. No warranty of any kind can therefore be made; any implied warranties of merchantability or fitness for a particular purpose are expressly disclaimed
[ Home ] [ Recent Changes ] [ About CLiki ] [ Text Formatting ]

Rebuilding the system takes a long time. slam.sh tries to do it faster, by being clever about dependencies like the familiar "make" program is. But slam.sh can't (anywhere nearly) always get it right. See the documentation in the script for more details - if you don't have a sufficiently recent SBCL checked out, you can look at the cvsweb on sourceforge

Something did occur to me today, which was: why don't we have a semi-slam.sh kind of thing, which does the same kind of processing to find which .lisp files are newer than the fasls, finds the first one of those in build-order.lisp (ex--stems-and-flags.lisp), and recompiles everything from that one to the end? This might save some time in some cases which would otherwise go through a whole make-host-2 process. I could be missing something, of course. -- Christophe Rhodes

Something like

(do-stems-and-flags (stem flags)
  (unless (position :not-target flags)
    (let ((srcname (concatenate 'string stem ".lisp"))
          (objname (concatenate 'string
                                *target-obj-prefix*
                                stem
                                *target-obj-suffix*)))
      (let ((after-first-required-recompilation nil))
        (unless (or (output-up-to-date-wrt-input-p objname srcname)
                    after-first-required-recompilation)
          (unless after-first-required-recompilations
            (setf after-first-required-recompilation t))
          (target-compile-stem stem)))))

WHN: I do something like that to rebuild my Go-playing program, although it's implemented rather differently (with repeated calls to a load-and-possibly-compile function, and has-anything-changed-earlier information passed around in a global flag). It works OK, saving some time, and reliably getting things right. However, because of the two-pass structure of rebuilding SBCL, I don't know how to preserve the "reliably gets things right" property very well without breaking the "saves significant time" property, so I haven't tried to make such a script. What I tend to do instead, when I'm impatient and there's a change that I understand but slam.sh doesn't, is run after-xc.core interactively, then use it to recompile the appropriate files by hand. YMMV, of course, and if you implement this or some other alternative to slam, and it looks as though others might find it useful, I'd be happy to include it in the distribution.


This page is linked from: Build   sourceforge  

CLiki pages can be edited by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively