Skip to contentSkip to conversation

mk: fix external build failure

PATCH Applied Marko Kovacevic 2 participants 8 messages Feb 5, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mk: fix external build failure

Updated the make build to fix external build issues

Fixes 3a5c339d51a4 ("mk: support renamed Makefile in external project")
---
 mk/internal/rte.extvars.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mk/internal/rte.extvars.mk +1 -1
index 19594da..98c8606 100644
@@ -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/.
Signature · 1 line
2.9.5
#1 lore raw

05/02/2018 11:22, Marko Kovacevic:

Quoted 1 line

Updated the make build to fix external build issues

Please explain what is the issue.

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

No need to Cc stable when fixing a bug which is not in a major release.

#2 lore raw
Quoted 9 lines

05/02/2018 11:22, Marko Kovacevic:

Quoted 1 line

Updated the make build to fix external build issues

Please explain what is the issue.

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

No need to Cc stable when fixing a bug which is not in a major release.

Olivier reported an issue this morning, that my commit was breaking 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.

Marko.

#3 lore raw

05/02/2018 11:53, Kovacevic, Marko:

Quoted 10 lines
Quoted 9 lines

05/02/2018 11:22, Marko Kovacevic:

Quoted 1 line

Updated the make build to fix external build issues

Please explain what is the issue.

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

No need to Cc stable when fixing a bug which is not in a major release.

Quoted 7 lines

Olivier reported an issue this morning, that my commit was breaking 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.

I know that :)
I was asking to update the commit message in a v2 actually.

#4 lore raw
In reply to Kovacevic, Marko

05/02/2018 11:53, Kovacevic, Marko:

Quoted 9 lines
Quoted 9 lines

05/02/2018 11:22, Marko Kovacevic:

Quoted 1 line

Updated the make build to fix external build issues

Please explain what is the issue.

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

No need to Cc stable when fixing a bug which is not in a major release.

Sorry for the confusion.
In this case, Cc stable is needed because it fixes a fix of a bug seen with previous releases.

#5 lore raw

PATCH v2 1/1 mk: fix external build failure

In reply to 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")
---
 mk/internal/rte.extvars.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mk/internal/rte.extvars.mk +1 -1
index 19594da..98c8606 100644
@@ -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/.
Signature · 1 line
2.9.5
#6 lore raw

05/02/2018 16:45, Marko Kovacevic:

Quoted 7 lines

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")

Applied, thanks

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