* top/maint.mk (sc_makefile_at_at_check): Enhance check to cover
lower case, like @top_srcdir@.

Signed-off-by: Eric Blake <[email protected]>
---

Any objections to this?  I noticed that libvirt had a mix
of $(top_srcdir) and @top_srcdir@ in the same variable, and
traced it to a weak syntax check not catching the difference.

 ChangeLog    |    6 ++++++
 top/maint.mk |    4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 9c5a3cd..c8a8a99 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-02-02  Eric Blake  <[email protected]>
+
+       maint.mk: also prohibit lower-case @var@
+       * top/maint.mk (sc_makefile_at_at_check): Enhance check to cover
+       lower case, like @top_srcdir@.
+
 2012-02-02  Jim Meyering  <[email protected]>

        file-has-acl: suppress a warning from gcc -Wsuggest-attribute=const
diff --git a/top/maint.mk b/top/maint.mk
index be7ba49..b21e884 100644
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -1015,8 +1015,8 @@ update-NEWS-hash: NEWS
 # setting this to ' && !/PRAGMA_SYSTEM_HEADER/'.
 _makefile_at_at_check_exceptions ?=
 sc_makefile_at_at_check:
-       @perl -ne '/\@[A-Z_0-9]+\@/'                                    \
-          -e ' && !/([A-Z_0-9]+)\s+=.*\@\1\@$$/'                       \
+       @perl -ne '/\@[A-Za-z_0-9]+\@/'                                 \
+          -e ' && !/([A-Za-z_0-9]+)\s+=.*\@\1\@$$/'                    \
           -e ''$(_makefile_at_at_check_exceptions)                     \
          -e 'and (print "$$ARGV:$$.: $$_"), $$m=1; END {exit !$$m}'    \
            $$($(VC_LIST_EXCEPT) | grep -E '(^|/)(Makefile\.am|[^/]+\.mk)$$') \
-- 
1.7.7.6


Reply via email to