加速大型项目的自动配置/配置

发布于 2024-11-19 22:16:04 字数 166 浏览 7 评论 0 原文

我有一个大型 autoconf/automake 项目,使用 AC_CONFIG_SUBDIRS 分成多个组件。有什么方法可以让 autoconf/configure 运行得更快吗?也许并行执行子目录,或者缓存可重用的结果?

我可以轻松编写一个构建脚本来并行构建组件,但宁愿不添加构建结构维护的次要点。

I have a large autoconf/automake project, broken into components using AC_CONFIG_SUBDIRS. Is there any way to make autoconf/configure run faster? Perhaps doing subdirs in parallel, or caching reusable findings?

I could easily write a build script that would build components in parallel, but would prefer to not add a secondary point of build structure maintainance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

临走之时 2024-11-26 22:16:04

您可以使用以下方法在多个configure(同一configure的多次运行,或递归子configure)之间缓存结果 配置缓存功能。只需运行即可

./configure -C

。但是,您应该记住在系统配置更改时删除缓存(例如安装先前配置运行未找到的新软件包后)。如果您使用一些第三方宏,您可能还需要将其中一些宏修复为 正确缓存其结果(一个常见的错误是在测试期间做出一些配置决策,如果缓存了该测试的结果,则可能会跳过该配置决策)。

如果您想在多个项目之间共享缓存,可以在 config.site

You can cache results between multiple configure (several runs of the same configure, or recursive sub-configure) using the configure cache feature. Simply run

./configure -C

However 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.

提笔书几行 2024-11-26 22:16:04

我正在考虑一个并行配置,它可以并行执行检查,从而充分利用主机的多核。 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文