diff options
| author | Gregory Heytings | 2020-12-14 19:49:39 +0100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2020-12-14 19:49:39 +0100 |
| commit | 5337211b9453c25ef1b35bcb33844059ea34a10a (patch) | |
| tree | f9046d926f2b1c2d917fda9e8011c7ccba768c06 /admin | |
| parent | c0c6cd2d5d7af82ddfd4d8d080d0aa8d7882d293 (diff) | |
| download | emacs-5337211b9453c25ef1b35bcb33844059ea34a10a.tar.gz emacs-5337211b9453c25ef1b35bcb33844059ea34a10a.zip | |
Make the emake error messages red
* admin/emake: Colorize error messages.
Diffstat (limited to 'admin')
| -rwxr-xr-x | admin/emake | 76 |
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 | |||
| 3 | cores=1 | ||
| 4 | |||
| 5 | # Determine the number of cores. | ||
| 6 | if [ -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]*/+/'))) | ||
| 12 | fi | ||
| 13 | |||
| 14 | make -j$cores "$@" 2>&1 | \ | ||
| 15 | sed -u 's# \.\./\.\./# # | ||
| 16 | s# \.\./# # | ||
| 17 | s#^Configuring local git # Configuring local git # | ||
| 18 | s#^Installing git hooks...# Installing git hooks...# | ||
| 19 | s#^Running # Running # | ||
| 20 | s#^Configured for # Configured for # | ||
| 21 | s#^./temacs # ./temacs # | ||
| 22 | s#^Dumping under the name# Dumping under the name# | ||
| 23 | ' | \ | ||
| 24 | egrep --line-buffered -v "^make|\ | ||
| 25 | ^Loading|\ | ||
| 26 | SCRAPE|\ | ||
| 27 | INFO.*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|\ | ||
| 41 | mkdir -p etc|\ | ||
| 42 | mkdir -p info|\ | ||
| 43 | mkdir -p lisp|\ | ||
| 44 | ^LC_ALL.*pdump|\ | ||
| 45 | ^cp -f emacs.p|\ | ||
| 46 | GEN.*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|\ | ||
| 64 | The GNU allocators don't work|\ | ||
| 65 | ^git config |\ | ||
| 66 | ^'\.git/|\ | ||
| 67 | ^\^\(\(|\ | ||
| 68 | ^'build-aux/git-hooks\ | ||
| 69 | " | \ | ||
| 70 | while read | ||
| 71 | do | ||
| 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" | ||
| 76 | done | ||