util/abuild: Only update submodules once

Without this, each build will try to update the submodules. Not
necessarily a problem but git locks repos, creating spurious error
messages.

Change-Id: Iba20677d4b5f9365c92f7ed247ca56acb7d33b27
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42774
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
Patrick Georgi 2020-06-24 16:51:12 +02:00
parent c4b2f8c5d8
commit b9d0c0f7a3
1 changed files with 3 additions and 0 deletions

View File

@ -796,8 +796,11 @@ if [ "$cpus" != "1" ]; then
echo | xargs -P ${cpus:-0} -n 1 echo 2>/dev/null >/dev/null && USE_XARGS=1
fi
git submodule update --checkout --init
if [ "$USE_XARGS" = "0" ]; then
test "$MAKEFLAGS" == "" && test "$cpus" != "" && export MAKEFLAGS="-j $cpus"
export MAKEFLAGS="$MAKEFLAGS UPDATED_SUBMODULES=1" # no need to re-download
build_targets()
{
local targets=${*-$(get_mainboards)}