From: Intel Date: Fri, 8 Nov 2013 02:00:00 +0000 (+0100) Subject: mk: avoid multiple inclusion of rte_config.h X-Git-Tag: spdx-start~11104 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=ac330305244d6842704082d6d0231b73526372a9;p=dpdk.git mk: avoid multiple inclusion of rte_config.h Signed-off-by: Intel --- diff --git a/lib/librte_eal/linuxapp/kni/Makefile b/lib/librte_eal/linuxapp/kni/Makefile index 27410a6f86..30ce9a1074 100644 --- a/lib/librte_eal/linuxapp/kni/Makefile +++ b/lib/librte_eal/linuxapp/kni/Makefile @@ -43,7 +43,6 @@ MODULE_CFLAGS += -I$(SRCDIR) --param max-inline-insns-single=50 MODULE_CFLAGS += -I$(RTE_OUTPUT)/include -I$(SRCDIR)/ethtool/ixgbe -I$(SRCDIR)/ethtool/igb MODULE_CFLAGS += -include $(RTE_OUTPUT)/include/rte_config.h MODULE_CFLAGS += -Wall -Werror -MODULE_CFLAGS += -include $(RTE_OUTPUT)/include/rte_config.h # this lib needs main eal DEPDIRS-y += lib/librte_eal/linuxapp/eal diff --git a/scripts/gen-config-h.sh b/scripts/gen-config-h.sh index 1901ef38ed..b511b63ef9 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 */" +