summaryrefslogtreecommitdiff
path: root/Makefile.maint
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2006-09-09 15:58:36 +0000
committerJim Meyering <jim@meyering.net>2006-09-09 15:58:36 +0000
commit77d7a11b2f0851286fee1d33a70682390fb8ffdf (patch)
tree67c40cc400d1c11f9c533a14634da11432eb1eef /Makefile.maint
parent5feb482bc36021f0495326524c18c1c4af6ea7e2 (diff)
downloadcoreutils-77d7a11b2f0851286fee1d33a70682390fb8ffdf.tar.xz
* Makefile.maint (sc_require_config_h): Skip this test if there are no version-
controlled .c files.
Diffstat (limited to 'Makefile.maint')
-rw-r--r--Makefile.maint9
1 files changed, 6 insertions, 3 deletions
diff --git a/Makefile.maint b/Makefile.maint
index ef8a621a8..33643ee39 100644
--- a/Makefile.maint
+++ b/Makefile.maint
@@ -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: