1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Improved the check

makefile.global is also used while building shared extension
This commit is contained in:
Xinchen Hui
2020-02-13 15:59:21 +08:00
parent df71503e83
commit 9c5fb54c97

View File

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