From: Jim Meyering Date: Fri, 9 Apr 2010 20:36:26 +0000 (+0200) Subject: maint.mk: print better diagnostic when there is no $(_hv_file) X-Git-Tag: v0.1~4295 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=d0b4dde420cda77b0efea277ef2f6fbfac3e6b0b;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index 6c5122db1..4957393b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2010-04-09 Jim Meyering + 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 5854f9a2c..5d194ecec 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.