defsystem
I'm using defsystem for the first time to clean up and describe a largish
project. Evidence suggests that I'm not describing the dependencies
correctly (i.e. I get unbound errors for variables that should have been
loaded before something else). I suspect that I'm rtfm'ing through
makefile-coloured eyes and am missing something obvious.
My problem in the small: 5 .lisp files. Macro.lisp contains a simple macro
for defining constants. Const.lisp and Opcodes.lisp use this macro to
define constants. Emit.lisp and assemble.lisp use the constants, i.e.
1) compile and load macro
2) then, compile and load const and opcodes
3) then, compile and load emit and assemble.
My description below works if I blow away all of the .fsl files, but didn't
appear to work when I'd made a typo and then did a minimum recompile
(unbound variables at runtime). I tried to trick defsys into causing a
full recompile by editing "macro.lisp" (1), but the problem persisted until
I blew away the .fsl files again.
(defmacro subdir (s) (concatenate 'string *path* s))
....
(defsystem bytecoder (:default-pathname (subdir "bytecoder"))
:members ("macro" "const" "opcodes" "emit" "assemble")
:rules ((:in-order-to :compile ("const" "opcodes")
(:requires (:load "macro"))
(:caused-by (:compile "macro")))
(:in-order-to :compile ("emit" "assemble")
(:requires (:load "macro" "const" "opcodes"))
(:caused-by (:compile "const" "opcodes")))))
thanx for any suggestions
pt