mk: support renamed Makefile in external project
authorMarko Kovacevic <marko.kovacevic@intel.com>
Mon, 22 Jan 2018 10:59:05 +0000 (10:59 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 30 Jan 2018 23:43:23 +0000 (00:43 +0100)
The build system made a recursive call to "make" after
creating the build directory. This recursive call used
the hard-coded filename "Makefile", which prevented
builds from working if the file was renamed and make
called using "make -f". Taking the filename from
MAKEFILES_LIST make variable fixes this.

Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
Acked-by: Vipin Varghese <vipin.varghese@intel.com>
mk/internal/rte.extvars.mk

index 94f27e9..19594da 100644 (file)
@@ -20,7 +20,7 @@ ifeq ("$(origin M)", "command line")
 RTE_EXTMK := $(abspath $(M))
 endif
 endif
-RTE_EXTMK ?= $(RTE_SRCDIR)/Makefile
+RTE_EXTMK ?= $(RTE_SRCDIR)/$(firstword $(MAKEFILE_LIST))
 export RTE_EXTMK
 
 # RTE_SDK_BIN must point to .config, include/ and lib/.