aboutsummaryrefslogtreecommitdiff
path: root/build/parser.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-03-25 14:48:36 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-03-25 14:48:36 +0200
commitcd75e06a87aa74aa6968113107afa53d401d20bc (patch)
tree1e104829d10f375a783d6efbbf7eef3e2c6d2ef5 /build/parser.cxx
parenta94dcda7f00b10cb22b5f2138b1c29bcfbe7de37 (diff)
Configure/disfigure src_root saving/removing support; fsdir{} injection
We can now build out-of-tree.
Diffstat (limited to 'build/parser.cxx')
-rw-r--r--build/parser.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/build/parser.cxx b/build/parser.cxx
index c87a04a..809841f 100644
--- a/build/parser.cxx
+++ b/build/parser.cxx
@@ -277,7 +277,11 @@ namespace build
targets.insert (
*ti, move (tn.dir), move (tn.value), e, trace).first);
- t.prerequisites = ps; //@@ OPT: move if last target.
+ //@@ OPT: move if last/single target (common cases).
+ //
+ t.prerequisites.insert (t.prerequisites.end (),
+ ps.begin (),
+ ps.end ());
if (default_target_ == nullptr)
default_target_ = &t;
@@ -408,9 +412,8 @@ namespace build
// See if there is a trigger for this path.
//
- if (src_root_ != nullptr && p.sub (*src_root_))
{
- auto i (root_->triggers.find (p.leaf (*src_root_)));
+ auto i (root_->triggers.find (p));
if (i != root_->triggers.end () && !i->second (*root_, p))
{