From 0fb0ec0c7969a1379edbf0c3b9c26927b8ffd560 Mon Sep 17 00:00:00 2001
From: =?utf8?q?P=C3=A1draig=20Brady?=
Date: Wed, 24 Mar 2010 13:49:51 +0100
Subject: [PATCH] maint.mk (sc_Wundef_boolean): Skip test if no config.h.
Signed-off-by: Simon Josefsson
---
ChangeLog | 6 ++++++
top/maint.mk | 5 +++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 1d13895595..bbfecf941e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-03-23 Pádraig Brady (tiny change)
+
+ * maint.mk (sc_Wundef_boolean): Check for the presence of the
+ config header before grepping, as it's not present before
+ autoreconf/configure are run. Reported by Simon Josefsson.
+
2010-03-23 Bruno Haible
pt_chown: Make it work with automake < 1.11.
diff --git a/top/maint.mk b/top/maint.mk
index 67421f2bb2..09da20afc8 100644
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -766,8 +766,9 @@ sc_copyright_check:
# tests many undefined macros, and so we can't enable that option.
# So at least preclude common boolean strings as macro values.
sc_Wundef_boolean:
- @grep -Ei '^#define.*(yes|no|true|false)$$' '$(CONFIG_INCLUDE)' && \
- { echo 'Use 0 or 1 for macro values' 1>&2; exit 1; } || :
+ @test -e '$(CONFIG_INCLUDE)' && \
+ grep -Ei '^#define.*(yes|no|true|false)$$' '$(CONFIG_INCLUDE)' && \
+ { echo 'Use 0 or 1 for macro values' 1>&2; exit 1; } || :
sc_vulnerable_makefile_CVE-2009-4029:
@files=$$(find $(srcdir) -name Makefile.in); \
--
2.30.2