ECL - 为每个编译单元及其依赖项转储c源?

时间:2013-03-01 17:57:34

标签: compilation lisp asdf ecl

我有以下包装定义。如何递归编译所有组件, 以及它们的依赖 到C源?换句话说,我想保留构建本机可执行文件的所有 C文件。

目前,我使用(asdf:make-build :example,但不会留下任何C文件。

我期待看到

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"))
     ...

1 个答案:

答案 0 :(得分:7)

如ECL邮件列表中所述,将c :: * delete-files *设置为NIL将阻止编译器删除中间C文件。它们有扩展名* .c,* .eclh(标题)和* .data(对象的文本定义),但它们的名称由ASDF进行按摩(它们得到一些ASDF-前缀IIRC)并且它们不会在lisp源生存的地方创建,而是在ASDF的缓存目录中(通常是〜/ .cache / common-lisp / ecl -...)

相关问题