aboutsummaryrefslogtreecommitdiff
path: root/build/dump.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-04-28 16:14:30 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-04-28 16:14:30 +0200
commitfc1e4124a533b7f628dc00d343b9061367634b27 (patch)
treef2bdf45f35a6c92b6094517dcdb7749259c0bd0a /build/dump.cxx
parent56ce5687567150b0b2cc3e57540d564793ef6bf7 (diff)
Second iteration over import/export support
Diffstat (limited to 'build/dump.cxx')
-rw-r--r--build/dump.cxx32
1 files changed, 16 insertions, 16 deletions
diff --git a/build/dump.cxx b/build/dump.cxx
index 3f8eb15..3f3bd93 100644
--- a/build/dump.cxx
+++ b/build/dump.cxx
@@ -28,31 +28,31 @@ namespace build
os << ':';
- // If the target has been matched to a rule, print resolved
+ for (const prerequisite& p: t.prerequisites)
+ {
+ os << ' ';
+
+ // Print it as target if one has been cached.
+ //
+ if (p.target != nullptr)
+ os << *p.target;
+ else
+ os << p;
+ }
+
+ // If the target has been matched to a rule, also print resolved
// prerequisite targets.
//
if (t.recipe (a))
{
+ bool first (true);
for (const target* pt: t.prerequisite_targets)
{
if (pt == nullptr) // Skipped.
continue;
- os << ' ' << *pt;
- }
- }
- else
- {
- for (const prerequisite& p: t.prerequisites)
- {
- os << ' ';
-
- // Print it as target if one has been cached.
- //
- if (p.target != nullptr)
- os << *p.target;
- else
- os << p;
+ os << (first ? " | " : " ") << *pt;
+ first = false;
}
}
}