(no subject)
Cyrus Harmon <[email protected]>
| Newsgroups | gmane.lisp.cclan.general |
|---|---|
| Message-ID | <[email protected]> |
I'm new to the cclan list, so I'm not sure how much folks discuss asdf issues here, but assuming this is the right place, bear with me while I set up the problem for a moment: So I'm trying to package up some C code to use as a test for gcc-xml-ffi. I have some C code that I'd like to use to generate a shared library, which will then be loaded by SBCL at runtime. To do this I can 1) hand-code the Makefile rules with the approrpriate platform-specific compiler/linker incantations to get the shared library, 2) use autotools, or 3) try to rig up some sort of asdf-based system to do this. I've done 1 for darwin and got 2 to work, but I wasn't super happy with distributing this giant mess of m4 files just to compile some shared libraries, so I decided to explore 3. Actually, as I was considering this, I decided that I also wanted to use asdf to invoke gccxml to generate the xml for gcc-xml-ffi. So far so good. SBCL has examples of how to do this in sb-posix (and somewhere else, IIRC this is a violation of OAOO, but let's put that aside for the moment. But I've run into a couple issues: * asdf perform methods specialize on operation and component, but not on the system. This means that if you define a method to compile C files for compile-op and c-source-file it will be applied to all c- source-files. This might not be desired. Clearly one can work around this by subclassing c-source-file, but that seems a bit silly. having a way to provide per-module or per-system operations seems like a good thing. Perhaps there is a way, but I'm missing on obviously good way to do this. * cross-module dependencies. I'd like to declare multiple module with subcomponents like module foo with some c-header-files and c-source- files. Then I'd like for components in module bar to depend on, say, one of the c-header-files in module foo. I can't seem to figure out how to do this. The :depends-on arg as it currently exists seems 1) very lisp specific and 2) limited to dependencies within a particular component. I can't, for instance, say that a particular file depends on another system. I can only do system level dependencies for a system. Or at least I can't figure out how to do them. This isn't actually what I want to do, but I think it illustrates an example of the problem. In my case, what I want is for a source file in module bar to depend on a header file in module foo. This works as is in the sense that if a header file in module foo is changed, foo itself is recompiled, but in this case I want to trigger a recmopile of bar as well. Clearly, asdf is an extensible system and through the right extensions I can make this work, but if anyone has any suggestions or comments on how to address these issues, I'd appreciate it. Thanks, Cyrus ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf