mk: support building with renamed makefile
PATCH 1/1 mk: support building with renamed makefile
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.
--- mk/internal/rte.extvars.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mk/internal/rte.extvars.mk +1 -1
@@ -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/.
Signature · 1 line
2.9.5
Quoted 32 lines
-----Original Message-----
From: Kovacevic, Marko
Sent: Monday, January 22, 2018 4:29 PM
To: [email protected]
Cc: [email protected]; Varghese, Vipin <[email protected]>; Kovacevic, Marko <[email protected]>; [email protected]
Subject: [PATCH v1] mk: support building with renamed makefileThe 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 fromMAKEFILES_LISTmake variable fixes this.Fixes af75078fece3 ("first public release")Signed-off-by Marko Kovacevic <[email protected]>--- mk/internal/rte.extvars.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)mk/internal/rte.extvars.mk index renamed from mk/internal/rte.extvars.mk +0
-094f27e9..19594da 100644
mk/internal/rte.extvars.mk +0
-0@@ -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))
exportRTE_EXTMK
Quoted 3 lines
#
RTE_SDK_BINmust point to .config,include/andlib/.
--
2.9.5
I have validated on Linux environment with custom make file name as 'Makefile.test'.
Thomas Monjalon
AppliedQuoted 5 lines
Quoted 5 lines
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 fromMAKEFILES_LISTmake variable fixes this.
Quoted 8 lines
Quoted 4 lines
Fixes af75078fece3 ("first public release")Signed-off-by Marko Kovacevic <[email protected]>I have validated on Linux environment with custom make file name as 'Makefile.test'.
Acked-by Vipin Varghese <[email protected]>
Applied, thanks
Quoted 31 lines · Marko Kovacevic
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 fromMAKEFILES_LISTmake variable fixes this.Fixes af75078fece3 ("first public release")Signed-off-by Marko Kovacevic <[email protected]>--- mk/internal/rte.extvars.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)mk/internal/rte.extvars.mk +1
-1@@ -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/.Signature · 1 line
2.9.5
Hi,
This commit breaks the build of one of our external module:
make[5]: /path/to/ext-module//path/to/ext-module/Makefile: No such file or directory make[5]: *** No rule to make target '/path/to/ext-module//path/to/ext-module/Makefile'. Stop.
The reason is that entries in $(MAKEFILE_LIST) can be absolute paths. See:
$ cat test.mk $(info $(MAKEFILE_LIST)) all: $ make -f test.mk test.mk $ make -f $PWD/test.mk /home/user/test.mk
Maybe something like this could be better (I didn't try):
RTE_EXTMK ?= $(RTE_SRCDIR)/$(notdir $(firstword $(MAKEFILE_LIST)))
Thanks
Olivier
PATCH v2 1/1 mk: support renamed Makefile in external project
In reply to Marko KovacevicThe 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.
---
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(-)
mk/internal/rte.extvars.mk +1 -1
@@ -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/.
Signature · 1 line
2.9.5
Re: [PATCH v2] mk: support renamed Makefile in external project
Quoted 27 lines · Marko Kovacevic
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 fromMAKEFILES_LISTmake variable fixes this.Fixes af75078fece3 ("first public release")Signed-off-by Marko Kovacevic <[email protected]>Acked-by Vipin Varghese <[email protected]>---
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(-)mk/internal/rte.extvars.mk +0
-0
mk/internal/rte.extvars.mk ifeq ("$(origin M)", "command line") · line 26
Quoted 8 lines
mk/internal/rte.extvars.mk +1
-1@@ -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