From b14d141614443ce86b52b647d0df42c45a5a2729 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 6 May 2010 12:10:21 +0200 Subject: 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. --- build/bootstrap.make | 10 +++++++--- 1 file 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) -- cgit v1.1