[dpdk-dev,v2] mk: fix external build failure

Message ID 20180205154531.19913-1-marko.kovacevic@intel.com (mailing list archive)
State Accepted, archived
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Kovacevic, Marko Feb. 5, 2018, 3:45 p.m. UTC
  Code commit for 'make -f' support, breaks the build in cases where
entries in $(MAKEFILE_LIST) are absolute paths. This commit uses
notdir and firstword to ensure that only the local filename is used.

Fixes: 3a5c339d51a4 ("mk: support renamed Makefile in external project")

Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
---
 mk/internal/rte.extvars.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Thomas Monjalon Feb. 5, 2018, 10:39 p.m. UTC | #1
05/02/2018 16:45, Marko Kovacevic:
> Code commit for 'make -f' support, breaks the build in cases where
> entries in $(MAKEFILE_LIST) are absolute paths. This commit uses
> notdir and firstword to ensure that only the local filename is used.
> 
> Fixes: 3a5c339d51a4 ("mk: support renamed Makefile in external project")
> 
> Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>

Applied, thanks

(please ignore previous reply to v1, the applied version is v2)
  

Patch

diff --git a/mk/internal/rte.extvars.mk b/mk/internal/rte.extvars.mk
index 19594da..98c8606 100644
--- a/mk/internal/rte.extvars.mk
+++ b/mk/internal/rte.extvars.mk
@@ -20,7 +20,7 @@  ifeq ("$(origin M)", "command line")
 RTE_EXTMK := $(abspath $(M))
 endif
 endif
-RTE_EXTMK ?= $(RTE_SRCDIR)/$(firstword $(MAKEFILE_LIST))
+RTE_EXTMK ?= $(RTE_SRCDIR)/$(notdir $(firstword $(MAKEFILE_LIST)))
 export RTE_EXTMK
 
 # RTE_SDK_BIN must point to .config, include/ and lib/.