diff options
-rw-r--r-- | build/bootstrap.make | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/build/bootstrap.make b/build/bootstrap.make index 56a7679..44eb57e 100644 --- a/build/bootstrap.make +++ b/build/bootstrap.make @@ -263,7 +263,10 @@ src_base := $(abspath $(dir $(%makefile%))) ifneq ($(src_root),$(src_base)) -ifeq ($(origin out_root),undefined) +# In recursive make invocation, out_root may come from the environment +# in which case we need to override it. +# +ifneq ($(origin out_root),file) out_root := $(abspath $(patsubst \ %$(subst $(src_root)/,,$(src_base)),%,$(CURDIR))) endif @@ -272,7 +275,10 @@ out_base := $(out_root)/$(subst $(src_root)/,,$(src_base)) else -ifeq ($(origin out_root),undefined) +# In recursive make invocation, out_root may come from the environment +# in which case we need to override it. +# +ifneq ($(origin out_root),file) out_root := $(abspath $(CURDIR)) endif |