7

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

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

我期待看到

simple.c
simple.h
simple.data
cl-opengl.c
cl-opengl.h
...

示例.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"))
     ...
4

1 回答 1

9

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

于 2013-03-02T10:48:37.510 回答