emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 637cf3ba49: Various improvements to admin/emake.


From: Gregory Heytings
Subject: master 637cf3ba49: Various improvements to admin/emake.
Date: Fri, 16 Sep 2022 19:35:36 -0400 (EDT)

branch: master
commit 637cf3ba4955449bc2510da385d39c21f2e0fc42
Author: Gregory Heytings <gregory@heytings.org>
Commit: Gregory Heytings <gregory@heytings.org>

    Various improvements to admin/emake.
    
    * admin/emake: Return the status code of make when the build fails.
    Filter the output of emake *clean.  Add three options --no-color
    (useful for emake check for example), --no-check (useful for quicker
    builds during development) and --no-fast.
---
 admin/emake | 30 ++++++++++++++++++++++++++----
 1 file changed, 26 insertions(+), 4 deletions(-)

diff --git a/admin/emake b/admin/emake
index 8b2114b3f8..db4363a25b 100755
--- a/admin/emake
+++ b/admin/emake
@@ -20,7 +20,11 @@ if [ -f /proc/cpuinfo ]; then
        sed 's/^[0-9]*/+/')))
 fi
 
-make FAST=true -j$cores "$@" 2>&1 | \
+[[ "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"
+
+make $FASTOPT -j$cores "$@" 2>&1 | \
 sed -u 's# \.\./\.\./# #
 s# \.\./# #
 s#^Configuring local git # Configuring local git #
@@ -30,6 +34,7 @@ s#^Configured for # Configured for #
 s#^./temacs.*#  \\& #
 s#^make.*Error#  \\& #
 s#^Dumping under the name.*#  \\& #
+:a;/\\$/N;s/\\\n//;ta
 ' | \
 grep -E --line-buffered -v "^make|\
 ^Loading|\
@@ -82,16 +87,33 @@ The GNU allocators don't work|\
 ^\^\(\(|\
 ^ANCIENT=yes make|\
 ^touch -t|\
-^'build-aux/git-hooks\
+^'build-aux/git-hooks|\
+^GNUmakefile:[0-9]*: There seems to be no |\
+^GNUmakefile:[0-9]*: Running |\
+^GNUmakefile:[0-9]*: No Makefile|\
+^rm -f |\
+^rm -rf|\
+^find \. |\
+^rm -fr deps|\
+^if test -f \./\.gdbinit|\
+^true|\
+^for file in |\
+^rmdir|\
+^\[ \"\.\" = \"\.\" \]\
 " | \
 while read
 do
   C=""
-  [[ "X${REPLY:0:1}" != "X " ]] && C="\033[1;31m"
-  [[ "X${REPLY:0:3}" == "X   " ]] && C="\033[1;31m"
+  (($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"
 done
 
+# If make failed, exit now with its error code.
+((${PIPESTATUS[0]} != 0)) && exit ${PIPESTATUS[0]}
+
+(($NOCHECK == 1)) && exit 0
+
 # Run a "make check" on all test files belonging to files that have
 # changed since last time.
 make -j$cores check-maybe 2>&1 | \



reply via email to

[Prev in Thread] Current Thread [Next in Thread]