[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] [PATCH 12/12] php: Disallow separated builds.



From: "Richard W.M. Jones" <rjones redhat com>

As it stands, this will just break.  Until it is fixed, give a
diagnostic message.
---
 php/Makefile.am | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/php/Makefile.am b/php/Makefile.am
index 3f95c83..215295e 100644
--- a/php/Makefile.am
+++ b/php/Makefile.am
@@ -39,13 +39,24 @@ php_DATA = guestfs_php.ini
 
 # In theory: EXTRA_LIBS="-lguestfs"  In fact this doesn't work
 # and we need to add the library to EXTRA_LDFLAGS.
-all: extension/config.h
+all: check-builddir-equals-srcdir extension/config.h
 	$(MAKE) -C extension \
 	  EXTRA_INCLUDES="-I$(abs_srcdir)/../src" \
 	  EXTRA_LDFLAGS="-L$(abs_srcdir)/../src/.libs -lguestfs" \
 	  EXTRA_CFLAGS="-DGUESTFS_PRIVATE=1" \
 	  all
 
+# It looks like this is going to be very hard to make work, so
+# disallow it for now.
+check-builddir-equals-srcdir:
+	@if [ $(builddir) != $(srcdir) ]; then \
+	  echo "***"; \
+	  echo "PHP cannot be built with builddir != srcdir"; \
+	  echo "Use ./configure --disable-php"; \
+	  echo "***"; \
+	  exit 1; \
+	fi
+
 extension/config.h: extension/config.m4 ../config.status
 	cd extension && phpize
 	cd extension && ./configure --prefix=$(prefix) --libdir=$(libdir)
-- 
1.8.1.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]