Hi Jim. On Monday 13 June 2011, Jim Meyering wrote: > > Thanks for the list. > Once you've applied your 300+ changes, > I'll make sure that this rule passes: > > From 4246fedf03280c5876fe90ffba8f9722218be61d Mon Sep 17 00:00:00 2001 > From: Jim Meyering <[email protected]> > Date: Mon, 13 Jun 2011 18:01:47 +0200 > Subject: [PATCH] syntax-check: add a rule to help enforce the > no-AC_LIBOBJ-in-m4/ policy > > * Makefile (sc_prohibit_AC_LIBOBJ_in_m4): New rule. > --- > ChangeLog | 5 +++++ > Makefile | 38 +++++++++++++++++++++++++++++++++----- > 2 files changed, 38 insertions(+), 5 deletions(-) > > diff --git a/ChangeLog b/ChangeLog > index 19a3dff..ff58b67 100644 > --- a/ChangeLog > +++ b/ChangeLog > @@ -1,3 +1,8 @@ > +2011-06-13 Jim Meyering <[email protected]> > + > + syntax-check: add a rule to help enforce the no-AC_LIBOBJ-in-m4/ policy > + * Makefile (sc_prohibit_AC_LIBOBJ_in_m4): New rule. > + > 2011-06-13 Bruno Haible <[email protected]> > > gnulib-tool: Addendum to 2011-06-08 commit. > diff --git a/Makefile b/Makefile > index c9bfc16..5191230 100644 > --- a/Makefile > +++ b/Makefile > @@ -29,12 +29,40 @@ sc_prefer_ac_check_funcs_once: > in modules/ 1>&2; exit 1; } || : \ > else :; fi > > -sc_prohibit_augmenting_PATH_via_TESTS_ENVIRONMENT: > Maybe this is a stupid question, but why are you removing the `sc_prohibit_augmenting_PATH_via_TESTS_ENVIRONMENT' check here (and its rules below)? If this is intended, it should be mentioned in the ChangeLog IMHO.
> +# Files in m4/ that (exceptionally) may use AC_LIBOBJ. > +# Do not include their ".m4" suffix. > +allow_AC_LIBOBJ = \ > + close \ > + dprintf \ > + dup2 \ > + faccessat \ > + fchdir \ > + fclose \ > + fcntl \ > + fprintf-posix \ > + open \ > + printf-posix \ > + snprintf \ > + sprintf-posix \ > + stdio_h \ > + vasnprintf \ > + vasprintf \ > + vdprintf \ > + vfprintf-posix \ > + vprintf-posix \ > + vsnprintf \ > + vsprintf-posix > + > +allow_AC_LIBOBJ_or := $(shell echo $(allow_AC_LIBOBJ) | tr -s ' ' '|') > + > +sc_prohibit_AC_LIBOBJ_in_m4: > + url=http://article.gmane.org/gmane.comp.lib.gnulib.bugs/26995; \ > if test -d .git; then \ > - url=http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/22874; \ > - git grep '^[ ]*TESTS_ENVIRONMENT += PATH=' modules \ > - && { printf '%s\n' 'Do not augment PATH via TESTS_ENVIRONMENT;' \ > - " see <$$url>" 1>&2; exit 1; } || : \ > + git ls-files m4 \ > + | grep -Ev '^m4/($(allow_AC_LIBOBJ_or))\.m4$$' \ > + | xargs grep -w AC_LIBOBJ \ > + && { printf '%s\n' 'Do not use AC_LIBOBJ in m4/*.m4;' \ > + "see <$$url>"; exit 1; } || :; \ > else :; fi > > sc_pragma_columns: > -- > 1.7.6.rc0.293.g40857 > > Regards, Stefano
