[dpdk-dev] mk: fix external builds with relative output dir

Message ID 1493240466-3533-1-git-send-email-jblunck@infradead.org (mailing list archive)
State Accepted, archived
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Jan Blunck April 26, 2017, 9:01 p.m. UTC
  In case the output directory (O=) is undefined or a relative directory lets
turn it into an absolute path before passing it on. Otherwise the output
directory is created relative to the subdir, e.g. pktgen/app/build/... and
pktgen/lib/lua/src/build/...

Signed-off-by: Jan Blunck <jblunck@infradead.org>
---
 mk/rte.extsubdir.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Thomas Monjalon April 30, 2017, 8:49 p.m. UTC | #1
26/04/2017 23:01, Jan Blunck:
> In case the output directory (O=) is undefined or a relative directory lets
> turn it into an absolute path before passing it on. Otherwise the output
> directory is created relative to the subdir, e.g. pktgen/app/build/... and
> pktgen/lib/lua/src/build/...
> 
> Signed-off-by: Jan Blunck <jblunck@infradead.org>

Applied, thanks
  

Patch

diff --git a/mk/rte.extsubdir.mk b/mk/rte.extsubdir.mk
index 3e733d8..d21791b 100644
--- a/mk/rte.extsubdir.mk
+++ b/mk/rte.extsubdir.mk
@@ -33,8 +33,8 @@  MAKEFLAGS += --no-print-directory
 ALL_DEPDIRS := $(patsubst DEPDIRS-%,%,$(filter DEPDIRS-%,$(.VARIABLES)))
 
 # output directory
-O ?= .
-BASE_OUTPUT ?= $(O)
+O ?= $(CURDIR)
+BASE_OUTPUT ?= $(abspath $(O))
 CUR_SUBDIR ?= .
 
 .PHONY: all