build: Fix inter-directory dependencies
authorMatthew Booth <mbooth@redhat.com>
Thu, 19 Nov 2009 16:10:00 +0000 (16:10 +0000)
committerRichard Jones <rjones@redhat.com>
Thu, 19 Nov 2009 16:40:22 +0000 (16:40 +0000)
commitc477e2fb78347728aaacbbc89666dcda1481a4b9
tree125a0e0b2596cc9f9ad44fa57199522f4c0de804
parent16c1b3164698900f52294e1396542ddd94a4cae4
build: Fix inter-directory dependencies

This change adds an explicit dependency on generator.ml for every file it
generates, except java files. Java is left for another time because it's
considerably trickier.

It also adds a build rule for src/libguestfs.la so it can be rebuilt as required
from other directories.

It does this by creating a top level make file, subdir-rules.mk, which can be
included from sub-directories. sub-directories need to define 'generator_built'
to include local files which are built by generator.ml, and they will be updated
automatically.

This fixes parallel make, and will automatically re-create generated files when
make is run from any directory.

It also fixes the problem which efad4f53 was targetting. Specifically,
src/guestfs_protocol.(c|h) had an erroneous dependency on stamp-generator, and
therefore generator.ml, despite not being directly created by it. This caused
them to be recreated every time generator.ml ran rather than only when
src/guestfs_protocol.x was updated, which cascaded into a daemon and therefore
appliance update.

This patch also changes the contents of the distribution tarball by including
files created by rpcgen.
20 files changed:
Makefile.am
appliance/Makefile.am
capitests/Makefile.am
daemon/Makefile.am
examples/Makefile.am
fish/Makefile.am
fuse/Makefile.am
haskell/Makefile.am
images/Makefile.am
inspector/Makefile.am
java/Makefile.am
ocaml/Makefile.am
perl/Makefile.am
python/Makefile.am
regressions/Makefile.am
ruby/Makefile.am
src/Makefile.am
subdir-rules.mk [new file with mode: 0644]
test-tool/Makefile.am
tools/Makefile.am