如何将目录中的所有文件列为ASDF Defsystem静态文件
来自如何指定其他文件作为导致ASDF重新编译程序的先决条件,我了解到ASDF static-File
指令可用于列出常见LISP程序所依赖的非LISP文件。例如:
(defsystem "myprog"
:components ((:static-file "1.txt")
(:static-file "2.txt")
(:file "myprog" :depends-on ("1.txt" "2.txt"))))
这要求程序员明确列出静态文件。如果有许多静态文件,并且所有文件都位于目录及其子目录中,则手工列出所有静态文件可能会变得不切实际。 ASDF是否可以将目录中的所有文件及其子目录中的所有文件视为静态文件?
From How to specify additional files as prerequisites that would cause ASDF to recompile the program, I learned that the ASDF static-file
directive can be used to list non-Lisp files that a Common Lisp program depends on. For example:
(defsystem "myprog"
:components ((:static-file "1.txt")
(:static-file "2.txt")
(:file "myprog" :depends-on ("1.txt" "2.txt"))))
This requires the programmer to explicitly list out the static files. If there are many static files, and all of them reside in a directory and its sub-directories, it may become impractical to list out all the static files by hand. Is there a way for ASDF to consider all the files in a directory and its sub-directories as static files?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
实际上,您只能使用相同的
:static-file
“指令”来指示对某些目录中文件的依赖性。或更确切地说,目录本身的存在(可能是其中一些文件)。从理论上讲,您可以添加一个单独的:static-dir
依赖项类,并带有一些特殊的处理。但是问题是,这种特殊的处理将构成什么?如果您不想手动指定确切的文件列表(可以使用(:module“ dir”:组件:(((:static-file“ file1”))...)))您还需要其他哪些其他处理?
In fact, you can just use the same
:static-file
"directive" to indicate a dependency on the files in some directory. Or rather the presence of the directory itself (possibly, with some files in it). Theoretically, you could add a separate:static-dir
dependency class with some special processing. But the question is what will this special processing constitute? If you don't want to manually specify an exact list of files (which can already be done with(:module "dir" :components ((:static-file "file1") ...))
) what other additional processing do you want for this dependency class?