]> git.tdb.fi Git - builder.git/blobdiff - source/analyzer.cpp
Target::prepare shouldn't be virtual
[builder.git] / source / analyzer.cpp
index b0646463669fd07c8c87f9e86a1f3e124bddf5e0..b04049683461f93f2e94fb5e66a6c00b5a68fdc1 100644 (file)
@@ -2,10 +2,9 @@
 #include <msp/io/print.h>
 #include "analyzer.h"
 #include "builder.h"
-#include "install.h"
 #include "objectfile.h"
-#include "package.h"
 #include "sourcefile.h"
+#include "sourcepackage.h"
 #include "target.h"
 #include "tool.h"
 
@@ -67,7 +66,7 @@ void Analyzer::build_depend_table(Target &tgt, unsigned depth)
                if(const ObjectFile *obj = dynamic_cast<const ObjectFile *>(&tgt))
                        return build_depend_table(obj->get_source(), depth);
        }
-       else if(mode==REBUILD && !tgt.get_rebuild() && !real->get_rebuild())
+       else if(mode==REBUILD && !tgt.needs_rebuild())
                /* All targets that depend on to-be-built targets will be rebuilt
                themselves, so we can stop here. */
                return;
@@ -95,13 +94,8 @@ void Analyzer::build_depend_table(Target &tgt, unsigned depth)
        else
                row.push_back("");
 
-       if(tgt.get_rebuild())
-       {
-               if(tgt.get_rebuild_reason().empty())
-                       row.push_back("Yes (no reason)");
-               else
-                       row.push_back(tgt.get_rebuild_reason());
-       }
+       if(tgt.needs_rebuild())
+               row.push_back(tgt.get_rebuild_reason());
 
        table.push_back(row);