aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorGregory Heytings2020-12-14 19:49:39 +0100
committerLars Ingebrigtsen2020-12-14 19:49:39 +0100
commit5337211b9453c25ef1b35bcb33844059ea34a10a (patch)
treef9046d926f2b1c2d917fda9e8011c7ccba768c06 /admin
parentc0c6cd2d5d7af82ddfd4d8d080d0aa8d7882d293 (diff)
downloademacs-5337211b9453c25ef1b35bcb33844059ea34a10a.tar.gz
emacs-5337211b9453c25ef1b35bcb33844059ea34a10a.zip
Make the emake error messages red
* admin/emake: Colorize error messages.
Diffstat (limited to 'admin')
-rwxr-xr-xadmin/emake76
1 files changed, 76 insertions, 0 deletions
diff --git a/admin/emake b/admin/emake
new file mode 100755
index 00000000000..d794e1c4178
--- /dev/null
+++ b/admin/emake
@@ -0,0 +1,76 @@
1#!/bin/bash
2
3cores=1
4
5# Determine the number of cores.
6if [ -f /proc/cpuinfo ]; then
7 cores=$(($(egrep "^physical id|^cpu cores" /proc/cpuinfo |\
8 awk '{ print $4; }' |\
9 sed '$!N;s/\n/ /' |\
10 uniq |\
11 sed 's/^[0-9]*/+/')))
12fi
13
14make -j$cores "$@" 2>&1 | \
15sed -u 's# \.\./\.\./# #
16s# \.\./# #
17s#^Configuring local git # Configuring local git #
18s#^Installing git hooks...# Installing git hooks...#
19s#^Running # Running #
20s#^Configured for # Configured for #
21s#^./temacs # ./temacs #
22s#^Dumping under the name# Dumping under the name#
23' | \
24egrep --line-buffered -v "^make|\
25^Loading|\
26SCRAPE|\
27INFO.*Scraping.*[.]\$|\
28^Waiting for git|\
29^Finding pointers|\
30^Using load-path|\
31^Adding name|\
32^Dump mode|\
33^Dumping finger|\
34^Byte counts|\
35^Reloc counts|\
36^Pure-hashed|\
37^cp -f temacs|\
38^rm -f bootstrap|\
39^Dump complete|\
40^rm -f emacs|\
41mkdir -p etc|\
42mkdir -p info|\
43mkdir -p lisp|\
44^LC_ALL.*pdump|\
45^cp -f emacs.p|\
46GEN.*loaddefs|\
47^Reloading stale|\
48^Source file.*newer than|\
49^Directories for loaddefs|\
50^./autogen.sh|\
51^[Cc]hecking |\
52^.Read INSTALL.REPO for more|\
53^Your system has the required tools.|\
54^Building aclocal.m4|\
55^ Running 'autoreconf|\
56^You can now run './configure'|\
57^./configure|\
58^configure: creating|\
59^\"configure\" file built.|\
60^There seems to be no|\
61^config.status:|\
62^ *$|\
63^Makefile built|\
64The GNU allocators don't work|\
65^git config |\
66^'\.git/|\
67^\^\(\(|\
68^'build-aux/git-hooks\
69" | \
70while read
71do
72 C=""
73 [[ "X${REPLY:0:1}" != "X " ]] && C="\033[1;31m"
74 [[ "X${REPLY:0:3}" == "X " ]] && C="\033[1;31m"
75 [[ "X$C" == "X" ]] && printf "%s\n" "$REPLY" || printf "$C%s\033[0m\n" "$REPLY"
76done