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 <bruce.richardson@intel.com> Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
This commit is contained in:
parent
f1445721a9
commit
6af52f1134
@ -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,' \
|
||||
|
Loading…
Reference in New Issue
Block a user