mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
Don't include "quotearg.h" when it is not used.
* Makefile.maint (sc_prohibit_quotearg_without_use): New rule. * src/cp.c: Don't include "quotearg.h". It wasn't used.
This commit is contained in:
1 parent
ae60d5bc4d
commit
a780166b41
3 files changed
+16
-1
No files matched your search
@@ -1,5 +1,9 @@
|
||||
2007-06-13 Jim Meyering <jim@meyering.net>
|
||||
|
||||
Don't include "quotearg.h" when it is not used.
|
||||
* Makefile.maint (sc_prohibit_quotearg_without_use): New rule.
|
||||
* src/cp.c: Don't include "quotearg.h". It wasn't used.
|
||||
|
||||
* README-hacking: List Gperf as a build-requirement, too.
|
||||
Reported by Steve Ward.
|
||||
|
||||
|
||||
@@ -167,6 +167,18 @@ sc_prohibit_assert_without_use:
|
||||
else :; \
|
||||
fi
|
||||
|
||||
# Don't include quotearg.h unless you use one of its functions.
|
||||
sc_prohibit_quotearg_without_use:
|
||||
@if $(CVS_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \
|
||||
files=$$(grep -l '# *include "quotearg\.h"' \
|
||||
$$($(CVS_LIST_EXCEPT) | grep '\.c$$')) && \
|
||||
grep -LE '\<quotearg(_[^ ]+)? \(' $$files \
|
||||
| grep . && \
|
||||
{ echo "$(ME): the above files include "quotearg.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)) && \
|
||||
|
||||
Reference in new issue
Block a user