From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f52.google.com (mail-wg0-f52.google.com [74.125.82.52]) by dpdk.org (Postfix) with ESMTP id 8D5172A9 for ; Thu, 27 Nov 2014 12:29:11 +0100 (CET) Received: by mail-wg0-f52.google.com with SMTP id a1so6196686wgh.25 for ; Thu, 27 Nov 2014 03:29:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=EGF8EPmDVYG4cZGBvm2JpJvgM5brq7YfxavslKe2YnI=; b=hwLdTQQYnU2byetEBX5HkPrrVs65LNu5Hv0l9Ter/L48JzFJ+tQnNKCLobFGWweys1 3Nl3ZlZTyEg0AHvCoUiqgycY7bCBfJHh/pErRepe7CSY86l4+e/3n7j67dsmTf/khYSW TJWsX+jvocAgmYPf5x2nanxwGP7l4pHoJQBEVbuH+LAFLB8JkTdvnpwWOKIPOv4cpZJo rpyrLPt4b8sk5tOfIzsa/7B//JVyXQ4MsLoSg2pekbTYqZtfOn8pcywNMdSCR/GHTaBc u2zVY5noFM+Aiv9zJq5Rb53RJL1Xyj2MdbZh0NZPVuGKzu6ZmS7f6g1R4EerSPG2XT8l CJ4Q== X-Gm-Message-State: ALoCoQmq5840X+2lW6vcxr/EQzyWW/rLLRGjTuxTj/JiE5bjXM+Sy0UF2HPyyuDvqtFR0xacA7ps X-Received: by 10.180.95.37 with SMTP id dh5mr50658111wib.64.1417087751319; Thu, 27 Nov 2014 03:29:11 -0800 (PST) Received: from alcyon.dev.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by mx.google.com with ESMTPSA id ec2sm11185318wib.23.2014.11.27.03.29.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Nov 2014 03:29:10 -0800 (PST) From: David Marchand To: dev@dpdk.org Date: Thu, 27 Nov 2014 12:29:05 +0100 Message-Id: <1417087745-9004-1-git-send-email-david.marchand@6wind.com> X-Mailer: git-send-email 1.7.10.4 Subject: [dpdk-dev] [PATCH] scripts: fix symbol overriding in configuration files 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: Thu, 27 Nov 2014 11:29:11 -0000 When redefining the same symbol in configuration (basically after an inclusion), we need to undefine the previous symbol to avoid "redefined" errors. Signed-off-by: David Marchand --- scripts/gen-config-h.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/gen-config-h.sh b/scripts/gen-config-h.sh index efd7667..2fac08c 100755 --- a/scripts/gen-config-h.sh +++ b/scripts/gen-config-h.sh @@ -33,11 +33,11 @@ echo "#ifndef __RTE_CONFIG_H" echo "#define __RTE_CONFIG_H" -grep CONFIG_ $1 \ -| grep -v '^[ \t]*#' \ -| sed 's,CONFIG_\(.*\)=y.*$,#define \1 1,' \ -| sed 's,CONFIG_\(.*\)=n.*$,#undef \1,' \ -| sed 's,CONFIG_\(.*\)=\(.*\)$,#define \1 \2,' \ -| sed 's,\# CONFIG_\(.*\) is not set$,#undef \1,' +grep CONFIG_ $1 | +grep -v '^[ \t]*#' | +sed 's,CONFIG_\(.*\)=y.*$,#undef \1\n#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,' echo "#endif /* __RTE_CONFIG_H */" -- 1.7.10.4