commit:     c7200d139371d5c0cf8b60143a0abb60d8013c00
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 29 00:12:45 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Jul 29 20:00:27 2019 +0000
URL:        https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=c7200d13

gen_funcs.sh: gkbuild(): Export any set CCACHE_* and DISTCC_* variable

Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 gen_funcs.sh | 13 +++++++++++++
 1 file changed, 13 insertions(+)

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} "

Reply via email to