X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fanalyzer.cpp;h=6664477598d653aa3d4a05950a08c62a808e6a42;hb=66d1078c04849ec17a7343d0494d6ed087e04318;hp=3481ec823309523fce9f78e171c3ff9df7374382;hpb=242c55b17e6608b29a77ca17a5b677e202a3ca90;p=builder.git diff --git a/source/analyzer.cpp b/source/analyzer.cpp index 3481ec8..6664477 100644 --- a/source/analyzer.cpp +++ b/source/analyzer.cpp @@ -14,6 +14,7 @@ Distributed under the LGPL #include "install.h" #include "objectfile.h" #include "package.h" +#include "sourcefile.h" #include "target.h" using namespace std; @@ -45,10 +46,10 @@ void Analyzer::build_depend_table(Target &tgt, unsigned depth) if(mode!=REBUILD && mode!=ALLDEPS) { // Skip trivial targets - if(dynamic_cast(&tgt)) - return build_depend_table(*tgt.get_depends().front(), depth); - else if(dynamic_cast(&tgt)) - return build_depend_table(*tgt.get_depends().front(), depth); + if(ObjectFile *obj=dynamic_cast(&tgt)) + return build_depend_table(obj->get_source(), depth); + else if(Install *inst=dynamic_cast(&tgt)) + return build_depend_table(inst->get_source(), depth); } else if(mode==REBUILD && !tgt.get_rebuild()) /* All targets that depend on to-be-built targets will be rebuilt