我们可以列出“make”使用的所有 *.[c,h,S] 文件吗?构建linux内核的命令?
内核源代码中有很多文件大部分时候都没有被使用。我只想列出发出 make 命令时编译的文件。
我认为只有那些将要编译的文件才会在 make 期间被访问,因此,我尝试了以下命令:
找到 . -type f -name *.[chS] -anewer Makefile
但我发现许多不属于所需架构的文件也被访问。请建议一种方法,我可以在其中列出这些文件名及其来自内核源顶级目录的路径。
There are a lot of files in the kernel source that are not used most of the times. I wanted to list out only the files that are compiled when I issue a make command.
I thought that only those files that will be compiled are accessed during a make and hence, I tried the following command :
find . -type f -name *.[chS] -anewer Makefile
But I found that many files that are not a part of the required architecture are also being accessed. Please suggest a method in which I could list those filenames along with their path form the kernel source top directory.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试
make cscope
,然后查看cscope.files
纯文本文件中的文件列表。您需要在系统上安装 cscope 工具。Try
make cscope
and then check out the file list in thecscope.files
plaintext file. You need the cscope tool installed on your system.