From c477e2fb78347728aaacbbc89666dcda1481a4b9 Mon Sep 17 00:00:00 2001 From: Matthew Booth Date: Thu, 19 Nov 2009 16:10:00 +0000 Subject: 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. --- Makefile.am | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 87efb2dc..9332a10d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -15,6 +15,8 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +include $(top_srcdir)/subdir-rules.mk + ACLOCAL_AMFLAGS = -I m4 SUBDIRS = gnulib/lib hivex src daemon appliance fish po examples images \ @@ -54,9 +56,15 @@ if HAVE_HASKELL SUBDIRS += haskell endif +generator_built = \ + guestfs-structs.pod \ + guestfs-actions.pod \ + guestfish-actions.pod + EXTRA_DIST = \ - guestfs.pod guestfs-actions.pod guestfs-structs.pod \ - guestfish.pod guestfish-actions.pod \ + $(generator_built) \ + guestfs.pod \ + guestfish.pod \ html/pod.css \ HACKING TODO \ libguestfs.pc libguestfs.pc.in \ -- cgit