buildtools: output build failure reason to stderr
[dpdk.git] / buildtools / gen-config-h.sh
1 #!/bin/sh
2 # SPDX-License-Identifier: BSD-3-Clause
3 # Copyright(c) 2010-2014 Intel Corporation
4
5 echo "#ifndef __RTE_CONFIG_H"
6 echo "#define __RTE_CONFIG_H"
7 grep CONFIG_ $1 |
8 grep -v '^[ \t]*#' |
9 sed 's,CONFIG_\(.*\)=y.*$,#undef \1\
10 #define \1 1,' |
11 sed 's,CONFIG_\(.*\)=n.*$,#undef \1,' |
12 sed 's,CONFIG_\(.*\)=\(.*\)$,#undef \1\
13 #define \1 \2,' |
14 sed 's,\# CONFIG_\(.*\) is not set$,#undef \1,'
15 echo "#endif /* __RTE_CONFIG_H */"