- const list<Target *> &depends=tgt.get_depends();
- //depends.sort(target_order);
- for(list<Target *>::const_iterator i=depends.begin(); i!=depends.end(); ++i)
- build_depend_table(**i, depth+1);
+ Target::Dependencies depends;
+ if(mode==RDEPS)
+ {
+ const set<Target *> &rdeps = rdepends[&tgt];
+ depends.assign(rdeps.begin(), rdeps.end());
+ }
+ else
+ {
+ depends = tgt.get_dependencies();
+ const Target::Dependencies &tdeps = tgt.get_transitive_dependencies();
+ depends.insert(depends.end(), tdeps.begin(), tdeps.end());
+ }
+
+ depends.sort(full_paths ? target_order_full : target_order);
+
+ for(Target *d: depends)
+ build_depend_table(*d, depth+1);