RHEL 5: $(builddir) did not exist with this old autoconf/automake, so workaround.
authorRichard Jones <rjones@centos5x32.home.annexia.org>
Tue, 7 Jul 2009 16:33:09 +0000 (17:33 +0100)
committerRichard Jones <rjones@centos5x32.home.annexia.org>
Tue, 7 Jul 2009 16:33:09 +0000 (17:33 +0100)
images/Makefile.am
java/Makefile.am
python/Makefile.am

index 9353e17..256259b 100644 (file)
@@ -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 $@
index b682747..f0db493 100644 (file)
@@ -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.
 
index 2928f98..da52cfa 100644 (file)
@@ -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 \