From fc1e4124a533b7f628dc00d343b9061367634b27 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 28 Apr 2015 16:14:30 +0200 Subject: Second iteration over import/export support --- build/dump.cxx | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'build/dump.cxx') 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; } } } -- cgit v1.1