Mercurial > gnulib
diff top/maint.mk @ 13029:44ae789f77b0
maint.mk: prohibit inclusion of "intprops.h" without use
* top/maint.mk (sc_prohibit_intprops_without_use): New rule.
author | Jim Meyering <meyering@redhat.com> |
---|---|
date | Sun, 21 Mar 2010 14:53:34 +0100 |
parents | bedb32c7fa1b |
children | 04f53e0b1556 |
line wrap: on
line diff
--- a/top/maint.mk Sun Mar 21 20:16:38 2010 +0100 +++ b/top/maint.mk Sun Mar 21 14:53:34 2010 +0100 @@ -452,6 +452,19 @@ 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 \