diff options
author | Joseph Benden <joe@benden.us> | 2019-07-20 01:14:20 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2019-09-30 12:08:17 +0000 |
commit | b1b47140eaf74c83a2f12fbff8971d1087e920a6 (patch) | |
tree | f45c1b6369f8c1cd643956b6ea612c9eaaedec36 /functions.sh.in | |
parent | 9be3a6c6a033c2151ae937aa437a960a55f8279c (diff) | |
download | abuild-b1b47140eaf74c83a2f12fbff8971d1087e920a6.tar.gz abuild-b1b47140eaf74c83a2f12fbff8971d1087e920a6.tar.bz2 abuild-b1b47140eaf74c83a2f12fbff8971d1087e920a6.tar.xz abuild-b1b47140eaf74c83a2f12fbff8971d1087e920a6.zip |
feat: add support for ccache
This introduces basic support for ccache, during packaging builds.
If you are building many packages, it is recommended to manually
increase the maximum size of the ccache cache. This is typically
achieved by modifying `~/.ccache/ccache.conf` and adjusting the
`max_size` setting.
Signed-off-by: Joseph Benden <joe@benden.us>
Diffstat (limited to 'functions.sh.in')
-rw-r--r-- | functions.sh.in | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/functions.sh.in b/functions.sh.in index fb474a5..435b240 100644 --- a/functions.sh.in +++ b/functions.sh.in @@ -55,7 +55,7 @@ hostspec_to_libc() { readconfig() { local _APORTSDIR _BUILDDIR _PKGDEST _SRCPKGDEST _REPODEST _SRCDEST local _CARCH _CHOST _CTARGET _CPPFLAGS _CFLAGS _CXXFLAGS _LDFLAGS - local _JOBS _MAKEFLAGS _PACKAGER _USE_COLORS + local _JOBS _MAKEFLAGS _PACKAGER _USE_COLORS _USE_CCACHE local gitbase= [ -n "${APORTSDIR+x}" ] && _APORTSDIR=$APORTSDIR [ -n "${BUILDDIR+x}" ] && _BUILDDIR=$BUILDDIR @@ -74,6 +74,7 @@ readconfig() { [ -n "${MAKEFLAGS+x}" ] && _MAKEFLAGS=$MAKEFLAGS [ -n "${PACKAGER+x}" ] && _PACKAGER=$PACKAGER [ -n "${USE_COLORS+x}" ] && _USE_COLORS="$USE_COLORS" + [ -n "${USE_CCACHE+x}" ] && _USE_CCACHE="$USE_CCACHE" : ${ABUILD_CONF:=$sysconfdir/abuild.conf} : ${ABUILD_USERDIR:=$HOME/.abuild} : ${ABUILD_USERCONF:=$ABUILD_USERDIR/abuild.conf} @@ -114,6 +115,7 @@ readconfig() { MAKEFLAGS=${_MAKEFLAGS-$MAKEFLAGS} PACKAGER=${_PACKAGER-$PACKAGER} USE_COLORS=${_USE_COLORS-$USE_COLORS} + USE_CCACHE=${_USE_CCACHE-$USE_CCACHE} [ -z "$CBUILD" ] && CBUILD="$(gcc -dumpmachine)" [ -z "$CHOST" ] && CHOST="$CBUILD" |