From ff467960024eccc2f6a578b020df2221a8fa1992 Mon Sep 17 00:00:00 2001 From: Martine Lenders <m.lenders@fu-berlin.de> Date: Mon, 16 Jul 2018 15:14:52 +0200 Subject: [PATCH] make: make BUILDRELPATH dependent on selected path When selecting a directory to build using `-C` with make `BUILD_IN_DOCKER` will fail, because the `BUILDRELPATH` chooses the path `make` is executed in, not the path selected by `-C`. This fixes this bug by replacing `PWD` in the macro's definition with `CURDIR`. --- Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.include b/Makefile.include index a89855b939..a809d22910 100644 --- a/Makefile.include +++ b/Makefile.include @@ -65,7 +65,7 @@ endif MAKEOVERRIDES += $(foreach v,$(__DIRECTORY_VARIABLES),$(v)=$($(v))) # Path to the current directory relative to RIOTPROJECT -BUILDRELPATH ?= $(PWD:$(RIOTPROJECT)/%=%)/ +BUILDRELPATH ?= $(CURDIR:$(RIOTPROJECT)/%=%)/ # get host operating system OS := $(shell uname) -- GitLab