[Ecls-list] cl-launch and ECL

Goffioul Michael goffioul at imec.be
Tue Aug 8 08:21:46 UTC 2006


> Yes thanks a lot, I had seen this after Juanjo told me to see 
> the sources.
> 
> Some additional questions:
> A cl-launch program is currently defined through a file (to 
> be used as preamble), a system name (to be asdf:load-op'ed) 
> and some forms to be evaluated, all components being 
> optional. What is the natural/recommended way to aggregate 
> them all into an image/fasl/library? Here are some issues:
> * I could define one system for the preamble, one system for 
> the evaluation forms, and one target system for make-build to 
> depend on the previous as well as the user-specified system. 
> However, I'm suspect that this defeats one of the main uses 
> of the preamble, which is to include proclaim'ations and 
> other global definitions that are meant to customize the 
> compilation process by ASDF. Can you tell me the right thing 
> to do here? Maybe dump three fasls, for each of the preamble, 
> the system and the initforms?

Here, I don't have a clear view of what you're doing, so I
can't help.

> * What is the correct way to tell make-build where I would 
> like it to dump a file? Through the :pathname argument of the 
> target defsystem?

I guess so. See asdf-ecl.lisp for MAKE-BUILD implementation, it's
quite simple (and probably buggy).

> * I wonder what is the correct way to compile the initforms 
> into the image. I'd guess that I need to create and compile a 
> temporary lisp file in /tmp. Does ECL include mechanisms for 
> safe race-condition-free creation of temporary files?

You can control the epilogue code in C::BUILDER function through
the :EPILOGUE-CODE keyword. This argument can also be used in all
C::BUILD-XXX functions as well as in ASDF:MAKE-BUILD through the
:ARGS keyword as in:

(ASDF:MAKE-BUILD :mysystem :type :fasl :args '(:epilogue-code
(my-init-fun)))

Using the epilogue code, you can dump your initforms in the image.

Michael.




More information about the ecl-devel mailing list