]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
* Makefile.maint (sc_prohibit_assert_without_use): Likewise.
authorJim Meyering <jim@meyering.net>
Sat, 9 Sep 2006 16:18:57 +0000 (16:18 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 9 Sep 2006 16:18:57 +0000 (16:18 +0000)
ChangeLog
Makefile.maint

index 5739850ee67f9fba09921eb23fb5d03debd32888..4896c20fced8b1504e7c495d87d2377ff621a847 100644 (file)
--- 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>
 
index 33643ee3902c22c436e6452265973e6041bb2c5e..06f5b2764024602ad3790c28bccdc0297a388a11 100644 (file)
@@ -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)\>'                     \