Rob*_*n B 6 lisp compilation asdf ecl
我有以下包定义.如何递归编译所有组件,以及它们与C源的依赖关系?换句话说,我想保留构建本机可执行文件的所有 C文件.
目前,我使用(asdf:make-build :example但不会留下任何C文件.
我期待着看到
simple.c
simple.h
simple.data
cl-opengl.c
cl-opengl.h
...
Run Code Online (Sandbox Code Playgroud)
example.asd:
(defsystem :example
:depends-on (:cl-opengl :cl-glu :cl-glut)
:serial t
:components ((:file "simple")))
Run Code Online (Sandbox Code Playgroud)
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"))
...
Run Code Online (Sandbox Code Playgroud)
如ECL邮件列表中所述,将c ::*delete-files*设置为NIL将阻止编译器删除中间C文件.它们有扩展*.c,*.eclh(标题)和*.data(对象的文本定义),但它们的名称由ASDF进行按摩(它们得到一些ASDF-前缀IIRC)并且它们不会在lisp源生存的地方创建,而是在ASDF的缓存目录中(通常为〜/ .cache/common-lisp/ecl -...)