Dependencies, libstorage, and libinnhist

Russ Allbery rra at
Sun Sep 8 20:00:08 UTC 2002

Russ Allbery <rra at Stanford.EDU> writes:

> I'm currently in the process of redoing the build system for libstorage
> and libinnhist again, since it still wasn't right.  Parallel builds
> using shared libraries still did the wrong thing.

> The problem was that the dependency information was still incomplete,
> and on top of that we weren't able to parallelize builds of all of the
> separate storage methods.  I think I finally figured out how to fix
> that, and I'm testing a solution now.  buildconfig needed to generate
> even more information about how to build the different storage methods,
> rather than trying to hack around implicit rules that didn't apply.

Well, that didn't quite work, but at least it's closer.

GNU make still decides to recurse into the same directory multiple times,
and then multiple compiles stomp on each other.  But I can't figure out
any other way of solving this problem that still picks up on modifications
to source files and doesn't result in the library getting rebuilt every
time even if nothing's changed.

The rules *still* aren't right, because if you change a private header
file but none of the C files, the top level make doesn't know enough about
dependencies to pick that up and rebuild the right files.  That's probably
fixable with more hackery on make depend, but I'm tired of fighting with

Recursive make is evil.

I'd really like to require a compiler that supports -c with -o so that we
can easily build without recursing.  Are we about at the point where we
can do that?  gcc supports that, of course, as does Forte as near as I can
tell, but I've seen some bug reports about that assumption within the past
four years or so, so I know some vendor compilers still don't.

If we could assume -c with -o so that we can tell the compiler to place
the object file in the right place, I'd start looking at rewriting the
build machinery so that make never had to recurse at all, at least in the
library directories.

Russ Allbery (rra at             <>

    Please send questions to the list rather than mailing me directly.
     <> explains why.

More information about the inn-workers mailing list