aboutsummaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-05-06 12:10:21 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-05-06 12:10:21 +0200
commitb14d141614443ce86b52b647d0df42c45a5a2729 (patch)
tree9bf6ecf7c1954557e09ce4a395c144842f5a7cb7 /build
parent7132d92ac421d956e775a5ed6cad33605e7f7162 (diff)
Add src_root_shadow and out_root_shadow, used them in foreign test
We use shadows for src and out roots to catch cases where these were reset before inclusion. This happens in import stubs.
Diffstat (limited to 'build')
-rw-r--r--build/bootstrap.make10
1 files changed, 7 insertions, 3 deletions
diff --git a/build/bootstrap.make b/build/bootstrap.make
index d30bd26..e5f5b38 100644
--- a/build/bootstrap.make
+++ b/build/bootstrap.make
@@ -91,14 +91,15 @@ $(call include-search-dirs,$1,$(wordlist 2,$(words $2),$2))))
endef
# Test if $1 is a 'foreign' makefile, i.e., does not reside in
-# src_root, out_root, or bld_root.
+# src_root, out_root, or bld_root. Use shadows for src and out
+# roots to catch cases where these were reset before inclusion.
+# This happens in import stubs.
#
%frame_exclude% += include-test-foreign
define include-test-foreign
-$(if $(%foreign%),t,$(if $(filter $(bld_root)/% $(src_root)/% $(out_root)/%,$1),,t))
+$(if $(%foreign%),t,$(if $(filter $(bld_root)/% $(src_root_shadow)/% $(out_root_shadow)/%,$1),,t))
endef
-
%frame_exclude% += include-body
define include-body
%interactive% :=
@@ -276,6 +277,9 @@ endif
scf_root := $(src_root)/build
dcf_root := $(out_root)/build
+src_root_shadow := $(src_root)
+out_root_shadow := $(out_root)
+
$(out_root)/%: export out_root := $(out_root)
$(out_root)/%: export src_root := $(src_root)
$(out_root)/%: export scf_root := $(scf_root)