summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2005-11-09 19:55:25 +0000
committerfoobar <sniper@php.net>2005-11-09 19:55:25 +0000
commit9d766b59b2d80635879d8ab9fddbe1191df82e27 (patch)
tree15692875bf81b5e0df25683023c7b47646e80dbe
parent18267e2f7fbe6af44eb8c8b61fa8926851adeafa (diff)
downloadphp-git-9d766b59b2d80635879d8ab9fddbe1191df82e27.tar.gz
- Fix the ccache detection.
-rw-r--r--Makefile.gcov6
-rw-r--r--configure.in17
2 files changed, 18 insertions, 5 deletions
diff --git a/Makefile.gcov b/Makefile.gcov
index 073163fe6e..1c06d40899 100644
--- a/Makefile.gcov
+++ b/Makefile.gcov
@@ -5,6 +5,12 @@
lcov: lcov-html
+lcov-ccache:
+ @if test -z "$(CCACHE_DISABLE)" || test "$(CCACHE_DISABLE)" != "1"; then \
+ echo "ccache is not disabled. Set environment variable CCACHE_DISABLE=1 to disable ccache."; \
+ exit 123; \
+ fi
+
lcov-test: all
@echo "Running test suite"
@find . -name \*.gcda | xargs rm -f
diff --git a/configure.in b/configure.in
index ea60014706..e4e7f0d97e 100644
--- a/configure.in
+++ b/configure.in
@@ -604,12 +604,19 @@ PHP_ARG_ENABLE(gcov, whether to include gcov symbols,
if test "$PHP_GCOV" = "yes"; then
if test "$GCC" != "yes"; then
- AC_MSG_ERROR([GCC is required to be able use --enable-gcov])
+ AC_MSG_ERROR([GCC is required for --enable-gcov])
+ fi
+
+ dnl Check if ccache is being used
+ PHP_CHECK_GCC_ARG([--ccache-skip], [gcc_ccache=yes])
+
+ if test "$gcc_ccache" = "yes"; then
+ if test -z "$CCACHE_DISABLE" || test "$CCACHE_DISABLE" != "1"; 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
+ lcov_target="lcov-ccache"
fi
- dnl Check if we can pass GCC the --ccache-disable option
- PHP_CHECK_GCC_ARG([--ccache-disable], [CC="$CC --ccache-disable"])
-
ltp_version_list="1.4"
AC_CHECK_PROG(LTP, lcov, lcov)
@@ -1232,7 +1239,7 @@ CFLAGS="\$(CFLAGS_CLEAN) $standard_libtool_flag"
INLINE_CFLAGS="$INLINE_CFLAGS $standard_libtool_flag"
CXXFLAGS="$CXXFLAGS $standard_libtool_flag"
-all_targets='$(OVERALL_TARGET) $(PHP_MODULES) $(PHP_CLI_TARGET)'
+all_targets="$lcov_target \$(OVERALL_TARGET) \$(PHP_MODULES) \$(PHP_CLI_TARGET)"
install_targets="$install_modules install-build install-headers install-programs"
case $PHP_SAPI in