]> git.tdb.fi Git - builder.git/blobdiff - source/analyzer.cpp
Code reorganizing and cleanup
[builder.git] / source / analyzer.cpp
index a4780fd697dd451fae6afa5ddc6efce020f9be9a..21ed52cec64b2cf463a62a1d9823870ea5917283 100644 (file)
@@ -34,14 +34,14 @@ void Analyzer::analyze()
 
 void Analyzer::build_depend_table(Target &tgt, unsigned depth)
 {
-       if(mode!=REBUILD)
+       if(mode!=REBUILD && mode!=ALLDEPS)
        {
                if(dynamic_cast<ObjectFile *>(&tgt))
                        return build_depend_table(*tgt.get_depends().front(), depth);
                else if(dynamic_cast<Install *>(&tgt))
                        return build_depend_table(*tgt.get_depends().front(), depth);
        }
-       else if(!tgt.get_rebuild())
+       else if(mode==REBUILD && !tgt.get_rebuild())
                return;
        
        TableRow row;
@@ -73,9 +73,9 @@ void Analyzer::build_depend_table(Target &tgt, unsigned depth)
 
        if(!max_depth || depth<max_depth-1)
        {
-               const list<Target *> &depends=tgt.get_depends();
+               const TargetList &depends=tgt.get_depends();
                //depends.sort(target_order);
-               for(list<Target *>::const_iterator i=depends.begin(); i!=depends.end(); ++i)
+               for(TargetList::const_iterator i=depends.begin(); i!=depends.end(); ++i)
                        build_depend_table(**i, depth+1);
        }
 }