Mercurial > gnulib
diff top/maint.mk @ 16988:ef9bd8b01585
maint.mk: new syntax check for HAVE_DECL checks
Based on Karel's report, we might as well enforce a syntax check
to help avoid future problems.
https://lists.gnu.org/archive/html/coreutils/2012-06/msg00037.html
Exempt a few files that still get picked up in the wild rather
than as a full gnulib module with m4 files.
* top/maint.mk (sc_prohibit_defined_have_decl_tests): New rule.
* cfg.mk
(exclude_file_name_regexp--sc_prohibit_defined_have_decl_tests):
Exempt some false positives.
Based on a report by Karel Zak.
Signed-off-by: Eric Blake <eblake@redhat.com>
author | Eric Blake <eblake@redhat.com> |
---|---|
date | Fri, 13 Jul 2012 14:02:05 -0600 |
parents | 1346cf3efb4d |
children | 81ef433b3596 |
line wrap: on
line diff
--- a/top/maint.mk Fri Jul 13 11:50:59 2012 -0600 +++ b/top/maint.mk Fri Jul 13 14:02:05 2012 -0600 @@ -777,6 +777,11 @@ ' with the corresponding gnulib module, they are always true') \ $(_sc_search_regexp) +sc_prohibit_defined_have_decl_tests: + prohibit='#[ ]*if(n?def|.*\<defined)\>[ (]+HAVE_DECL_' \ + halt='$(ME): HAVE_DECL macros are always defined' \ + $(_sc_search_regexp) + # ================================================================== gl_other_headers_ ?= \ intprops.h \