mirror of
https://github.com/RetroPie/RetroPie-Setup.git
synced 2024-06-02 19:48:01 -04:00
Set distcc variables at the scriptmodule function calling stage
Only configure distcc variables if a module does not have the "nodistcc" flag. Skip builder/setup modules to avoid having distcc changes propagate to modules built from them. This allows easily disabling distcc for certain modules that are not compatible.
This commit is contained in:
parent
9aa86b8f2d
commit
cf0e098106
|
@ -112,6 +112,16 @@ function rp_callModule() {
|
|||
return 3
|
||||
fi
|
||||
|
||||
# skip for modules 'builder' and 'setup' so that distcc settings do not propagate from them
|
||||
if [[ "$md_id" != "builder" && "$md_id" != "setup" ]]; then
|
||||
# if distcc is used and the module doesn't exclude it, add /usr/lib/distcc to PATH and MAKEFLAGS
|
||||
if [[ -n "$DISTCC_HOSTS" ]] && ! hasFlag "${__mod_info[$md_id/flags]}" "nodistcc"; then
|
||||
# use local variables so they are available to all child functions without changing the globals
|
||||
local PATH="/usr/lib/distcc:$PATH"
|
||||
local MAKEFLAGS="$MAKEFLAGS PATH=$PATH"
|
||||
fi
|
||||
fi
|
||||
|
||||
# parameters _auto_ _binary or _source_ (_source_ is used if no parameters are given for a module)
|
||||
case "$mode" in
|
||||
# install the module if not installed, and update if it is
|
||||
|
|
|
@ -145,12 +145,6 @@ function conf_build_vars() {
|
|||
export ASFLAGS="$__asflags"
|
||||
export MAKEFLAGS="$__makeflags"
|
||||
|
||||
# if using distcc, add /usr/lib/distcc to PATH/MAKEFLAGS
|
||||
if [[ -n "$DISTCC_HOSTS" ]]; then
|
||||
PATH="/usr/lib/distcc:$PATH"
|
||||
MAKEFLAGS+=" PATH=$PATH"
|
||||
fi
|
||||
|
||||
# if __use_ccache is set, then add ccache to PATH/MAKEFLAGS
|
||||
if [[ "$__use_ccache" -eq 1 ]]; then
|
||||
PATH="/usr/lib/ccache:$PATH"
|
||||
|
|
Loading…
Reference in a new issue