summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2006-09-09 16:18:57 +0000
committerJim Meyering <jim@meyering.net>2006-09-09 16:18:57 +0000
commit6f2530cf3a9d58707b80872e8418772e5bf0c395 (patch)
treee0282a27065d0c7bd74f97bb1d178c391dbd4e9e
parent77d7a11b2f0851286fee1d33a70682390fb8ffdf (diff)
downloadcoreutils-6f2530cf3a9d58707b80872e8418772e5bf0c395.tar.xz
* Makefile.maint (sc_prohibit_assert_without_use): Likewise.
-rw-r--r--ChangeLog1
-rw-r--r--Makefile.maint13
2 files changed, 9 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 5739850ee..4896c20fc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@
are no .m4 files.
(sc_require_config_h): Skip this test if there are no version-
controlled .c files.
+ (sc_prohibit_assert_without_use): Likewise.
2006-09-08 Jim Meyering <jim@meyering.net>
diff --git a/Makefile.maint b/Makefile.maint
index 33643ee39..06f5b2764 100644
--- a/Makefile.maint
+++ b/Makefile.maint
@@ -158,12 +158,15 @@ sc_require_config_h:
# Prohibit the inclusion of assert.h without an actual use of assert.
sc_prohibit_assert_without_use:
- @files=$$(grep -l '# *include <assert\.h>' \
+ @if $(CVS_LIST_EXCEPT) | grep '\.c$$'; then \
+ files=$$(grep -l '# *include <assert\.h>' \
$$($(CVS_LIST_EXCEPT) | grep '\.c$$')) && \
- grep -L '\<assert (' $$files \
- | grep . && \
- { echo "$(ME): the above files include <assert.h> but don't use it" \
- 1>&2; exit 1; } || :
+ grep -L '\<assert (' $$files \
+ | grep . && \
+ { echo "$(ME): the above files include <assert.h> but don't use it" \
+ 1>&2; exit 1; } || :; \
+ else :; \
+ fi
sc_obsolete_symbols:
@grep -nE '\<(HAVE''_FCNTL_H|O''_NDELAY)\>' \