From: Richard Jones Date: Thu, 16 Jul 2009 17:23:53 +0000 (+0100) Subject: Fix for non-srcdir builds: more misc fixes. X-Git-Tag: 1.0.62~11 X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=commitdiff_plain;h=811b4a51dc25219e19527304892e7f688867e105;hp=98515732084c6856c2e22364b2ae64113c2c37c6 Fix for non-srcdir builds: more misc fixes. --- diff --git a/Makefile.am b/Makefile.am index 0e468b5..c4ca1e0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -105,6 +105,7 @@ guestfish.1: guestfish.pod guestfish-actions.pod noinst_DATA = html/guestfs.3.html html/guestfish.1.html html/guestfs.3.html: guestfs.pod guestfs-actions.pod guestfs-structs.pod + mkdir -p html sed \ -e '/@ACTIONS@/rguestfs-actions.pod' -e 's/@ACTIONS@//' \ -e '/@STRUCTS@/rguestfs-structs.pod' -e 's/@STRUCTS@//' \ @@ -116,6 +117,7 @@ html/guestfs.3.html: guestfs.pod guestfs-actions.pod guestfs-structs.pod --outfile $@ html/guestfish.1.html: guestfish.pod guestfish-actions.pod + mkdir -p html sed \ -e '/@ACTIONS@/rguestfish-actions.pod' -e 's/@ACTIONS@//' \ < $< | \ @@ -127,6 +129,7 @@ html/guestfish.1.html: guestfish.pod guestfish-actions.pod # Recipes web page. html/recipes.html: $(wildcard recipes/*.sh) $(wildcard recipes/*.html) $(wildcard recipes/*.example) Makefile make-recipes.sh + mkdir -p html rm -f $@ $@-t sh make-recipes.sh recipes/*.sh > $@-t mv $@-t $@ @@ -170,7 +173,11 @@ pkgconfig_DATA = libguestfs.pc # Make clean. -CLEANFILES = $(fs_DATA) emptydisk pod2htm?.tmp +CLEANFILES = $(fs_DATA) \ + emptydisk \ + pod2htm?.tmp \ + $(HTMLFILES) \ + $(man_MANS) clean-local: rm -rf initramfs diff --git a/perl/Makefile.am b/perl/Makefile.am index 9e32969..4b7ed99 100644 --- a/perl/Makefile.am +++ b/perl/Makefile.am @@ -48,10 +48,12 @@ all: Makefile-pl Makefile-pl: Makefile.PL perl Makefile.PL INSTALLDIRS=$(INSTALLDIRS) PREFIX=$(prefix) -CLEANFILES = Makefile-pl +# No! Otherwise it is deleted before the clean-local rule runs. +#CLEANFILES = Makefile-pl clean-local: -$(MAKE) -f Makefile-pl clean + rm -f Makefile-pl install-data-hook: $(MAKE) -f Makefile-pl DESTDIR=$(DESTDIR) install diff --git a/po/POTFILES.in b/po/POTFILES.in index 26a72ef..ec1d2c7 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,4 +1,5 @@ build/fish/rc_protocol.c +build/src/guestfs_protocol.c cat/virt-cat.pl daemon/augeas.c daemon/blockdev.c @@ -75,5 +76,4 @@ ruby/ext/guestfs/_guestfs.c src/guestfs-actions.c src/guestfs-bindtests.c src/guestfs.c -src/guestfs_protocol.c v2v/virt-v2v.pl diff --git a/src/Makefile.am b/src/Makefile.am index 1906378..c6006d2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -17,8 +17,6 @@ EXTRA_DIST = \ guestfs_protocol.x \ - guestfs_protocol.c \ - guestfs_protocol.h \ MAX_PROC_NR \ stamp-generator \ generator.ml @@ -52,6 +50,8 @@ BUILT_SOURCES = \ $(BUILT_SOURCES): stamp-generator +CLEANFILES = guestfs_protocol.c guestfs_protocol.h + # From the libtool info file, with comments: # # | 1. Start with version information of `0:0:0' for each libtool library. @@ -109,9 +109,11 @@ libguestfs_la_CFLAGS = -Wall -DGUESTFS_DEFAULT_PATH='"$(libdir)/guestfs"' if HAVE_RPCGEN guestfs_protocol.c: guestfs_protocol.x - rm -f $@-t + rm -f $@-t $@-t2 $(RPCGEN) -c -o $@-t $< - mv $@-t $@ + sed 's,\.\./\.\./src/,,' < $@-t > $@-t2 + rm $@-t + mv $@-t2 $@ guestfs_protocol.h: guestfs_protocol.x rm -f $@-t