Web lists-archives.com

Re: [PATCH] ci: make sure we build Git parallel

Junio C Hamano <gitster@xxxxxxxxx> writes:

> SZEDER Gábor <szeder.dev@xxxxxxxxx> writes:
>> Append to MAKEFLAGS when setting the compiler to use, to ensure that
>> the number of parallel jobs to use is preserved.
>> Signed-off-by: SZEDER Gábor <szeder.dev@xxxxxxxxx>
>> ---
>>  ci/lib.sh | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> diff --git a/ci/lib.sh b/ci/lib.sh
>> index 16f4ecbc67..cee51a4cc4 100755
>> --- a/ci/lib.sh
>> +++ b/ci/lib.sh
>> @@ -185,4 +185,4 @@ GIT_TEST_GETTEXT_POISON)
>>  	;;
>>  esac
>> -export MAKEFLAGS="CC=${CC:-cc}"
>> +export MAKEFLAGS="$MAKEFLAGS CC=${CC:-cc}"
> Makes sense.  Thanks.

Wouldn't all other hits of "MAKEFLAGS=" in ci/lib.sh also want the
same treatment, though?  We know that "if travis to this, otherwise
if Asure, do that" is the first block to muck with MAKEFLAGS in the
script, but a new assignment before that block can be added in the
future and cause a similar issue unless we do so.

Of course, at some point we do want to say "we do not want to
inherit it from the outside environment", but then such an
assignment of empty value should be done at the very beginning with
a comment, not with "this happens to be the first one to set, so
let's not append but assign to clear any previous value", I would