mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
(po-check): Scan .l and .y files instead
of the .c and the .h files that they generate. Look for N_ as well as for _. Try to avoid matching #define for N_ and _.
This commit is contained in:
@@ -97,7 +97,16 @@ m4-check:
|
|||||||
po-check:
|
po-check:
|
||||||
if test -f po/POTFILES.in; then \
|
if test -f po/POTFILES.in; then \
|
||||||
grep -E -v '^(#|$$)' po/POTFILES.in | sort > $@-1; \
|
grep -E -v '^(#|$$)' po/POTFILES.in | sort > $@-1; \
|
||||||
grep -E -l '\b_\(' lib/*.[ch] src/*.[ch] | sort > $@-2; \
|
files=; \
|
||||||
|
for file in lib/*.[chly] src/*.[chly]; do \
|
||||||
|
case $$file in \
|
||||||
|
*.[ch]) \
|
||||||
|
base=`expr " $$file" : ' \(.*\)\..'`; \
|
||||||
|
{ test -f $$base.l || test -f $$base.y; } && continue;; \
|
||||||
|
esac; \
|
||||||
|
files="$$files $$file"; \
|
||||||
|
done; \
|
||||||
|
grep -E -l '\bN?_\([^)"]*("|$$)' $$files | sort > $@-2; \
|
||||||
diff -u $@-1 $@-2 || exit 1; \
|
diff -u $@-1 $@-2 || exit 1; \
|
||||||
rm -f $@-1 $@-2; \
|
rm -f $@-1 $@-2; \
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user