Eric Blake wrote: > This syntax check needs to reflect commit 8cc0fee and following. > > * top/maint.mk (_intprops_names): Match recent changes. > > Signed-off-by: Eric Blake <ebl...@redhat.com> > --- > > I found this by accident when 'make syntax-check' started failing > on libvirt due to a single use of INT_MULTIPLY_OVERFLOW. > > ChangeLog | 5 +++++ > top/maint.mk | 10 ++++++++-- > 2 files changed, 13 insertions(+), 2 deletions(-) > > diff --git a/ChangeLog b/ChangeLog > index 86cde24..2ce487c 100644 > --- a/ChangeLog > +++ b/ChangeLog > @@ -1,3 +1,8 @@ > +2011-06-24 Eric Blake <ebl...@redhat.com> > + > + maint.mk: update sc_prohibit_intprops_without_use > + * top/maint.mk (_intprops_names): Match recent changes. ...
Thanks! We can avoid a repeat of that, at least for one file, now, with this gnulib syntax-check rule: >From 2afabab6d320363e660c5b200e21a13654d15dee Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyer...@redhat.com> Date: Fri, 24 Jun 2011 20:52:00 +0200 Subject: [PATCH] syntax-check: keep one maint.mk rule in sync with its header * Makefile (sc_check_sym_list): Add a rule to prevent recurrence, at least for intprops.h. I prefer to avoid temporary files here, so use <(...), but that is not supported by /bin/sh, so... (SHELL): Define to /bin/bash. --- ChangeLog | 9 +++++++++ Makefile | 13 +++++++++++++ 2 files changed, 22 insertions(+), 0 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2ce487c..006317e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2011-06-24 Jim Meyering <meyer...@redhat.com> + + syntax-check: keep one maint.mk rule in sync with its header + * Makefile (sc_check_sym_list): Add a rule to prevent recurrence, + at least for intprops.h. + I prefer to avoid temporary files here, so use <(...), but that + is not supported by /bin/sh, so... + (SHELL): Define to /bin/bash. + 2011-06-24 Eric Blake <ebl...@redhat.com> maint.mk: update sc_prohibit_intprops_without_use diff --git a/Makefile b/Makefile index 5dda3b5..0da864c 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,9 @@ # This Makefile requires the use of GNU make. Some targets require # that you have tools like git, makeinfo and cppi installed. +# Required for the use of <(...) below. +SHELL=/bin/bash + # Produce some files that are not stored in the repository. all: @@ -95,6 +98,16 @@ sc_cpp_indent_check: | grep -v '/getloadavg\.c$$' \ | xargs cppi -c +# Ensure that the list of symbols checked for by the +# sc_prohibit_intprops_without_use rule match those in the actual file. +# Extract the symbols from the .h file and compare with the list of +# symbols extracted from the rule in maint.mk. +sc_check_sym_list: + i=lib/intprops.h; \ + diff -u <(perl -lne '/^# *define ([A-Z]\w+)\(/ and print $$1' $$i|fmt) \ + <(sed -n /^_intprops_name/,/^_intprops_syms_re/p top/maint.mk \ + |sed '/^_/d;s/^ //;s/ *\\$$//') + # Regenerate some files that are stored in the repository. regen: MODULES.html -- 1.7.6.rc2.302.gc2115