From: Bruce Richardson Date: Wed, 18 Jun 2014 20:33:06 +0000 (+0100) Subject: scripts: fix filtering of config comments on bsd X-Git-Tag: spdx-start~10627 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=6af52f1134ff4d75fdac7ac88bcb4693643db9ca;p=dpdk.git 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 --- 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,' \