summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDavid Marchand <david.marchand@6wind.com>2014-11-27 12:29:05 +0100
committerThomas Monjalon <thomas.monjalon@6wind.com>2014-11-27 19:12:43 +0100
commit0a91453deb71af27db59b8c07a8959dd162d2954 (patch)
tree7e840cb767f73f3c3759dfc364aae22d5b61ca08 /scripts
parentd07180f211c08a0486cbc2e6ada074500674375e (diff)
downloaddpdk-0a91453deb71af27db59b8c07a8959dd162d2954.zip
dpdk-0a91453deb71af27db59b8c07a8959dd162d2954.tar.gz
dpdk-0a91453deb71af27db59b8c07a8959dd162d2954.tar.xz
scripts: fix symbol overriding in configuration
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> Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/gen-config-h.sh12
1 files 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 */"