aboutsummaryrefslogtreecommitdiff
path: root/build2/b.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'build2/b.cxx')
-rw-r--r--build2/b.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/build2/b.cxx b/build2/b.cxx
index 7ebbab1..dcf2cfe 100644
--- a/build2/b.cxx
+++ b/build2/b.cxx
@@ -876,7 +876,13 @@ main (int argc, char* argv[])
d.normalize ();
- mif->search (rs, target_key {ti, &d, &tn.value, e}, l, tgs);
+ // Figure out if this target is in the src tree.
+ //
+ dir_path out (ts.out_base != ts.src_base && d.sub (ts.src_base)
+ ? out_src (d, ts.out_base, ts.src_base)
+ : dir_path ());
+
+ mif->search (rs, target_key {ti, &d, &out, &tn.value, e}, l, tgs);
}
}