DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] scripts: fix symbol overriding in configuration files
@ 2014-11-27 11:29 David Marchand
  2014-11-27 18:17 ` Thomas Monjalon
  2014-11-28 11:35 ` [dpdk-dev] [PATCH] scripts: fix symbol overriding in configuration files Bruce Richardson
  0 siblings, 2 replies; 14+ messages in thread
From: David Marchand @ 2014-11-27 11:29 UTC (permalink / raw)
  To: dev

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 <david.marchand@6wind.com>
---
 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

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2014-11-28 16:06 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-27 11:29 [dpdk-dev] [PATCH] scripts: fix symbol overriding in configuration files David Marchand
2014-11-27 18:17 ` Thomas Monjalon
2014-11-28 13:56   ` Bruce Richardson
2014-11-28 14:06     ` David Marchand
2014-11-28 14:37       ` Bruce Richardson
2014-11-28 14:43       ` Bruce Richardson
2014-11-28 14:49         ` David Marchand
2014-11-28 14:59           ` Bruce Richardson
2014-11-28 15:41             ` David Marchand
2014-11-28 15:42               ` [dpdk-dev] [PATCH] scripts: fix newline character in sed expression David Marchand
2014-11-28 15:49                 ` Bruce Richardson
2014-11-28 16:05                   ` Thomas Monjalon
2014-11-28 14:35     ` [dpdk-dev] [PATCH] scripts: fix merged lines on FreeBSD in config.h Bruce Richardson
2014-11-28 11:35 ` [dpdk-dev] [PATCH] scripts: fix symbol overriding in configuration files Bruce Richardson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).