mk: various updates
authorIntel <intel.com>
Wed, 19 Dec 2012 23:00:00 +0000 (00:00 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 25 Jul 2013 13:01:57 +0000 (15:01 +0200)
Signed-off-by: Intel
mk/rte.module.mk
mk/rte.sdkconfig.mk
mk/target/generic/rte.vars.mk

index 277fc4e..14b6fd0 100644 (file)
@@ -72,7 +72,7 @@ build: _postbuild
 # Link all sources in build directory
 %_link: FORCE
        $(if $(call compare,$(notdir $*),$*),\
-       @if [ ! -f $(notdir $(*)) ]; then ln -nfs $(*) . ; fi,\
+       @if [ ! -f $(notdir $(*)) ]; then ln -nfs $(SRCDIR)/$(*) . ; fi,\
        @if [ ! -f $(notdir $(*)) ]; then ln -nfs $(SRCDIR)/$(*) . ; fi)
 
 # build module
index 1334f63..ef22a98 100644 (file)
@@ -55,9 +55,16 @@ else
 $(RTE_OUTPUT)/.config: $(RTE_CONFIG_TEMPLATE) FORCE
        @[ -d $(RTE_OUTPUT) ] || mkdir -p $(RTE_OUTPUT)
        $(Q)if [ "$(RTE_CONFIG_TEMPLATE)" != "" -a -f "$(RTE_CONFIG_TEMPLATE)" ]; then \
-               if ! cmp -s $(RTE_CONFIG_TEMPLATE) $(RTE_OUTPUT)/.config; then \
-                       cp $(RTE_CONFIG_TEMPLATE) $(RTE_OUTPUT)/.config ; \
+               if grep -q '#include' $(RTE_CONFIG_TEMPLATE) ; then \
+                       $(CPP) -undef -C -P -x assembler-with-cpp -fdirectives-only \
+                       -o $(RTE_OUTPUT)/.config_tmp $(RTE_CONFIG_TEMPLATE) ; \
+               else \
+                       cp $(RTE_CONFIG_TEMPLATE) $(RTE_OUTPUT)/.config_tmp ; \
                fi ; \
+               if ! cmp -s $(RTE_OUTPUT)/.config_tmp $(RTE_OUTPUT)/.config; then \
+                       cp $(RTE_OUTPUT)/.config_tmp $(RTE_OUTPUT)/.config ; \
+               fi ; \
+               rm -f $(RTE_OUTPUT)/.config_tmp ; \
        else \
                echo -n "No template specified. Use T=template " ; \
                echo "among the following list:" ; \
@@ -83,7 +90,7 @@ $(RTE_OUTPUT)/Makefile:
 $(RTE_OUTPUT)/include/rte_config.h: $(RTE_OUTPUT)/.config
        $(Q)rm -rf $(RTE_OUTPUT)/include $(RTE_OUTPUT)/app \
                $(RTE_OUTPUT)/hostapp $(RTE_OUTPUT)/lib \
-               $(RTE_OUTPUT)/hostlib
+               $(RTE_OUTPUT)/hostlib $(RTE_OUTPUT)/kmod $(RTE_OUTPUT)/build
        @[ -d $(RTE_OUTPUT)/include ] || mkdir -p $(RTE_OUTPUT)/include
        $(Q)$(RTE_SDK)/scripts/gen-config-h.sh $(RTE_OUTPUT)/.config \
                > $(RTE_OUTPUT)/include/rte_config.h
index 7c40898..2f77d85 100644 (file)
@@ -127,7 +127,7 @@ ifeq ($(BUILDING_RTE_SDK),1)
 # building sdk
 CFLAGS += -include $(RTE_OUTPUT)/include/rte_config.h
 ifeq ($(CONFIG_RTE_INSECURE_FUNCTION_WARNING),y)
-CFLAGS += -include $(RTE_OUTPUT)/include/rte_warnings.h
+CFLAGS += -include rte_warnings.h
 endif
 else
 # if we are building an external application, include SDK's lib and
@@ -138,7 +138,7 @@ CFLAGS += -include $(RTE_OUTPUT)/include/rte_config.h
 endif
 CFLAGS += -include $(RTE_SDK_BIN)/include/rte_config.h
 ifeq ($(CONFIG_RTE_INSECURE_FUNCTION_WARNING),y)
-CFLAGS += -include $(RTE_SDK_BIN)/include/rte_warnings.h
+CFLAGS += -include rte_warnings.h
 endif
 LDFLAGS += -L$(RTE_SDK_BIN)/lib
 endif