summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorIntel <intel.com>2013-11-08 03:00:00 +0100
committerThomas Monjalon <thomas.monjalon@6wind.com>2013-11-19 16:20:09 +0100
commitac330305244d6842704082d6d0231b73526372a9 (patch)
treefa63a8998b834e7bf543c37c16fcf780eebe80f8 /scripts
parentdcae8715b8b712e349ea257b42a2b7677994ed58 (diff)
downloaddpdk-ac330305244d6842704082d6d0231b73526372a9.zip
dpdk-ac330305244d6842704082d6d0231b73526372a9.tar.gz
dpdk-ac330305244d6842704082d6d0231b73526372a9.tar.xz
mk: avoid multiple inclusion of rte_config.h
Signed-off-by: Intel
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/gen-config-h.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/gen-config-h.sh b/scripts/gen-config-h.sh
index 1901ef3..b511b63 100755
--- a/scripts/gen-config-h.sh
+++ b/scripts/gen-config-h.sh
@@ -31,9 +31,13 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+echo "#ifndef __RTE_CONFIG_H"
+echo "#define __RTE_CONFIG_H"
grep CONFIG_ $1 \
| grep -v '^#' \
| 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,'
+echo "#endif /* __RTE_CONFIG_H */"
+