Fix ccache support

This commit is contained in:
Andreas Schneider 2023-05-05 13:53:47 +02:00
parent dc949bd3c8
commit a79fd33b58
1 changed files with 7 additions and 2 deletions

View File

@ -2,7 +2,7 @@
#
# To build and run the tests use:
#
# fedpkg local --with testsuite
# fedpkg mockbuild --with testsuite
# or
# rpmbuild --rebuild --with testsuite samba.src.rpm
#
@ -10,12 +10,15 @@
# Build with internal talloc, tevent, tdb and ldb.
#
# fedpkg local --with=testsuite --with=includelibs
# fedpkg mockbuild --with=testsuite --with=includelibs
# or
# rpmbuild --rebuild --with=testsuite --with=includelibs samba.src.rpm
#
%bcond_with includelibs
# fedpkg mockbuild --with=ccache
%bcond_with ccache
# ctdb is enabled by default, you can disable it with: --without clustering
%bcond_without clustering
@ -1263,11 +1266,13 @@ export python_LDFLAGS="$(echo %{__global_ldflags} | sed -e 's/-Wl,-z,defs//g')"
%endif
# Add support for mock ccache plugin
%if %{with ccache}
CCACHE="$(command -v ccache)"
if [ -n "${CCACHE}" ]; then
${CCACHE} -s
export CC="${CCACHE} gcc"
fi
%endif
%configure \
--enable-fhs \