Commit 0a6ddb9c authored by Vitaly Lipatov's avatar Vitaly Lipatov

add ccache support and use it in rpmbb

parent f2618b1b
......@@ -73,6 +73,11 @@ mkdir -p "$RPMTOPDIR/RPMS"
test -z "$LISTNAMES" && fatal "Please run with spec(s) name"
test -n "$LISTRPMARGS" && echog "Run $RPMBUILD with options: '$LISTRPMARGS'"
# enable ccache using
if [ -n "$CCACHE_ENABLE" ] ; then
enable_ccache
fi
# instead cbuild req
if [ -n "$BUILDREQ" ] ; then
uni_buildreq $LISTNAMES
......
......@@ -64,3 +64,9 @@
# Path to Sisyphus repo (where i586/RPMS.classic) for rpmunmets build
#SISYPHUSPATH=/var/ftp/pub/ALTLinux/Sisyphus/
# enable ccache using
# CCACHE_ENABLE=yes
# set dir for ccache cache
# export CCACHE_DIR=$OURTMPDIR/ccache
......@@ -181,3 +181,20 @@ is_ssh_target()
{
echo "$1" | grep -q ":"
}
enable_ccache()
{
which ccache >/dev/null || fatal "Install ccache package before using"
# handled in gcc-common
export GCC_USE_CCACHE=1
# step to gcc-common
export CC=gcc CXX=g++
#export CC="ccache gcc"
#export CPP="ccache gcc -E"
#export CXX="ccache g++"
#export CXXCPP="ccache g++ -E"
}
......@@ -53,6 +53,12 @@ BUILDSERVER=
PKGREPLBASE=$ETERBUILDDIR/pkgrepl
# TODO: use common ccache dir
export CCACHE_DIR=$OURTMPDIR/ccache
# enable ccache using
# CCACHE_ENABLE=yes
test -f /etc/eterbuild/config && . /etc/eterbuild/config
if [ -f ~/.config/eterbuild ] ; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment