[tz] [PATCH] make check_white_space fix for leap-seconds.list

Paul Eggert eggert at cs.ucla.edu
Thu Jan 29 00:58:48 UTC 2015


* Makefile (check_white_space): Allow trailing white space in
leap-seconds.list.  This file is maintained by NIST, and the
current version has trailing white space, and has a checksum
making it inadvisable for us to remove the trailing white space in
our copy.  Also, coalesce two 'grep' calls into one, and check for
weird white space characters anywhere, not just before line end.
---
 Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 9e8e468..2503463 100644
--- a/Makefile
+++ b/Makefile
@@ -484,9 +484,9 @@ check_character_set: $(ENCHILADA)
 		! grep -Env $(VALID_LINE) $(ENCHILADA)
 
 check_white_space: $(ENCHILADA)
-		! grep -n ' '$(TAB_CHAR) $(ENCHILADA)
-		! grep -n '[[:space:]]$$' $(ENCHILADA)
-		! grep -n "$$(printf '[\f\r\v]\n')" $(ENCHILADA)
+		! grep -En ' '$(TAB_CHAR)"|$$(printf '[\f\r\v]')" $(ENCHILADA)
+		! grep -n '[[:space:]]$$' \
+			$$(ls $(ENCHILADA) | grep -Fvx leap-seconds.list)
 
 CHECK_CC_LIST = { n = split($$1,a,/,/); for (i=2; i<=n; i++) print a[1], a[i]; }
 
-- 
2.1.0




More information about the tz mailing list