Re: defsystem optionally loaded subsystem

"Liam M. Healy" <[email protected]>
Newsgroups gmane.lisp.clocc.devel
Message-ID <[email protected]>
>>>>> "Marco" == Marco Antoniotti <[email protected]> writes:

    >> From: "Liam M. Healy" <[email protected]>

    >> In one of my systems, I have a few files whose definitions are
    >> infrequently used and that are time-consuming to load.  I would like
    >> to make them optionally load under defsystem-3.x:  they would compile
    >> with the rest of the system, but would only be loaded with an explicit
    >> command.  I do not want to make them a separate system because I want
    >> to keep them associated with this system.  Is there a way to do this
    >> easily in the defsystem structure?

    Marco> The way I do it is the group these files into a separate :module with
    Marco> no (or only few) dependencies.

    Marco> This way you get compilation and loading of these files only at
    Marco> specific times.  E.g.

    Marco> 	 (mk:defsystem "FOO"
    Marco>               :components ("base"
    Marco>                            (:module "load-sparingly"
    Marco>                                     :source-pathname "where/they/are/"
    Marco>                                     :components ("f1" "f2"))
    Marco>                            (:file "x"
    Marco>                                   :depends-on ("base" "load-sparingly"))))

    Marco> ... I think you get the idea.

Actually, I don't get the idea.  This looks like an ordinary system
definition with three pieces, "base", "load-sparingly" and "x", that
will load when the system loads.  How do you prevent the automatic
loading of a piece, "load-sparingly" presumably?  How do you trigger
its loading manually?  

Liam


-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T 
handheld. Power & Color in a compact size! 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.