From: Slava Akhmechet
Subject: Breaking up ASDF system definition
Date:
Message-ID: <87ir1vohdb.fsf@gmail.com>
Hello,
My asdf system definitions are getting quite large. I'd like to break
them up: perhaps define some modules separately and then insert
references to them in the main system definition. Is there already a way
to do this declaratively?
--
Regards,
Slava Akhmechet.
On Jan 15, 5:14 am, Slava Akhmechet <·········@gmail.com> wrote:
> Hello,
>
> My asdf system definitions are getting quite large. I'd like to break
> them up: perhaps define some modules separately and then insert
> references to them in the main system definition. Is there already a way
> to do this declaratively?
>
> --
> Regards,
> Slava Akhmechet.
MK:DEFSYSTEM has a facility for that.
You can write
(mk:defsystem "FOO"
:components ((:system "BAR")))
and if you have a subdirectory BAR with BAR.system in it, it will
DTRT. YMMV.
Cheers
--
Marco
Slava Akhmechet <·········@gmail.com> writes:
> Hello,
>
> My asdf system definitions are getting quite large. I'd like to break
> them up: perhaps define some modules separately and then insert
> references to them in the main system definition. Is there already a way
> to do this declaratively?
Well, I guess you could always split your code in several files, and
define a ... meta asd file to build the asd file. :-)
Now, serriously, why not split out these modules as independent
systems, each with its own asd file?
--
__Pascal Bourguignon__
From: Slava Akhmechet
Subject: Re: Breaking up ASDF system definition
Date:
Message-ID: <87k5mastvt.fsf@gmail.com>
···@informatimago.com (Pascal J. Bourguignon) writes:
> Now, serriously, why not split out these modules as independent
> systems, each with its own asd file?
Ok. I'd prefer not to break up a single system into multiple ones simply
because my defsystem code gets too wide, but the consensus seems to
point in this direction :)
--
Regards,
Slava Akhmechet.
Slava Akhmechet <·········@gmail.com> writes:
> ···@informatimago.com (Pascal J. Bourguignon) writes:
>
>> Now, serriously, why not split out these modules as independent
>> systems, each with its own asd file?
> Ok. I'd prefer not to break up a single system into multiple ones simply
> because my defsystem code gets too wide, but the consensus seems to
> point in this direction :)
However:
(ASDF:DEFSYSTEM :COM.INFORMATIMAGO.COMMON-LISP
:DESCRIPTION "This ASDF system gathers all the COM.INFORMATIMAGO.COMMON-LISP packages."
:VERSION "1.0.197" :AUTHOR "Pascal Bourguignon" :LICENCE "GPL"
:DEPENDS-ON #.(with-open-file (stream "depend.asdm") (read stream))
:COMPONENTS #.(with-open-file (stream "compos.asdm") (read stream)))
could work, if asdf doesn't bind *read-eval* to nil.
--
__Pascal Bourguignon__ http://www.informatimago.com/
THIS IS A 100% MATTER PRODUCT: In the unlikely event that this
merchandise should contact antimatter in any form, a catastrophic
explosion will result.
From: Slava Akhmechet
Subject: Re: Breaking up ASDF system definition
Date:
Message-ID: <87d4s2siz9.fsf@gmail.com>
Slava Akhmechet wrote:
> Hello,
>
> My asdf system definitions are getting quite large. I'd like to break
> them up: perhaps define some modules separately and then insert
> references to them in the main system definition. Is there already a way
> to do this declaratively?
Yes. Just list all your systems in asdf:*central-registry* and use :depends-on
in defsystem.
Example from my sources:
(defsystem :crm
:name "CRM"
:author "Andreas Thiele <·······@atp-media.de>"
:version "1.0"
:depends-on (:tools :odbc-lw :erd :tapi :rpc)
:components ((:file "package")
(:file "login" :depends-on ("package"))
(:file "database" :depends-on ("package")) ...
Andreas