I have the following package definition. How do I compile all the components recursively, as well as their dependencies to C source? In other words, I want to preserve all C files that go into building the native executable.
Currently, i use (asdf:make-build :example
but that doesnt leave any C files around.
I'm expecting to see
simple.c
simple.h
simple.data
cl-opengl.c
cl-opengl.h
...
example.asd:
(defsystem :example
:depends-on (:cl-opengl :cl-glu :cl-glut)
:serial t
:components ((:file "simple")))
cl-opengl.asd:
(defsystem cl-opengl
:description "Common Lisp bindings to OpenGL."
:depends-on (cffi alexandria)
:components
((:module "gl"
:components
((:file "bindings-package")
(:file "constants" :depends-on ("bindings-package"))
(:file "library" :depends-on ("bindings-package"))
(:file "bindings" :depends-on ("bindings-package" "constants" "library"))
...
As explained in the ECL mailing list, setting c::*delete-files* to NIL will prevent the compiler from deleting the intermediate C files. They have extensions *.c, *.eclh (header) and *.data (text definitions of objects), but their names are massaged by ASDF (they get some ASDF- prefix IIRC) and they are not created where the lisp sources live, but rather at ASDF's cache directory (typically ~/.cache/common-lisp/ecl-...)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With