summaryrefslogtreecommitdiff
path: root/Makefile.maint
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2007-06-15 15:44:15 +0200
committerJim Meyering <jim@meyering.net>2007-06-15 15:49:00 +0200
commitcad884a24545464cb42296834a8b5c02ee116379 (patch)
treeb07aa60e1d4c5a8d194a9448b9d77f0b473c071c /Makefile.maint
parent6a0dea3ca072d01342064f0421acc6b2c97c12f4 (diff)
downloadcoreutils-cad884a24545464cb42296834a8b5c02ee116379.tar.xz
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.
Diffstat (limited to 'Makefile.maint')
-rw-r--r--Makefile.maint12
1 files changed, 12 insertions, 0 deletions
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 '\<quote(_n)? \(' $$files \
+ | grep . && \
+ { echo "$(ME): the above files include "quote.h" but don't use it" \
+ 1>&2; exit 1; } || :; \
+ else :; \
+ fi
+
sc_obsolete_symbols:
@grep -nE '\<(HAVE''_FCNTL_H|O''_NDELAY)\>' \
$$($(CVS_LIST_EXCEPT)) && \