diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2013-03-27 07:57:41 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2013-03-27 07:57:41 +0200 |
commit | deaaf3200d1f98b8f16b4ddfb325b2c218033d8e (patch) | |
tree | feec8e3a269c243c71915fc549ad46568f2fec06 /build | |
parent | f56488af7dc8bdfd430a4ef01bd11148117719b3 (diff) |
Override out_root if it came exported from recursive make invocation
Diffstat (limited to 'build')
-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 |