summaryrefslogtreecommitdiff
path: root/build/Makefile.global
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2020-02-13 15:59:21 +0800
committerXinchen Hui <laruence@gmail.com>2020-02-13 15:59:21 +0800
commit9c5fb54c97e4c35d97ca1b49ade38864bd67112d (patch)
tree37aa332f05b2ee17c533a4b8453c53a442f58fe6 /build/Makefile.global
parentdf71503e83268ef02923b6b5663ec83aea43955d (diff)
downloadphp-git-9c5fb54c97e4c35d97ca1b49ade38864bd67112d.tar.gz
Improved the check
makefile.global is also used while building shared extension
Diffstat (limited to 'build/Makefile.global')
-rw-r--r--build/Makefile.global18
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: