Fix for non-srcdir builds: more misc fixes.
authorRichard Jones <rjones@trick.home.annexia.org>
Thu, 16 Jul 2009 17:23:53 +0000 (18:23 +0100)
committerRichard Jones <rjones@trick.home.annexia.org>
Thu, 16 Jul 2009 17:23:53 +0000 (18:23 +0100)
Makefile.am
perl/Makefile.am
po/POTFILES.in
src/Makefile.am

index 0e468b5..c4ca1e0 100644 (file)
@@ -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
 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@//' \
        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
          --outfile $@
 
 html/guestfish.1.html: guestfish.pod guestfish-actions.pod
+       mkdir -p html
        sed \
          -e '/@ACTIONS@/rguestfish-actions.pod' -e 's/@ACTIONS@//' \
          < $< | \
        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
 
 # 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 $@
        rm -f $@ $@-t
        sh make-recipes.sh recipes/*.sh > $@-t
        mv $@-t $@
@@ -170,7 +173,11 @@ pkgconfig_DATA = libguestfs.pc
 
 # Make clean.
 
 
 # Make clean.
 
-CLEANFILES = $(fs_DATA) emptydisk pod2htm?.tmp
+CLEANFILES = $(fs_DATA) \
+       emptydisk \
+       pod2htm?.tmp \
+       $(HTMLFILES) \
+       $(man_MANS)
 
 clean-local:
        rm -rf initramfs
 
 clean-local:
        rm -rf initramfs
index 9e32969..4b7ed99 100644 (file)
@@ -48,10 +48,12 @@ all: Makefile-pl
 Makefile-pl: Makefile.PL
        perl Makefile.PL INSTALLDIRS=$(INSTALLDIRS) PREFIX=$(prefix)
 
 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
 
 clean-local:
        -$(MAKE) -f Makefile-pl clean
+       rm -f Makefile-pl
 
 install-data-hook:
        $(MAKE) -f Makefile-pl DESTDIR=$(DESTDIR) install
 
 install-data-hook:
        $(MAKE) -f Makefile-pl DESTDIR=$(DESTDIR) install
index 26a72ef..ec1d2c7 100644 (file)
@@ -1,4 +1,5 @@
 build/fish/rc_protocol.c
 build/fish/rc_protocol.c
+build/src/guestfs_protocol.c
 cat/virt-cat.pl
 daemon/augeas.c
 daemon/blockdev.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-actions.c
 src/guestfs-bindtests.c
 src/guestfs.c
-src/guestfs_protocol.c
 v2v/virt-v2v.pl
 v2v/virt-v2v.pl
index 1906378..c6006d2 100644 (file)
@@ -17,8 +17,6 @@
 
 EXTRA_DIST = \
        guestfs_protocol.x \
 
 EXTRA_DIST = \
        guestfs_protocol.x \
-       guestfs_protocol.c \
-       guestfs_protocol.h \
        MAX_PROC_NR \
        stamp-generator \
        generator.ml
        MAX_PROC_NR \
        stamp-generator \
        generator.ml
@@ -52,6 +50,8 @@ BUILT_SOURCES = \
 
 $(BUILT_SOURCES): stamp-generator
 
 
 $(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.
 # 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
 
 if HAVE_RPCGEN
 guestfs_protocol.c: guestfs_protocol.x
-       rm -f $@-t
+       rm -f $@-t $@-t2
        $(RPCGEN) -c -o $@-t $<
        $(RPCGEN) -c -o $@-t $<
-       mv $@-t $@
+       sed 's,\.\./\.\./src/,,' < $@-t > $@-t2
+       rm $@-t
+       mv $@-t2 $@
 
 guestfs_protocol.h: guestfs_protocol.x
        rm -f $@-t
 
 guestfs_protocol.h: guestfs_protocol.x
        rm -f $@-t