aboutsummaryrefslogtreecommitdiff
path: root/build/algorithm.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-06-22 09:39:14 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-06-22 09:39:14 +0200
commit88d26293e08647361824622765f6f3c9cafde577 (patch)
tree4b40cf626bd68daeac333c2833cdb60ba1d527b5 /build/algorithm.cxx
parent6ecaa7e76c91a2842bcc63626a908bb2340b77b6 (diff)
Remove prerequisite rewriting from inject_parent_fsdir()
Diffstat (limited to 'build/algorithm.cxx')
-rw-r--r--build/algorithm.cxx23
1 files changed, 4 insertions, 19 deletions
diff --git a/build/algorithm.cxx b/build/algorithm.cxx
index 2529e13..abae023 100644
--- a/build/algorithm.cxx
+++ b/build/algorithm.cxx
@@ -206,26 +206,11 @@ namespace build
if (!d.sub (out_root) || d == out_root)
return;
- prerequisite& p (
- s.prerequisites.insert (
- fsdir::static_type,
- d,
- string (),
- nullptr,
- s,
- trace).first);
-
- // This function is normally called from match() which means
- // it can be called several times if we are performing several
- // operations (e.g., clean update). Since it is a fairly common
- // pattern to add this prerequisite at the end, do a quick check
- // if the last prerequisite is already what we are about to add.
- //
- if (!t.prerequisites.empty () && &t.prerequisites.back ().get () == &p)
- return;
+ level5 ([&]{trace << "for " << t;});
- level5 ([&]{trace << "injecting prerequisite for " << t;});
- t.prerequisites.emplace_back (p);
+ fsdir& dt (search<fsdir> (d, string (), nullptr, &s));
+ match (a, dt);
+ t.prerequisite_targets.emplace_back (&dt);
}
target_state