进行安装会导致重新编译
我正在编写一个主 makefile 来编译和安装多个基于 autoconf 的库,这些库相互依赖。第一次运行一切顺利。问题是:如果我单独处理这些库之一并执行“make && make install”前缀文件夹中的头文件将被覆盖(即使它们未受影响)。这会导致所有依赖库从头开始编译。
有没有办法在不侵入 makefile 的情况下避免不必要的重新编译?
I am writing a master makefile to compile and install multiple autoconf based libraries, which depend on each other. All works well for the first go. The issue is: if I am working on one of these libraries individually and do "make && make install" header files in the prefix folder are overwritten (even if they are untouched). This causes all dependent libraries to compile from scratch.
Is there a way to avoid the unnecessary recompiles without hacking into the makefiles?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
也许解决方案有点晚了,但
修复了重新编译问题。该标志使 GNU install 将已安装文件的时间戳设置为构建文件的时间戳。
Maybe the solution is a little late, but
fixes the recompilation problem. This flag makes GNU install set the timestamps of the installed files to the timestamps of the built files.
您可以使用仅存在的哨兵文件来建立依赖关系图。例如。
然后,仅当 libx-built 是新的时,您才需要进行依赖 liby 构建。
You could use sentinel files that exist only to establish your dependency graph. For eg.
Then, you'd make a dependent liby build only when libx-built is new.