aboutsummaryrefslogtreecommitdiff
path: root/build/algorithm.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'build/algorithm.cxx')
-rw-r--r--build/algorithm.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/build/algorithm.cxx b/build/algorithm.cxx
index fac0bf6..419bfaf 100644
--- a/build/algorithm.cxx
+++ b/build/algorithm.cxx
@@ -23,6 +23,8 @@ namespace build
target*
search (prerequisite& p)
{
+ tracer tr ("search");
+
assert (p.target == nullptr);
//@@ TODO for now we just default to the directory scope.
@@ -36,7 +38,7 @@ namespace build
d.normalize ();
}
- //@@ TODO would be nice to first check if this target is
+ //@@ TODO: would be nice to first check if this target is
// already in the set before allocating a new instance.
// Find or insert.
@@ -45,8 +47,9 @@ namespace build
targets.emplace (
unique_ptr<target> (p.type.factory (p.name, move (d)))));
- //if (r.second)
- // cout << "new target for prerequsite " << p << " " << d << endl;
+ trace (4, [&]{
+ tr << (r.second ? "new" : "existing") << " target " << **r.first
+ << " for prerequsite " << p;});
return (p.target = r.first->get ());
}