Autoconf subdirectories with subpackages depending on each other?
Asked Answered
D

1

7

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.

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.

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

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

Dignitary answered 26/9, 2011 at 9:2 Comment(1)
The autotools are not a packaging tool. Attempting to use them as such is painful, at best. Build separate packages. Let apt/yum/pkg/etc deal with the dependencies.Shall
C
3

This mail might help.

Calley answered 27/9, 2011 at 6:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.