From cad884a24545464cb42296834a8b5c02ee116379 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 15 Jun 2007 15:44:15 +0200 Subject: Don't include "quote.h" when it is not used. * src/md5sum.c: Remove unnecessary inclusion of "quote.h". * src/expr.c: Likewise. * src/shred.c: Likewise. * Makefile.maint (sc_prohibit_quote_without_use): New rule. * src/c99-to-c89.diff: Adjust offsets. --- Makefile.maint | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Makefile.maint') diff --git a/Makefile.maint b/Makefile.maint index ba5166b3d..bb666a4ad 100644 --- a/Makefile.maint +++ b/Makefile.maint @@ -179,6 +179,18 @@ sc_prohibit_quotearg_without_use: else :; \ fi +# Don't include quote.h unless you use one of its functions. +sc_prohibit_quote_without_use: + @if $(CVS_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \ + files=$$(grep -l '# *include "quote\.h"' \ + $$($(CVS_LIST_EXCEPT) | grep '\.c$$')) && \ + grep -LE '\&2; exit 1; } || :; \ + else :; \ + fi + sc_obsolete_symbols: @grep -nE '\<(HAVE''_FCNTL_H|O''_NDELAY)\>' \ $$($(CVS_LIST_EXCEPT)) && \ -- cgit v1.2.3-54-g00ecf