summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-06-17 22:59:46 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-06-21 12:51:45 +0100
commit13d1da17d4e1ae1f4b99b290aaf26020b4052039 (patch)
treee94653917086e98bfea5813a12cda1d37774598b
parenta41a5a6fef47c9b21826363445701e633ed141a8 (diff)
downloadlibguestfs-13d1da17d4e1ae1f4b99b290aaf26020b4052039.tar.gz
libguestfs-13d1da17d4e1ae1f4b99b290aaf26020b4052039.tar.xz
libguestfs-13d1da17d4e1ae1f4b99b290aaf26020b4052039.zip
build: Define builddir and abs_srcdir when they are missing.
RHEL 5-era autoconf did not define these, so define them manually when they are missing. Define builddir as '.' The scripts require this. It won't work in the srcdir != builddir case, but we don't care about that for RHEL 5. This commit also moves the builddir / abs_srcdir variable setting above the include of subdir-rules.mk, in case that include uses these variables. Useful script: for f in $(find -name Makefile.am | xargs fgrep '$(abs_srcdir)' -l) ; do if ! grep -q '^abs_srcdir' $f; then echo missing in $f fi done (cherry picked from commit 50aa9533e4a505e1c64dbedddb30491bfbb755d6)
-rw-r--r--appliance/Makefile.am3
-rw-r--r--gobject/docs/Makefile.am6
-rw-r--r--inspector/Makefile.am3
-rw-r--r--java/Makefile.am6
-rw-r--r--ocaml/Makefile.am6
-rw-r--r--php/Makefile.am3
-rw-r--r--po/Makefile.am3
-rw-r--r--python/Makefile.am2
-rw-r--r--resize/Makefile.am6
-rw-r--r--ruby/Makefile.am3
-rw-r--r--sparsify/Makefile.am6
-rw-r--r--sysprep/Makefile.am6
-rw-r--r--tests/data/Makefile.am6
-rw-r--r--tests/extra/Makefile.am3
-rw-r--r--tests/guests/Makefile.am6
-rw-r--r--tests/xml/Makefile.am3
16 files changed, 61 insertions, 10 deletions
diff --git a/appliance/Makefile.am b/appliance/Makefile.am
index b8fe648c..59589971 100644
--- a/appliance/Makefile.am
+++ b/appliance/Makefile.am
@@ -15,6 +15,9 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# Old RHEL 5 autoconf doesn't have builddir.
+builddir ?= .
+
include $(top_srcdir)/subdir-rules.mk
EXTRA_DIST = \
diff --git a/gobject/docs/Makefile.am b/gobject/docs/Makefile.am
index f43ec9cd..5aadef12 100644
--- a/gobject/docs/Makefile.am
+++ b/gobject/docs/Makefile.am
@@ -15,6 +15,12 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# Old RHEL 5 autoconf doesn't have builddir.
+builddir ?= .
+
+# Old RHEL 5 autoconf doesn't have abs_srcdir.
+abs_srcdir ?= $(shell cd $(top_srcdir)/gobject/docs && pwd)
+
# The name of the module, e.g. 'glib'.
DOC_MODULE=guestfs
diff --git a/inspector/Makefile.am b/inspector/Makefile.am
index 3e299417..00300a09 100644
--- a/inspector/Makefile.am
+++ b/inspector/Makefile.am
@@ -15,6 +15,9 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# Old RHEL 5 autoconf doesn't have builddir.
+builddir ?= .
+
include $(top_srcdir)/subdir-rules.mk
EXAMPLE_XML = \
diff --git a/java/Makefile.am b/java/Makefile.am
index 2a8b77b8..613aac92 100644
--- a/java/Makefile.am
+++ b/java/Makefile.am
@@ -15,13 +15,13 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# Old RHEL 5 autoconf doesn't have builddir.
+builddir ?= .
+
include $(top_srcdir)/subdir-rules.mk
java_prefix = com/redhat/et/libguestfs
-# Old RHEL 5 autoconf doesn't have builddir.
-builddir ?= $(top_builddir)/java
-
generator_built = \
Makefile.inc \
$(java_built_sources) \
diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am
index 8c742a22..f22f3f4c 100644
--- a/ocaml/Makefile.am
+++ b/ocaml/Makefile.am
@@ -15,6 +15,12 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# Old RHEL 5 autoconf doesn't have builddir.
+builddir ?= .
+
+# Old RHEL 5 autoconf doesn't have abs_srcdir.
+abs_srcdir ?= $(shell cd $(top_srcdir)/ocaml && pwd)
+
include $(top_srcdir)/subdir-rules.mk
generator_built = \
diff --git a/php/Makefile.am b/php/Makefile.am
index 7652b66e..220f13a9 100644
--- a/php/Makefile.am
+++ b/php/Makefile.am
@@ -17,6 +17,9 @@
include $(top_srcdir)/subdir-rules.mk
+# Old RHEL 5 autoconf doesn't have abs_srcdir.
+abs_srcdir ?= $(shell cd $(top_srcdir)/php && pwd)
+
generator_built = \
extension/php_guestfs_php.h \
extension/guestfs_php.c
diff --git a/po/Makefile.am b/po/Makefile.am
index 14adb3ab..141896a3 100644
--- a/po/Makefile.am
+++ b/po/Makefile.am
@@ -17,6 +17,9 @@
include $(top_srcdir)/subdir-rules.mk
+# Old RHEL 5 autoconf doesn't have abs_srcdir.
+abs_srcdir ?= $(shell cd $(top_srcdir)/po && pwd)
+
DOMAIN = $(PACKAGE_NAME)
COPYRIGHT_HOLDER = Red Hat Inc.
MSGID_BUGS_ADDRESS = https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools
diff --git a/python/Makefile.am b/python/Makefile.am
index 5931e2e4..c6c1b1df 100644
--- a/python/Makefile.am
+++ b/python/Makefile.am
@@ -16,7 +16,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# Old RHEL 5 autoconf doesn't have builddir.
-builddir ?= $(top_builddir)/python
+builddir ?= .
include $(top_srcdir)/subdir-rules.mk
diff --git a/resize/Makefile.am b/resize/Makefile.am
index 00f5e350..8d87ab97 100644
--- a/resize/Makefile.am
+++ b/resize/Makefile.am
@@ -15,6 +15,12 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# Old RHEL 5 autoconf doesn't have builddir.
+builddir ?= .
+
+# Old RHEL 5 autoconf doesn't have abs_srcdir.
+abs_srcdir ?= $(shell cd $(top_srcdir)/resize && pwd)
+
include $(top_srcdir)/subdir-rules.mk
EXTRA_DIST = \
diff --git a/ruby/Makefile.am b/ruby/Makefile.am
index c4b680f6..9073ad7d 100644
--- a/ruby/Makefile.am
+++ b/ruby/Makefile.am
@@ -15,6 +15,9 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# Old RHEL 5 autoconf doesn't have builddir.
+builddir ?= .
+
include $(top_srcdir)/subdir-rules.mk
generator_built = \
diff --git a/sparsify/Makefile.am b/sparsify/Makefile.am
index 72cb2bb3..f4002e3e 100644
--- a/sparsify/Makefile.am
+++ b/sparsify/Makefile.am
@@ -17,6 +17,12 @@
include $(top_srcdir)/subdir-rules.mk
+# Old RHEL 5 autoconf doesn't have builddir.
+builddir ?= .
+
+# Old RHEL 5 autoconf doesn't have abs_srcdir.
+abs_srcdir ?= $(shell cd $(top_srcdir)/sparsify && pwd)
+
EXTRA_DIST = \
$(SOURCES) \
virt-sparsify.pod \
diff --git a/sysprep/Makefile.am b/sysprep/Makefile.am
index 7dad06c1..ef47075e 100644
--- a/sysprep/Makefile.am
+++ b/sysprep/Makefile.am
@@ -15,6 +15,12 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# Old RHEL 5 autoconf doesn't have builddir.
+builddir ?= .
+
+# Old RHEL 5 autoconf doesn't have abs_srcdir.
+abs_srcdir ?= $(shell cd $(top_srcdir)/sysprep && pwd)
+
include $(top_srcdir)/subdir-rules.mk
EXTRA_DIST = \
diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
index 85e1f392..fbf74d8b 100644
--- a/tests/data/Makefile.am
+++ b/tests/data/Makefile.am
@@ -15,10 +15,10 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-include $(top_srcdir)/subdir-rules.mk
-
# Old RHEL 5 autoconf doesn't have builddir.
-builddir ?= $(top_builddir)/tests/data
+builddir ?= .
+
+include $(top_srcdir)/subdir-rules.mk
EXTRA_DIST = \
filesanddirs-10M.tar.xz \
diff --git a/tests/extra/Makefile.am b/tests/extra/Makefile.am
index 911c83eb..9bcb9881 100644
--- a/tests/extra/Makefile.am
+++ b/tests/extra/Makefile.am
@@ -48,6 +48,9 @@
# - hard to test because guestmount forks into the background, and
# if valgrind reports errors it doesn't stop the test shell script
+# Old RHEL 5 autoconf doesn't have abs_srcdir.
+abs_srcdir ?= $(shell cd $(top_srcdir)/tests/extra && pwd)
+
EXTRA_DIST = pick-guests.pl suppressions
VG = $(VALGRIND) \
diff --git a/tests/guests/Makefile.am b/tests/guests/Makefile.am
index e20d91ca..3e5aea03 100644
--- a/tests/guests/Makefile.am
+++ b/tests/guests/Makefile.am
@@ -15,10 +15,10 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-include $(top_srcdir)/subdir-rules.mk
-
# Old RHEL 5 autoconf doesn't have builddir.
-builddir ?= $(top_builddir)/tests/guests
+builddir ?= .
+
+include $(top_srcdir)/subdir-rules.mk
EXTRA_DIST = \
guest-aux/make-debian-img.sh \
diff --git a/tests/xml/Makefile.am b/tests/xml/Makefile.am
index d9abd5cd..f5638fcb 100644
--- a/tests/xml/Makefile.am
+++ b/tests/xml/Makefile.am
@@ -15,6 +15,9 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# Old RHEL 5 autoconf doesn't have abs_srcdir.
+abs_srcdir ?= $(shell cd $(top_srcdir)/tests/xml && pwd)
+
include $(top_srcdir)/subdir-rules.mk
if HAVE_LIBVIRT