From 11400fde901e1c7a6d3c3887f322af66374793c2 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Tue, 7 Jul 2009 17:33:09 +0100 Subject: [PATCH] RHEL 5: $(builddir) did not exist with this old autoconf/automake, so workaround. --- images/Makefile.am | 15 +++++++++------ java/Makefile.am | 7 +++++-- python/Makefile.am | 3 +++ 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/images/Makefile.am b/images/Makefile.am index 9353e17..256259b 100644 --- a/images/Makefile.am +++ b/images/Makefile.am @@ -15,6 +15,9 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# Old RHEL 5 autoconf doesn't have builddir. +builddir ?= $(top_builddir)/images + EXTRA_DIST = \ helloworld.tar \ helloworld.tar.gz \ @@ -50,27 +53,27 @@ test.sqsh: $(squash_files) rm -f $@ $(MKSQUASHFS) $(squash_files) $@ -100kallzeroes: +$(builddir)/100kallzeroes: rm -f $@ $@-t dd if=/dev/zero of=$@-t bs=1024 count=100 mv $@-t $@ -100kallnewlines: 100kallzeroes +$(builddir)/100kallnewlines: $(builddir)/100kallzeroes rm -f $@ $@-t tr '\0' '\n' < $< > $@-t mv $@-t $@ -100kallspaces: 100kallzeroes +$(builddir)/100kallspaces: $(builddir)/100kallzeroes rm -f $@ $@-t tr '\0' ' ' < $< > $@-t mv $@-t $@ -100krandom: +$(builddir)/100krandom: rm -f $@ $@-t dd if=/dev/urandom of=$@-t bs=1024 count=100 mv $@-t $@ -10klines: +$(builddir)/10klines: rm -f $@ $@-t i=0; \ while [ $$i -lt 10000 ]; do \ @@ -79,7 +82,7 @@ test.sqsh: $(squash_files) done > $@-t mv $@-t $@ -initrd: empty known-1 known-2 known-3 +$(builddir)/initrd: empty known-1 known-2 known-3 rm -f $@ $@-t for f in $^; do echo $$f; done | cpio -o -H newc | gzip --best > $@-t mv $@-t $@ diff --git a/java/Makefile.am b/java/Makefile.am index b682747..f0db493 100644 --- a/java/Makefile.am +++ b/java/Makefile.am @@ -15,6 +15,9 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# Old RHEL 5 autoconf doesn't have builddir. +builddir ?= $(top_builddir)/java + java_prefix = com/redhat/et/libguestfs java_sources = \ @@ -50,7 +53,7 @@ libguestfs_jardir = $(JAR_INSTALL_DIR) libguestfs_jar_DATA = libguestfs-${VERSION}.jar libguestfs_jar_class_files = $(java_sources:.java=.class) $(libguestfs_jar_class_files): %.class: %.java - $(JAVAC) $(JAVAC_FLAGS) -d @builddir@ -classpath @srcdir@:@builddir@ -sourcepath @srcdir@:@builddir@ $< + $(JAVAC) $(JAVAC_FLAGS) -d $(builddir) -classpath @srcdir@:$(builddir) -sourcepath @srcdir@:$(builddir) $< libguestfs-${VERSION}.jar: $(libguestfs_jar_class_files) $(JAR) cf $@ $^ @@ -69,7 +72,7 @@ libguestfs_jni_la_CFLAGS = -Wall -I$(top_srcdir)/src -I$(top_builddir)/src $(JNI BUILT_SOURCES = com_redhat_et_libguestfs_GuestFS.h com_redhat_et_libguestfs_GuestFS.h: $(java_prefix)/GuestFS.class - $(JAVAH) -classpath @srcdir@:@builddir@ com.redhat.et.libguestfs.GuestFS + $(JAVAH) -classpath @srcdir@:$(builddir) com.redhat.et.libguestfs.GuestFS # Documentation. diff --git a/python/Makefile.am b/python/Makefile.am index 2928f98..da52cfa 100644 --- a/python/Makefile.am +++ b/python/Makefile.am @@ -15,6 +15,9 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# Old RHEL 5 autoconf doesn't have builddir. +builddir ?= $(top_builddir)/python + EXTRA_DIST = \ guestfs.py \ guestfs-py.c \ -- 1.8.3.1