diff options
Diffstat (limited to 'build/Makefile.global')
-rw-r--r-- | build/Makefile.global | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/build/Makefile.global b/build/Makefile.global index 7348e253c1..86cd287610 100644 --- a/build/Makefile.global +++ b/build/Makefile.global @@ -144,17 +144,19 @@ prof-use: # olny php above 7.1.0 supports nullable return type %_arginfo.h: %.stub.php - -@if type php >/dev/null 2>/dev/null; \ - then \ - if test `php -v | head -n1 | cut -d" " -f 2 | sed "s/$$/\n7.0.99/" | sort -rV | head -n1` != "7.0.99"; \ - then \ - php $(top_srcdir)/scripts/dev/gen_stub.php $<; \ - fi; \ - fi; + @if test -e "$(top_srcdir)/scripts/dev/gen_stub.php"; then \ + if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \ + $(PHP_EXECUTABLE) $(top_srcdir)/scripts/dev/gen_stub.php $<; \ + elif type php >/dev/null 2>/dev/null; then \ + if test `php -v | head -n1 | cut -d" " -f 2 | sed "s/$$/\n7.0.99/" | sort -rV | head -n1` != "7.0.99"; then \ + php $(top_srcdir)/scripts/dev/gen_stub.php $<; \ + fi; \ + fi; \ + fi; # As we don't track includes, this is just a heuristic %.c: %_arginfo.h - touch $@ + @touch $@ .PHONY: all clean install distclean test prof-gen prof-clean prof-use .NOEXPORT: |