[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] maint.mk: print better diagnostic when there is no $(_hv_file)
From: |
Jim Meyering |
Subject: |
[PATCH] maint.mk: print better diagnostic when there is no $(_hv_file) |
Date: |
Fri, 09 Apr 2010 22:39:23 +0200 |
I tried this new test in coreutils, and "make syntax-check" printed this:
grep: ./tests/help-version: No such file or directory
Now it prints this:
sc_cross_check_PATH_usage_in_tests: skipped: no such file:
./tests/help-version
Of course, once I update to latest gnulib there,
I'll set _hv_file to $(srcdir)/tests/misc/help-version in cfg.mk.
>From d0b4dde420cda77b0efea277ef2f6fbfac3e6b0b Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Fri, 9 Apr 2010 22:36:26 +0200
Subject: [PATCH] maint.mk: print better diagnostic when there is no $(_hv_file)
* top/maint.mk (sc_cross_check_PATH_usage_in_tests): Skip test and
announce that when $(_hv_file) (aka help-version) does not exist.
---
ChangeLog | 4 ++++
top/maint.mk | 20 ++++++++++++--------
2 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 6c5122d..4957393 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2010-04-09 Jim Meyering <address@hidden>
+ maint.mk: print better diagnostic when there is no $(_hv_file)
+ * top/maint.mk (sc_cross_check_PATH_usage_in_tests): Skip test and
+ announce that when $(_hv_file) (aka help-version) does not exist.
+
init.sh: run tr in the "C" locale to avoid multibyte interpretation
* tests/init.sh (rand_bytes_): Run tr in the "C" locale so it does
not try to interpret its random input bytes. Jarno Rajahalme reported
diff --git a/top/maint.mk b/top/maint.mk
index 5854f9a..5d194ec 100644
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -859,14 +859,18 @@ sc_copyright_check:
_hv_file ?= $(srcdir)/tests/help-version
_hv_regex ?= ^ *\. [^ ]*/init\.sh
sc_cross_check_PATH_usage_in_tests:
- @if grep -l 'VERSION mismatch' $(_hv_file) >/dev/null \
- && grep -lE '$(_hv_regex)' $(_hv_file) >/dev/null; then \
- good=$$(grep -E '$(_hv_regex)' < $(_hv_file)); \
- grep -LFx "$$good" \
- $$(grep -lE '$(_hv_regex)' $$($(VC_LIST_EXCEPT))) \
- | grep . && \
- { echo "$(ME): the above files use path_prepend_ inconsistently" \
- 1>&2; exit 1; } || :; \
+ @if test -f $(_hv_file); then \
+ if grep -l 'VERSION mismatch' $(_hv_file) >/dev/null \
+ && grep -lE '$(_hv_regex)' $(_hv_file) >/dev/null; then \
+ good=$$(grep -E '$(_hv_regex)' < $(_hv_file)); \
+ grep -LFx "$$good" \
+ $$(grep -lE '$(_hv_regex)' $$($(VC_LIST_EXCEPT))) \
+ | grep . && \
+ { echo "$(ME): the above files use path_prepend_ inconsistently" \
+ 1>&2; exit 1; } || :; \
+ fi; \
+ else \
+ echo "$@: skipped: no such file: $(_hv_file)"; \
fi
# #if HAVE_... will evaluate to false for any non numeric string.
--
1.7.1.rc0.239.g8b27e
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] maint.mk: print better diagnostic when there is no $(_hv_file),
Jim Meyering <=