scripts: fix symbol overriding in configuration
[dpdk.git] / scripts / gen-config-h.sh
index efd7667..2fac08c 100755 (executable)
 
 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 */"