From cd75e06a87aa74aa6968113107afa53d401d20bc Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 25 Mar 2015 14:48:36 +0200 Subject: Configure/disfigure src_root saving/removing support; fsdir{} injection We can now build out-of-tree. --- build/parser.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'build/parser.cxx') 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)) { -- cgit v1.1