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

查看:99
本文介绍了具有子包的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)=>(build liba)=>(内部版本b),顺序为(配置liba)=>(内部版本liba)=>(安装liba)=>(配置b)=>(内部版本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?

推荐答案

查看全文

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