带有相互依赖的子包的 Autoconf 子目录? [英] Autoconf subdirectories with subpackages depending on each other?

查看:31
本文介绍了带有相互依赖的子包的 Autoconf 子目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我手头有一个大型项目(主),它被分成几个组件(liba、b、c、d)以简化构建和维护.在构建整个包时,必须依次构建所有子组件,其中一些包相互依赖.

I've got a large project on my hand (master) that is split into several components (liba, b, c, d) to ease building and maintenance. When building the whole package, all of the subcomponents must be built in sequence, and some of these packages depend upon each other.

更明确地说,liba 是 b、c 和 d 的先决条件,并且配置脚本检查 liba 的存在.在自行构建 b 发行版时,此检查对于提供用户友好的错误消息绝对是必要的.但是,在构建主包及其所有子包时,liba 被构建为子目标.因此,在主套件上运行configure时,liba尚未安装,b中liba检查失败.

In more explicit terms, liba is a prerequisite for b, c and d, and the presence of liba is checked by the configure script. This check is definitely necessary to give user-friendly error messages when building the b distribution on its own. However, when building the master package and all its subpackages, liba is built as a subtarget. Therefore, when configure runs on the master suite, liba is not installed yet and the check for liba in b fails.

我可以通过将 --with-liba=internal 或类似标志传递给 b 的配置脚本来纠正这个问题;但是,我还没有找到关于 autoconf 的这种标志传递的任何文档.目前,我在 master 中有一个很长很长的自定义 Makefile,它的作用与带有子目录的 autoconf/automake 相同,但稍微重新排序依赖项,以便代替 (configure liba) => (configure b) => (buildliba) => (build b),顺序是(configure liba) => (build liba) => (install liba) => (configure b) => (build b).

I could rectify this issue by passing a --with-liba=internal or similar flag to the configure script of b; however, I haven't found any documentation on such flag-passing for autoconf. For the time being, I have a long, long custom Makefile in master that does just the same as autoconf/automake with subdirectories, but reorders dependencies a bit so that instead of (configure liba) => (configure b) => (build liba) => (build b), the order is (configure liba) => (build liba) => (install liba) => (configure b) => (build b).

知道如何使用标准的 autoconf/automake 子目录重构它吗?

Any idea how I could refactor this with standard autoconf/automake subdirectories?

推荐答案

此邮件 可能会有所帮助.

这篇关于带有相互依赖的子包的 Autoconf 子目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆