mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
scripts: make git-update.sh build with all cores available
The git-update.sh now builds with all cores available. In case of
failure it defaults to 1
The developer can still override this by setting -j to something else
in MAKEFLAGS, as stated by 299605dfe2
.
https://bugzilla.gnome.org/show_bug.cgi?id=766666
This commit is contained in:
parent
56ee365077
commit
603b8188bb
1 changed files with 3 additions and 1 deletions
|
@ -29,6 +29,8 @@ tmp=$tmp/git-update.$(date +%Y%m%d-%H%M-).$RANDOM.$RANDOM.$RANDOM.$$
|
|||
ERROR_LOG="$tmp/failures.log"
|
||||
ERROR_RETURN=255
|
||||
|
||||
CPUCORES=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo "1")
|
||||
|
||||
for m in $CORE $MODULES $EXTRA_MODULES; do
|
||||
if test -d $m; then
|
||||
echo "+ updating $m"
|
||||
|
@ -91,7 +93,7 @@ build()
|
|||
fi
|
||||
|
||||
echo "+ $1: make"
|
||||
make > "$tmp/$1-make.log" 2>&1
|
||||
MAKEFLAGS="-j$CPUCORES $MAKEFLAGS" make > "$tmp/$1-make.log" 2>&1
|
||||
if test $? -ne 0
|
||||
then
|
||||
echo "$1: make [$tmp/$1-make.log]" >> $ERROR_LOG
|
||||
|
|
Loading…
Reference in a new issue