mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-26 07:33:47 +00:00
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.
This commit is contained in:
parent
fe7c015b20
commit
637cf3ba49
30
admin/emake
30
admin/emake
@ -20,7 +20,11 @@ if [ -f /proc/cpuinfo ]; then
|
|||||||
sed 's/^[0-9]*/+/')))
|
sed 's/^[0-9]*/+/')))
|
||||||
fi
|
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# \.\./\.\./# #
|
sed -u 's# \.\./\.\./# #
|
||||||
s# \.\./# #
|
s# \.\./# #
|
||||||
s#^Configuring local git # Configuring local git #
|
s#^Configuring local git # Configuring local git #
|
||||||
@ -30,6 +34,7 @@ s#^Configured for # Configured for #
|
|||||||
s#^./temacs.*# \\& #
|
s#^./temacs.*# \\& #
|
||||||
s#^make.*Error# \\& #
|
s#^make.*Error# \\& #
|
||||||
s#^Dumping under the name.*# \\& #
|
s#^Dumping under the name.*# \\& #
|
||||||
|
:a;/\\$/N;s/\\\n//;ta
|
||||||
' | \
|
' | \
|
||||||
grep -E --line-buffered -v "^make|\
|
grep -E --line-buffered -v "^make|\
|
||||||
^Loading|\
|
^Loading|\
|
||||||
@ -82,16 +87,33 @@ The GNU allocators don't work|\
|
|||||||
^\^\(\(|\
|
^\^\(\(|\
|
||||||
^ANCIENT=yes make|\
|
^ANCIENT=yes make|\
|
||||||
^touch -t|\
|
^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
|
while read
|
||||||
do
|
do
|
||||||
C=""
|
C=""
|
||||||
[[ "X${REPLY:0:1}" != "X " ]] && C="\033[1;31m"
|
(($NOCOLOR == 0)) && [[ "X${REPLY:0:1}" != "X " ]] && C="\033[1;31m"
|
||||||
[[ "X${REPLY:0:3}" == "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"
|
[[ "X$C" == "X" ]] && printf "%s\n" "$REPLY" || printf "$C%s\033[0m\n" "$REPLY"
|
||||||
done
|
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
|
# Run a "make check" on all test files belonging to files that have
|
||||||
# changed since last time.
|
# changed since last time.
|
||||||
make -j$cores check-maybe 2>&1 | \
|
make -j$cores check-maybe 2>&1 | \
|
||||||
|
Loading…
Reference in New Issue
Block a user