diff options
author | Jim Meyering <meyering@redhat.com> | 2010-03-21 14:53:34 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2010-03-21 20:45:49 +0100 |
commit | 1041a5d44471b8efef2751d8a962080729c88b5b (patch) | |
tree | 1938aebcf2f3af461fd5c9275758df7836f21bd3 /top | |
parent | aeca137662d6d2a7eaade72667ace75322872254 (diff) | |
download | gnulib-1041a5d44471b8efef2751d8a962080729c88b5b.tar.gz |
maint.mk: prohibit inclusion of "intprops.h" without use
* top/maint.mk (sc_prohibit_intprops_without_use): New rule.
Diffstat (limited to 'top')
-rw-r--r-- | top/maint.mk | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/top/maint.mk b/top/maint.mk index 7d84b6c3b5..d2248d8faf 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -452,6 +452,19 @@ sc_prohibit_signal_without_use: re='\<($(_sig_function_re)) *\(|\<($(_sig_syms_re))\>' \ $(_header_without_use) +# Get the list of symbol names with this: +# perl -lne '/^# *define (\w+)\(/ and print $1' lib/intprops.h|grep -v '^s'|fmt +_intprops_names = \ + TYPE_IS_INTEGER TYPE_TWOS_COMPLEMENT TYPE_ONES_COMPLEMENT \ + TYPE_SIGNED_MAGNITUDE TYPE_SIGNED TYPE_MINIMUM TYPE_MAXIMUM \ + INT_STRLEN_BOUND INT_BUFSIZE_BOUND +_intprops_syms_re = $(subst $(_sp),|,$(strip $(_intprops_names))) +# Prohibit the inclusion of intprops.h without an actual use. +sc_prohibit_intprops_without_use: + @h='"intprops.h"' \ + re='\<($(_intprops_syms_re)) *\(' \ + $(_header_without_use) + sc_obsolete_symbols: @re='\<(HAVE''_FCNTL_H|O''_NDELAY)\>' \ msg='do not use HAVE''_FCNTL_H or O'_NDELAY \ |