diff options
author | Jim Meyering <meyering@redhat.com> | 2008-10-16 14:22:46 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2008-10-16 14:25:53 +0200 |
commit | 7f6fb43e7dea2fcbb83b0c16c98adbcb8a63675f (patch) | |
tree | 5a677bdfc925d9ceabcaadcccfd0e340fea17aca /maint.mk | |
parent | ddc409b59e57ac0dce72eda1e532c5224b4205ab (diff) | |
download | coreutils-7f6fb43e7dea2fcbb83b0c16c98adbcb8a63675f.tar.xz |
build: when po-check fails, say why and suggest a fix
* maint.mk (po-check): Before, when this check failed, it just
spat out a diff mentioning two temporary files. Now, it tells
you what's wrong and suggests a fix with a patch using the name
of the affected file (rather than temporary file names) in the
diff output.
Diffstat (limited to 'maint.mk')
-rw-r--r-- | maint.mk | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -597,10 +597,15 @@ m4-check: && { echo '$(ME): quote the first arg to AC_DEFUN' 1>&2; \ exit 1; } || : +fix_po_file_diag = \ +'you have changed the set of files with translatable diagnostics;\n\ +apply the above patch\n' + # Verify that all source files using _() are listed in po/POTFILES.in. +po_file = po/POTFILES.in po-check: - @if test -f po/POTFILES.in; then \ - grep -E -v '^(#|$$)' po/POTFILES.in \ + @if test -f $(po_file); then \ + grep -E -v '^(#|$$)' $(po_file) \ | grep -v '^src/false\.c$$' | sort > $@-1; \ files=; \ for file in $$($(VC_LIST_EXCEPT)) lib/*.[ch]; do \ @@ -617,7 +622,8 @@ po-check: done; \ grep -E -l '\b(N?_|gettext *)\([^)"]*("|$$)' $$files \ | sort -u > $@-2; \ - diff -u $@-1 $@-2 || exit 1; \ + diff -u -L $(po_file) -L $(po_file) $@-1 $@-2 \ + || { printf '$(ME): '$(fix_po_file_diag) 1>&2; exit 1; }; \ rm -f $@-1 $@-2; \ fi |