加速大型项目的自动配置/配置
我有一个大型 autoconf/automake 项目,使用 AC_CONFIG_SUBDIRS 分成多个组件。有什么方法可以让 autoconf/configure 运行得更快吗?也许并行执行子目录,或者缓存可重用的结果?
我可以轻松编写一个构建脚本来并行构建组件,但宁愿不添加构建结构维护的次要点。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用以下方法在多个
configure
(同一configure
的多次运行,或递归子configure
)之间缓存结果 配置缓存功能。只需运行即可。但是,您应该记住在系统配置更改时删除缓存(例如安装先前配置运行未找到的新软件包后)。如果您使用一些第三方宏,您可能还需要将其中一些宏修复为 正确缓存其结果(一个常见的错误是在测试期间做出一些配置决策,如果缓存了该测试的结果,则可能会跳过该配置决策)。
如果您想在多个项目之间共享缓存,可以在
config.site
。You can cache results between multiple
configure
(several runs of the sameconfigure
, or recursive sub-configure
) using the configure cache feature. Simply runHowever you should remember to delete the cache when your system's configuration changes (like after installing new packages that were not found by a previous configure run). If you use some third-party macros, you may also have to fix some of them to cache their results properly (a common error is to make some configuration decision during a test that might be skipped if the result of that test is cached).
If you want to share your cache between multiple projects, you can set it up in
config.site
.我正在考虑一个并行配置,它可以并行执行检查,从而充分利用主机的多核。 autoconf 可能应该生成 bash 脚本,该脚本可以矢量化/管道化以使其成为可能。
I'm thinking of a parallel configure which does the checks in parallel making best use of the multicore of the host. Probably the autoconf should generate bash script which can be vectorized/pipelined to make it possible.