php: Disallow separated builds.

As it stands, this will just break.  Until it is fixed, give a
diagnostic message.
This commit is contained in:
Richard W.M. Jones
2013-04-24 20:35:05 +01:00
parent 13c0b780a3
commit 0ec2726a52

View File

@@ -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)