mk: avoid multiple inclusion of rte_config.h
authorIntel <intel.com>
Fri, 8 Nov 2013 02:00:00 +0000 (03:00 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 19 Nov 2013 15:20:09 +0000 (16:20 +0100)
Signed-off-by: Intel
lib/librte_eal/linuxapp/kni/Makefile
scripts/gen-config-h.sh

index 27410a6..30ce9a1 100644 (file)
@@ -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
index 1901ef3..b511b63 100755 (executable)
 #   (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 */"
+