[dpdk-dev] [PATCH 3/4] scripts: fix filtering of comments on bsd

Bruce Richardson bruce.richardson at intel.com
Wed Jun 18 22:33:06 CEST 2014


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 at intel.com>
---
 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 86b41ab..efd7667 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,'			 \
-- 
1.9.3



More information about the dev mailing list