From: Intel Date: Wed, 19 Dec 2012 23:00:00 +0000 (+0100) Subject: mk: various updates X-Git-Tag: spdx-start~11414 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=2656baa8b78caf115213b9c4abdc2e296c5ed227;p=dpdk.git mk: various updates Signed-off-by: Intel --- diff --git a/mk/rte.module.mk b/mk/rte.module.mk index 277fc4e755..14b6fd0972 100644 --- a/mk/rte.module.mk +++ b/mk/rte.module.mk @@ -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 diff --git a/mk/rte.sdkconfig.mk b/mk/rte.sdkconfig.mk index 1334f6305c..ef22a98913 100644 --- a/mk/rte.sdkconfig.mk +++ b/mk/rte.sdkconfig.mk @@ -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 diff --git a/mk/target/generic/rte.vars.mk b/mk/target/generic/rte.vars.mk index 7c40898fe5..2f77d85280 100644 --- a/mk/target/generic/rte.vars.mk +++ b/mk/target/generic/rte.vars.mk @@ -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