[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

compile-time macro dependencies



    Date: Mon, 4 Nov 91 14:33:53 CST
    From: engber@aristotle.ils.nwu.edu (Mike Engber)

    I have a lot of files that require macros from other files to compile
    correctly. Right now, I'm wrapping all my requires in an eval-when so
    things work.

    I'm not totally happy with this. At compile time I only need the macros,
    not the whole file loaded. Does anyone have any clever conventions for
    dealing with this issue. (I have similar problems with defconstant)

    Do you keep defmacros (& defconstants) in separate files from defuns?
    This could become rather cumbersome.

This is indeed the usual convention.  For small-to-middling size
programs, you generally need only a single "defs.lisp" file.

This also gives you a speed-of-compilation advantage over other
techniques, since the macros will be compiled & load quickly.
Of course, if there are support functions that your macros need,
these should be in the defs file with the macros.