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>
echo "#ifndef __RTE_CONFIG_H"
echo "#define __RTE_CONFIG_H"
grep CONFIG_ $1 \
echo "#ifndef __RTE_CONFIG_H"
echo "#define __RTE_CONFIG_H"
grep CONFIG_ $1 \
| sed 's,CONFIG_\(.*\)=y.*$,#define \1 1,' \
| sed 's,CONFIG_\(.*\)=n.*$,#undef \1,' \
| sed 's,CONFIG_\(.*\)=\(.*\)$,#define \1 \2,' \
| sed 's,CONFIG_\(.*\)=y.*$,#define \1 1,' \
| sed 's,CONFIG_\(.*\)=n.*$,#undef \1,' \
| sed 's,CONFIG_\(.*\)=\(.*\)$,#define \1 \2,' \