From 6af52f1134ff4d75fdac7ac88bcb4693643db9ca Mon Sep 17 00:00:00 2001 From: Bruce Richardson Date: Wed, 18 Jun 2014 21:33:06 +0100 Subject: [PATCH] scripts: fix filtering of config comments on bsd On BSD 10, the cpp binary behaves a little differently and often leaves lines starting with a space before the inital '#' character. This change ensures those lines are filtered out properly. Signed-off-by: Bruce Richardson Acked-by: Thomas Monjalon --- scripts/gen-config-h.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gen-config-h.sh b/scripts/gen-config-h.sh index 86b41ab66a..efd7667a15 100755 --- a/scripts/gen-config-h.sh +++ b/scripts/gen-config-h.sh @@ -34,7 +34,7 @@ echo "#ifndef __RTE_CONFIG_H" echo "#define __RTE_CONFIG_H" grep CONFIG_ $1 \ -| grep -v '^#' \ +| grep -v '^[ \t]*#' \ | sed 's,CONFIG_\(.*\)=y.*$,#define \1 1,' \ | sed 's,CONFIG_\(.*\)=n.*$,#undef \1,' \ | sed 's,CONFIG_\(.*\)=\(.*\)$,#define \1 \2,' \ -- 2.20.1