From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bruce Richardson Subject: [PATCH 3/4] scripts: fix filtering of comments on bsd Date: Wed, 18 Jun 2014 21:33:06 +0100 Message-ID: <1403123587-27433-4-git-send-email-bruce.richardson@intel.com> References: <1403123587-27433-1-git-send-email-bruce.richardson@intel.com> To: dev-VfR2kkLFssw@public.gmane.org Return-path: In-Reply-To: <1403123587-27433-1-git-send-email-bruce.richardson-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 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 --- 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