diff options
| author | Gregory Heytings | 2023-08-16 15:58:56 +0000 |
|---|---|---|
| committer | Gregory Heytings | 2023-08-16 16:06:45 +0000 |
| commit | b73ab54ae67fb6042faff251e7e08293a3d303ed (patch) | |
| tree | 370ecdd874a452e0d61d18f699042595bb72c680 /admin | |
| parent | 1e2d0775151f144830dfb9e9f1cd460f1e480270 (diff) | |
| download | emacs-b73ab54ae67fb6042faff251e7e08293a3d303ed.tar.gz emacs-b73ab54ae67fb6042faff251e7e08293a3d303ed.zip | |
Various improvements to 'emake'
* admin/emake: Highlight the result of 'check-maybe' in red.
Reindent a few lines. Add a line in the filters. Clarify the
documentation.
Diffstat (limited to 'admin')
| -rwxr-xr-x | admin/emake | 41 |
1 files changed, 29 insertions, 12 deletions
diff --git a/admin/emake b/admin/emake index 0aa1178768d..2badbe80358 100755 --- a/admin/emake +++ b/admin/emake | |||
| @@ -19,13 +19,20 @@ | |||
| 19 | 19 | ||
| 20 | # This script is meant to be used as ./admin/emake, and will compile | 20 | # This script is meant to be used as ./admin/emake, and will compile |
| 21 | # the Emacs tree with virtually all of the informational messages | 21 | # the Emacs tree with virtually all of the informational messages |
| 22 | # removed, and with errors/warnings highlighted in red. It'll give a | 22 | # removed, and with errors/warnings highlighted in red. It will also |
| 23 | # quick overview to confirm that nothing has broken, for instance | 23 | # run the test files belonging to files that have changed. It'll give |
| 24 | # a quick overview to confirm that nothing has broken, for instance | ||
| 24 | # after doing a "git pull". It's not meant to be used during actual | 25 | # after doing a "git pull". It's not meant to be used during actual |
| 25 | # development, because it removes so much information that commands | 26 | # development, because it removes so much information that commands |
| 26 | # like `next-error' won't be able to jump to the source code where | 27 | # like `next-error' won't be able to jump to the source code where |
| 27 | # errors are. | 28 | # errors are. |
| 28 | 29 | ||
| 30 | # It has a few options: | ||
| 31 | # with --no-color errors/warnings are not highlighted | ||
| 32 | # with --no-check test files are not run | ||
| 33 | # with --no-fast the FAST=true make variable is not set (see Makefile.in) | ||
| 34 | # with --quieter only errors/warnings remain visible | ||
| 35 | |||
| 29 | cores=1 | 36 | cores=1 |
| 30 | 37 | ||
| 31 | # Determine the number of cores. | 38 | # Determine the number of cores. |
| @@ -96,6 +103,7 @@ GEN.*loaddefs|\ | |||
| 96 | ^.Read INSTALL.REPO for more|\ | 103 | ^.Read INSTALL.REPO for more|\ |
| 97 | ^Your system has the required tools.|\ | 104 | ^Your system has the required tools.|\ |
| 98 | ^Building aclocal.m4|\ | 105 | ^Building aclocal.m4|\ |
| 106 | ^Building 'aclocal.m4'|\ | ||
| 99 | ^ Running 'autoreconf|\ | 107 | ^ Running 'autoreconf|\ |
| 100 | ^You can now run './configure'|\ | 108 | ^You can now run './configure'|\ |
| 101 | ^./configure|\ | 109 | ^./configure|\ |
| @@ -129,15 +137,15 @@ The GNU allocators don't work|\ | |||
| 129 | " | \ | 137 | " | \ |
| 130 | while read | 138 | while read |
| 131 | do | 139 | do |
| 132 | C="" | 140 | C="" |
| 133 | (($NOCOLOR == 0)) && [[ "X${REPLY:0:1}" != "X " ]] && C="\033[1;31m" | 141 | (($NOCOLOR == 0)) && [[ "X${REPLY:0:1}" != "X " ]] && C="\033[1;31m" |
| 134 | (($NOCOLOR == 0)) && [[ "X${REPLY:0:3}" == "X " ]] && C="\033[1;31m" | 142 | (($NOCOLOR == 0)) && [[ "X${REPLY:0:3}" == "X " ]] && C="\033[1;31m" |
| 135 | if (($QUIETER == 0)) | 143 | if (($QUIETER == 0)) |
| 136 | then | 144 | then |
| 137 | [[ "X$C" == "X" ]] && printf "%s\n" "$REPLY" || printf "$C%s\033[0m\n" "$REPLY" | 145 | [[ "X$C" == "X" ]] && printf "%s\n" "$REPLY" || printf "$C%s\033[0m\n" "$REPLY" |
| 138 | else | 146 | else |
| 139 | [[ "X$C" == "X" ]] && printf "%-80s\r" "$REPLY" || printf "$C%-80s\033[0m\n" "$REPLY" | 147 | [[ "X$C" == "X" ]] && printf "%-80s\r" "$REPLY" || printf "$C%-80s\033[0m\n" "$REPLY" |
| 140 | fi | 148 | fi |
| 141 | done | 149 | done |
| 142 | 150 | ||
| 143 | # If make failed, exit now with its error code. | 151 | # If make failed, exit now with its error code. |
| @@ -149,4 +157,13 @@ done | |||
| 149 | # changed since last time. | 157 | # changed since last time. |
| 150 | make -j$cores check-maybe 2>&1 | \ | 158 | make -j$cores check-maybe 2>&1 | \ |
| 151 | sed -n '/contained unexpected results/,$p' | \ | 159 | sed -n '/contained unexpected results/,$p' | \ |
| 152 | grep -E --line-buffered -v "^make" | 160 | grep -E --line-buffered -v "^make" | \ |
| 161 | while read | ||
| 162 | do | ||
| 163 | if (($NOCOLOR == 0)) | ||
| 164 | then | ||
| 165 | printf "\033[1;31m%s\033[0m\n" "$REPLY" | ||
| 166 | else | ||
| 167 | printf "%s\n" "$REPLY" | ||
| 168 | fi | ||
| 169 | done | ||