summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRene Engelhard <rene@debian.org>2021-08-23 22:37:54 +0200
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2021-09-13 15:03:12 +0200
commit5979076a14098f6887b61e937cfc9059ff7f2506 (patch)
tree7e780ccc00f8752520e51a27fca04b1f275ca0b2
parent2fb94b482b430a6b6b5a58a46d590847410bd8b6 (diff)
fix ccache size detection with ccache 4.4
which changed format. but ccache -p has the same format in 4.2 and 4.4 so use that one Change-Id: I4de0241109c580becb96ce0c1b461c2642a4631e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120928 Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
-rw-r--r--configure.ac4
1 files changed, 3 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 45d19327d19d..a2dd5dc5eeb9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3127,7 +3127,9 @@ AC_SUBST(CCACHE_DEPEND_MODE)
# skip on windows - sccache defaults are good enough
if test "$CCACHE" != "" -a "$_os" != "WINNT"; then
- ccache_size_msg=$([ccache -s | tail -n 1 | sed 's/^[^0-9]*//' | sed -e 's/\.[0-9]*//'])
+ # e.g. (/home/rene/.config/ccache/ccache.conf) max_size = 20.0G
+ # -p works with both 4.2 and 4.4
+ ccache_size_msg=$([ccache -p | $AWK /max_size/'{ print $4 }' | sed -e 's/\.[0-9]*//'])
ccache_size=$(echo "$ccache_size_msg" | grep "G" | sed -e 's/G.*$//')
if test "$ccache_size" = ""; then
ccache_size=$(echo "$ccache_size_msg" | grep "M" | sed -e 's/\ M.*$//')