Mercurial > hg > octave-lojdl > gnulib-hg
comparison top/maint.mk @ 14433:00046711b6a6
maint.mk: let po check work in VPATH build
* top/maint.mk (po_file): Allow cfg.mk override.
(sc_po_check): Allow VPATH use.
Reported by Jiri Denemark.
Signed-off-by: Eric Blake <eblake@redhat.com>
author | Eric Blake <eblake@redhat.com> |
---|---|
date | Fri, 18 Mar 2011 15:32:24 -0600 |
parents | dcc1567d7f4e |
children | d88b3ec1ad85 |
comparison
equal
deleted
inserted
replaced
14432:dcc1567d7f4e | 14433:00046711b6a6 |
---|---|
953 fix_po_file_diag = \ | 953 fix_po_file_diag = \ |
954 'you have changed the set of files with translatable diagnostics;\n\ | 954 'you have changed the set of files with translatable diagnostics;\n\ |
955 apply the above patch\n' | 955 apply the above patch\n' |
956 | 956 |
957 # Verify that all source files using _() are listed in po/POTFILES.in. | 957 # Verify that all source files using _() are listed in po/POTFILES.in. |
958 po_file = po/POTFILES.in | 958 po_file ?= $(srcdir)/po/POTFILES.in |
959 sc_po_check: | 959 sc_po_check: |
960 @if test -f $(po_file); then \ | 960 @if test -f $(po_file); then \ |
961 grep -E -v '^(#|$$)' $(po_file) \ | 961 grep -E -v '^(#|$$)' $(po_file) \ |
962 | grep -v '^src/false\.c$$' | sort > $@-1; \ | 962 | grep -v '^src/false\.c$$' | sort > $@-1; \ |
963 files=; \ | 963 files=; \ |
964 for file in $$($(VC_LIST_EXCEPT)) lib/*.[ch]; do \ | 964 for file in $$($(VC_LIST_EXCEPT)) $(srcdir)lib/*.[ch]; do \ |
965 test -r $$file || continue; \ | 965 test -r $$file || continue; \ |
966 case $$file in \ | 966 case $$file in \ |
967 *.m4|*.mk) continue ;; \ | 967 *.m4|*.mk) continue ;; \ |
968 *.?|*.??) ;; \ | 968 *.?|*.??) ;; \ |
969 *) continue;; \ | 969 *) continue;; \ |
974 { test -f $$base.l || test -f $$base.y; } && continue;; \ | 974 { test -f $$base.l || test -f $$base.y; } && continue;; \ |
975 esac; \ | 975 esac; \ |
976 files="$$files $$file"; \ | 976 files="$$files $$file"; \ |
977 done; \ | 977 done; \ |
978 grep -E -l '\b(N?_|gettext *)\([^)"]*("|$$)' $$files \ | 978 grep -E -l '\b(N?_|gettext *)\([^)"]*("|$$)' $$files \ |
979 | sort -u > $@-2; \ | 979 | sort -u | sed 's|^$(_dot_escaped_srcdir)/||' > $@-2; \ |
980 diff -u -L $(po_file) -L $(po_file) $@-1 $@-2 \ | 980 diff -u -L $(po_file) -L $(po_file) $@-1 $@-2 \ |
981 || { printf '$(ME): '$(fix_po_file_diag) 1>&2; exit 1; }; \ | 981 || { printf '$(ME): '$(fix_po_file_diag) 1>&2; exit 1; }; \ |
982 rm -f $@-1 $@-2; \ | 982 rm -f $@-1 $@-2; \ |
983 fi | 983 fi |
984 | 984 |