From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id C7FC85927 for ; Fri, 28 Nov 2014 15:35:56 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 28 Nov 2014 06:35:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,477,1413270000"; d="scan'208";a="639584052" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga002.fm.intel.com with ESMTP; 28 Nov 2014 06:35:54 -0800 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id sASEZsRQ008603; Fri, 28 Nov 2014 14:35:54 GMT Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id sASEZs4L010531; Fri, 28 Nov 2014 14:35:54 GMT Received: (from bricha3@localhost) by sivswdev01.ir.intel.com with id sASEZsId010527; Fri, 28 Nov 2014 14:35:54 GMT From: Bruce Richardson To: dev@dpdk.org Date: Fri, 28 Nov 2014 14:35:54 +0000 Message-Id: <1417185354-10494-1-git-send-email-bruce.richardson@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <20141128135604.GB5828@bricha3-MOBL3> References: <20141128135604.GB5828@bricha3-MOBL3> Subject: [dpdk-dev] [PATCH] scripts: fix merged lines on FreeBSD in config.h X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Nov 2014 14:35:57 -0000 Since commit 0a91453d, "Fix symbol overriding in configuration", the rte_config.h can have two lines generated for a single directive to enable a feature - one line to undef the feature value, and a second to enable or set the new value. On FreeBSD, sed inserts an "n" char instead of the "\n" carriage return, leading to compiler errors. This patch fixes that by having sed insert a "$" character instead of attempting a "\n", and then using tr subsequently to turn "$" characters into real "\n" characters. Signed-off-by: Bruce Richardson --- scripts/gen-config-h.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/gen-config-h.sh b/scripts/gen-config-h.sh index 2fac08c..647bf4b 100755 --- a/scripts/gen-config-h.sh +++ b/scripts/gen-config-h.sh @@ -35,9 +35,10 @@ echo "#ifndef __RTE_CONFIG_H" echo "#define __RTE_CONFIG_H" grep CONFIG_ $1 | grep -v '^[ \t]*#' | -sed 's,CONFIG_\(.*\)=y.*$,#undef \1\n#define \1 1,' | +sed 's,CONFIG_\(.*\)=y.*$,#undef \1$#define \1 1,' | sed 's,CONFIG_\(.*\)=n.*$,#undef \1,' | -sed 's,CONFIG_\(.*\)=\(.*\)$,#undef \1\n#define \1 \2,' | -sed 's,\# CONFIG_\(.*\) is not set$,#undef \1,' +sed 's,CONFIG_\(.*\)=\(.*\)$,#undef \1$#define \1 \2,' | +sed 's,\# CONFIG_\(.*\) is not set$,#undef \1,' | +tr '$' '\n' echo "#endif /* __RTE_CONFIG_H */" -- 2.1.0