mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
php: Disallow separated builds.
As it stands, this will just break. Until it is fixed, give a diagnostic message.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user