DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1] mk: support building with renamed makefile
@ 2018-01-22 10:59 Marko Kovacevic
  2018-01-29 16:14 ` Varghese, Vipin
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Marko Kovacevic @ 2018-01-22 10:59 UTC (permalink / raw)
  To: dev; +Cc: thomas, vipin.varghese, Marko Kovacevic, stable

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>
---
 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..19594da 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)/$(firstword $(MAKEFILE_LIST))
 export RTE_EXTMK
 
 # RTE_SDK_BIN must point to .config, include/ and lib/.
-- 
2.9.5

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH v1] mk: support building with renamed makefile
  2018-01-22 10:59 [dpdk-dev] [PATCH v1] mk: support building with renamed makefile Marko Kovacevic
@ 2018-01-29 16:14 ` Varghese, Vipin
  2018-01-30 23:43   ` Thomas Monjalon
  2018-02-05  9:29 ` Olivier Matz
  2018-02-05  9:53 ` [dpdk-dev] [PATCH v2] mk: support renamed Makefile in external project Marko Kovacevic
  2 siblings, 1 reply; 6+ messages in thread
From: Varghese, Vipin @ 2018-01-29 16:14 UTC (permalink / raw)
  To: Kovacevic, Marko, dev; +Cc: thomas, stable



> -----Original Message-----
> From: Kovacevic, Marko
> Sent: Monday, January 22, 2018 4:29 PM
> To: dev@dpdk.org
> Cc: thomas@monjalon.net; Varghese, Vipin <vipin.varghese@intel.com>;
> Kovacevic, Marko <marko.kovacevic@intel.com>; stable@dpdk.org
> Subject: [PATCH v1] 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.
> 
> Fixes: af75078fece3 ("first public release")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
> ---
>  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..19594da 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)/$(firstword $(MAKEFILE_LIST))
>  export RTE_EXTMK
> 
>  # RTE_SDK_BIN must point to .config, include/ and lib/.
> --
> 2.9.5

I have validated on Linux environment with custom make file name as 'Makefile.test'.

Acked-by: Vipin Varghese <vipin.varghese@intel.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH v1] mk: support building with renamed makefile
  2018-01-29 16:14 ` Varghese, Vipin
@ 2018-01-30 23:43   ` Thomas Monjalon
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Monjalon @ 2018-01-30 23:43 UTC (permalink / raw)
  To: Kovacevic, Marko; +Cc: dev, Varghese, Vipin, stable

> > 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>
> 
> I have validated on Linux environment with custom make file name as 'Makefile.test'.
> 
> Acked-by: Vipin Varghese <vipin.varghese@intel.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH v1] mk: support building with renamed makefile
  2018-01-22 10:59 [dpdk-dev] [PATCH v1] mk: support building with renamed makefile Marko Kovacevic
  2018-01-29 16:14 ` Varghese, Vipin
@ 2018-02-05  9:29 ` Olivier Matz
  2018-02-05  9:53 ` [dpdk-dev] [PATCH v2] mk: support renamed Makefile in external project Marko Kovacevic
  2 siblings, 0 replies; 6+ messages in thread
From: Olivier Matz @ 2018-02-05  9:29 UTC (permalink / raw)
  To: Marko Kovacevic; +Cc: dev, thomas, vipin.varghese, stable

On Mon, Jan 22, 2018 at 10:59:05AM +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>
> ---
>  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..19594da 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)/$(firstword $(MAKEFILE_LIST))
>  export RTE_EXTMK
>  
>  # RTE_SDK_BIN must point to .config, include/ and lib/.
> -- 
> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [dpdk-dev] [PATCH v2] mk: support renamed Makefile in external project
  2018-01-22 10:59 [dpdk-dev] [PATCH v1] mk: support building with renamed makefile Marko Kovacevic
  2018-01-29 16:14 ` Varghese, Vipin
  2018-02-05  9:29 ` Olivier Matz
@ 2018-02-05  9:53 ` Marko Kovacevic
  2018-02-05 10:00   ` Bruce Richardson
  2 siblings, 1 reply; 6+ messages in thread
From: Marko Kovacevic @ 2018-02-05  9:53 UTC (permalink / raw)
  To: dev; +Cc: thomas, olivier.matz, vipin.varghese, stable, 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 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/.
-- 
2.9.5

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH v2] mk: support renamed Makefile in external project
  2018-02-05  9:53 ` [dpdk-dev] [PATCH v2] mk: support renamed Makefile in external project Marko Kovacevic
@ 2018-02-05 10:00   ` Bruce Richardson
  0 siblings, 0 replies; 6+ messages in thread
From: Bruce Richardson @ 2018-02-05 10:00 UTC (permalink / raw)
  To: Marko Kovacevic; +Cc: dev, thomas, olivier.matz, vipin.varghese, stable

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-02-05 10:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-22 10:59 [dpdk-dev] [PATCH v1] mk: support building with renamed makefile Marko Kovacevic
2018-01-29 16:14 ` Varghese, Vipin
2018-01-30 23:43   ` Thomas Monjalon
2018-02-05  9:29 ` Olivier Matz
2018-02-05  9:53 ` [dpdk-dev] [PATCH v2] mk: support renamed Makefile in external project Marko Kovacevic
2018-02-05 10:00   ` Bruce Richardson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).