如何在大项目中自动提取小项目所依赖的所有源代码和头文件?
小项目是在大项目中进行的。可以用make
编译的小项目只使用了这个大项目的一小部分文件。有没有什么工具可以自动提取这个小项目所依赖的所有源代码和头文件?手动挑选当然可行,但效率低下且容易出错,因为 Makefile
非常复杂且嵌套很深。现代IDE通常会构建索引,我不知道是否有IDE提供提取所有依赖项的这种功能。
我最终使用 Process Monitor 工具来跟踪和过滤 Windows 上构建系统的所有 OpenFile 系统调用,然后导出报告并编写脚本来复制文件。但这样的做法不太优雅>_<
A small project is in a big project. The small project that can be compiled with make
only uses a small part of the files of this big project. Are there any tools that can automatically extract all the source code and header files that this small project depends on? Manually picking is definitely feasible, but it is inefficient and error-prone since the Makefile
s are complex and deeply-nested. Modern IDEs usually build indexes, and I don't know if any IDEs provide this feature of extracting all dependencies.
I ended up using the Process Monitor
tool to track and filter all the OpenFile
system calls of the build system on Windows, then exported the report and wrote a script to copy the files. But such an approach is not so elegant >_<
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论