com php-src: Remove configure checks for ltp when using --enable-gcov: build/Makefile.gcov configure.ac
| From: | Nikita Popov | Date: | Fri, 11 Oct 2019 14:51:03 +0000 |
| Subject: | com php-src: Remove configure checks for ltp when using --enable-gcov: build/Makefile.gcov configure.ac | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-108886@lists.php.net to get a copy of this message | ||
Commit: 3718a955263b6d8ad2735f32df8f99567203726e
Author: Nikita Popov <nikita.ppv@gmail.com> Fri, 11 Oct 2019 16:44:31 +0200
Parents: a78b09c9b8c52841e89bf181e6a0d51e6bb17494
Branches: PHP-7.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3718a955263b6d8ad2735f32df8f99567203726e
Log:
Remove configure checks for ltp when using --enable-gcov
gcov builds can also be used with other tools like gcovr, so remove
the hard dependency on LTP.
Changed paths:
M build/Makefile.gcov
M configure.ac
Diff:
diff --git a/build/Makefile.gcov b/build/Makefile.gcov
index c32ae3fe55b..944739aff33 100644
--- a/build/Makefile.gcov
+++ b/build/Makefile.gcov
@@ -2,6 +2,9 @@
# LCOV
#
+LTP = lcov
+LTP_GENHTML = genhtml
+
lcov: lcov-html
lcov-test: lcov-clean-data test
diff --git a/configure.ac b/configure.ac
index 8f19fe0e60d..038a3fbb9fa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -781,7 +781,7 @@ PHP_HELP_SEPARATOR([General settings:])
PHP_ARG_ENABLE([gcov],
[whether to include gcov symbols],
[AS_HELP_STRING([--enable-gcov],
- [Enable GCOV code coverage (requires LTP) - FOR DEVELOPERS ONLY!!])],
+ [Enable GCOV code coverage - FOR DEVELOPERS ONLY!!])],
[no],
[no])
@@ -801,54 +801,6 @@ if test "$PHP_GCOV" = "yes"; then
AC_MSG_ERROR([ccache must be disabled when --enable-gcov option is used. You can disable ccache
by setting environment variable CCACHE_DISABLE=1.])
fi
- dnl Min: 1.5 (i.e. 105, major * 100 + minor for easier comparison).
- ltp_version_min="105"
- dnl Non-working versions, e.g. "1.8 1.18";
- dnl Remove "none" when introducing the first incompatible LTP version and
- dnl separate any following additions by spaces.
- ltp_version_exclude="1.8"
-
- AC_CHECK_PROG(LTP, lcov, lcov)
- AC_CHECK_PROG(LTP_GENHTML, genhtml, genhtml)
- PHP_SUBST(LTP)
- PHP_SUBST(LTP_GENHTML)
-
- if test "$LTP"; then
- AC_CACHE_CHECK([for ltp version], php_cv_ltp_version, [
- php_cv_ltp_version=invalid
- ltp_version_vars=
$LTP -v 2>/dev/null | $SED -e 's/^.* //' -e 's/\./
/g' | tr -d a-z
- if test -n "$ltp_version_vars"; then
- set $ltp_version_vars
- ltp_version="${1}.${2}"
- ltp_version_num="expr ${1} \* 100 + ${2}"
- if test $ltp_version_num -ge $ltp_version_min; then
- php_cv_ltp_version="$ltp_version (ok)"
- for ltp_check_version in $ltp_version_exclude; do
- if test "$ltp_version" = "$ltp_check_version"; then
- php_cv_ltp_version=invalid
- break
- fi
- done
- fi
- fi
- ])
- else
- ltp_msg="To enable code coverage reporting you must have LTP installed"
- AC_MSG_ERROR([$ltp_msg])
- fi
-
- case $php_cv_ltp_version in
- ""|invalid[)]
- ltp_msg="This LTP version is not supported (found: $ltp_version, min: $ltp_version_min,
excluded: $ltp_version_exclude)."
- AC_MSG_ERROR([$ltp_msg])
- LTP="exit 0;"
- ;;
- esac
-
- if test -z "$LTP_GENHTML"; then
- AC_MSG_ERROR([Could not find genhtml from the LTP package])
- fi
-
AC_DEFINE(HAVE_GCOV, 1, [Whether you have gcov])
PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/build/Makefile.gcov, $abs_srcdir)