diff options
author | Gregory Heytings <gregory@heytings.org> | 2022-09-17 09:36:38 +0000 |
---|---|---|
committer | Gregory Heytings <gregory@heytings.org> | 2022-09-17 11:37:51 +0200 |
commit | 1dd83e3bdc54a0b235fa99536b15e52fe92fbc96 (patch) | |
tree | e6d7b95f649cdeb95d14a19bfe7584e87b3551d9 /admin/emake | |
parent | f7eec293a6e3b6a1c34fb2552d4439fee5d47e42 (diff) | |
download | emacs-1dd83e3bdc54a0b235fa99536b15e52fe92fbc96.tar.gz |
Further improvements to admin/emake.
* admin/emake: Better parsing of script options. Add a --quieter option,
which removes everything except errors.
Diffstat (limited to 'admin/emake')
-rwxr-xr-x | admin/emake | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/admin/emake b/admin/emake index db4363a25bf..e2f38501e93 100755 --- a/admin/emake +++ b/admin/emake @@ -20,9 +20,18 @@ if [ -f /proc/cpuinfo ]; then sed 's/^[0-9]*/+/'))) fi -[[ "X$1" == "X--no-color" ]] && { NOCOLOR=1; shift; } || NOCOLOR=0 -[[ "X$1" == "X--no-check" ]] && { NOCHECK=1; shift; } || NOCHECK=0 -[[ "X$1" == "X--no-fast" ]] && { FASTOPT=""; shift; } || FASTOPT="FAST=true" +NOCOLOR=0 +NOCHECK=0 +FASTOPT="FAST=true" +QUIETER=0 +while : +do + [[ "X$1" == "X--no-color" ]] && { NOCOLOR=1; shift; continue; } + [[ "X$1" == "X--no-check" ]] && { NOCHECK=1; shift; continue; } + [[ "X$1" == "X--no-fast" ]] && { FASTOPT=""; shift; continue; } + [[ "X$1" == "X--quieter" ]] && { QUIETER=1; shift; continue; } + break +done make $FASTOPT -j$cores "$@" 2>&1 | \ sed -u 's# \.\./\.\./# # @@ -106,7 +115,12 @@ do C="" (($NOCOLOR == 0)) && [[ "X${REPLY:0:1}" != "X " ]] && C="\033[1;31m" (($NOCOLOR == 0)) && [[ "X${REPLY:0:3}" == "X " ]] && C="\033[1;31m" - [[ "X$C" == "X" ]] && printf "%s\n" "$REPLY" || printf "$C%s\033[0m\n" "$REPLY" + if (($QUIETER == 0)) + then + [[ "X$C" == "X" ]] && printf "%s\n" "$REPLY" || printf "$C%s\033[0m\n" "$REPLY" + else + [[ "X$C" == "X" ]] && printf "%-80s\r" "$REPLY" || printf "$C%-80s\033[0m\n" "$REPLY" + fi done # If make failed, exit now with its error code. |