On 24/03/10 08:56, Simon Josefsson wrote: > This syntax-check warning appears to fail: > > j...@mocca:~/src/libidn master$ make sc_Wundef_boolean > Wundef_boolean > grep: : No such file or directory > j...@mocca:~/src/libidn master$ > > Any reason we can't use the normal VC_LIST_EXCEPT instead? It will > check more files than just config.h. Alternatively, use VC_LIST_EXCEPT > as a fall back if CONFIG_INCLUDE is not available, which happens when > autoreconf/configure haven't been run yet.
I'd rather restrict it to the config header as the matching expression is quite general. The attached patch just skips the check if the config header is not present. cheers, Pádraig.
>From ced12976abdfb215d99edd4a60ab9d158c255544 Mon Sep 17 00:00:00 2001 From: =?utf-8?q?P=C3=A1draig=20Brady?= <p...@draigbrady.com> Date: Wed, 24 Mar 2010 11:33:40 +0000 Subject: [PATCH] maint.mk: suppress a warning from sc_Wundef_boolean * 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 --- top/maint.mk | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/top/maint.mk b/top/maint.mk index 7d84b6c..6081852 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -746,8 +746,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); \ -- 1.6.2.5