]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
* Makefile.maint (sc_require_config_h): Skip this test if there are no version-
authorJim Meyering <jim@meyering.net>
Sat, 9 Sep 2006 15:58:36 +0000 (15:58 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 9 Sep 2006 15:58:36 +0000 (15:58 +0000)
controlled .c files.

ChangeLog
Makefile.maint

index 396779cc56c56b8ee2781750fa5811511b3250c3..5739850ee67f9fba09921eb23fb5d03debd32888 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,8 @@
 
        * Makefile.maint (sc_prohibit_jm_in_m4): Don't hang when there
        are no .m4 files.
+       (sc_require_config_h): Skip this test if there are no version-
+       controlled .c files.
 
 2006-09-08  Jim Meyering  <jim@meyering.net>
 
index ef8a621a8662e655c0bb28c86b6a0747b6054d7c..33643ee3902c22c436e6452265973e6041bb2c5e 100644 (file)
@@ -147,11 +147,14 @@ sc_no_have_config_h:
 
 # Nearly all .c files must include <config.h>.
 sc_require_config_h:
-       @grep -L '^# *include <config\.h>'                              \
+       @if $(CVS_LIST_EXCEPT) | grep '\.c$$'; then                     \
+         grep -L '^# *include <config\.h>'                             \
                $$($(CVS_LIST_EXCEPT) | grep '\.c$$')                   \
-           | grep . &&                                                 \
+             | grep . &&                                               \
          { echo '$(ME): the above files do not include <config.h>'     \
-               1>&2; exit 1; } || :
+               1>&2; exit 1; } || :;                                   \
+       else :;                                                         \
+       fi
 
 # Prohibit the inclusion of assert.h without an actual use of assert.
 sc_prohibit_assert_without_use: