[dpdk-dev,v2] mk: support renamed Makefile in external project

Message ID 20180205095353.16245-1-marko.kovacevic@intel.com (mailing list archive)
State Not Applicable, 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, 9:53 a.m. UTC
  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>

---
V2
 - Changed the call of the make file a litte
   due to an issue reported by Olivier.
---
 mk/internal/rte.extvars.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Bruce Richardson Feb. 5, 2018, 10 a.m. UTC | #1
On Mon, Feb 05, 2018 at 09:53:53AM +0000, Marko Kovacevic wrote:
> 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>
> 
> ---
> V2
>  - Changed the call of the make file a litte
>    due to an issue reported by Olivier.
> ---
>  mk/internal/rte.extvars.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mk/internal/rte.extvars.mk b/mk/internal/rte.extvars.mk
> index 94f27e9..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)/Makefile
> +RTE_EXTMK ?= $(RTE_SRCDIR)/$(notdir $(firstword $(MAKEFILE_LIST)))
>  export RTE_EXTMK
>  
>  # RTE_SDK_BIN must point to .config, include/ and lib/.
> -- 
Since the V1 of the patch was already applied, I think this needs a new
patch on top of (i.e. fixing) the V1, rather than a V2 version.

/Bruce
  

Patch

diff --git a/mk/internal/rte.extvars.mk b/mk/internal/rte.extvars.mk
index 94f27e9..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)/Makefile
+RTE_EXTMK ?= $(RTE_SRCDIR)/$(notdir $(firstword $(MAKEFILE_LIST)))
 export RTE_EXTMK
 
 # RTE_SDK_BIN must point to .config, include/ and lib/.