aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2019-07-29 02:12:45 +0200
committerThomas Deutschmann <whissi@gentoo.org>2019-07-29 22:00:27 +0200
commitc7200d139371d5c0cf8b60143a0abb60d8013c00 (patch)
treea5b91d53c47a3796279c1c5b060b8e54ca39503a
parentExport $PATH to genkernel worker (diff)
downloadgenkernel-c7200d13.tar.gz
genkernel-c7200d13.tar.bz2
genkernel-c7200d13.zip
gen_funcs.sh: gkbuild(): Export any set CCACHE_* and DISTCC_* variable
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
-rwxr-xr-xgen_funcs.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/gen_funcs.sh b/gen_funcs.sh
index cb0763a..e700ae1 100755
--- a/gen_funcs.sh
+++ b/gen_funcs.sh
@@ -1233,6 +1233,19 @@ gkbuild() {
"STRIP='$(tc-getSTRIP)'"
)
+ local envvar_prefix envvars_to_export envvar_to_export
+ for envvar_prefix in CCACHE_ DISTCC_
+ do
+ envvars_to_export=$(compgen -A variable | grep "^${envvar_prefix}")
+ for envvar_to_export in ${envvars_to_export}
+ do
+ [ -z "${envvar_to_export}" ] && break
+
+ envvars+=( "${envvar_to_export}='${!envvar_to_export}'" )
+ done
+ done
+ unset envvar_prefix envvars_to_export envvar_to_export
+
if [ ${NICE} -ne 0 ]
then
NICEOPTS="nice -n${NICE} "