]> git.tdb.fi Git - builder.git/blobdiff - source/builder.cpp
These checks are unnecessary with the separate symlink target gone
[builder.git] / source / builder.cpp
index 9c8e27be0aaa6cb3506d53ea22828c6dbc75f22d..504fc7d8ea565139fdda95eb731f61ea103fd60e 100644 (file)
@@ -21,7 +21,6 @@
 #include "gnuccompiler.h"
 #include "gnucxxcompiler.h"
 #include "gnulinker.h"
-#include "header.h"
 #include "installedfile.h"
 #include "misc.h"
 #include "package.h"
@@ -29,7 +28,6 @@
 #include "pkgconfiggenerator.h"
 #include "sharedlibrary.h"
 #include "sourcepackage.h"
-#include "systemlibrary.h"
 #include "tar.h"
 #include "task.h"
 #include "virtualtarget.h"
@@ -270,7 +268,7 @@ int Builder::main()
                                if(j->second->get_package()==i->second)
                                {
                                        ++count;
-                                       if(j->second->get_rebuild())
+                                       if(j->second->needs_rebuild())
                                                ++to_be_built;
                                }
                        if(count)
@@ -511,17 +509,8 @@ int Builder::create_targets()
                }
        }
 
-       // Find dependencies until no new targets are created
-       while(!new_tgts.empty())
-       {
-               Target *tgt = new_tgts.front();
-               new_tgts.erase(new_tgts.begin());
-               tgt->find_depends();
-               if(!tgt->get_depends_ready())
-                       new_tgts.push_back(tgt);
-       }
-
        // Apply what-ifs
+       // XXX This does not currently work with targets found during dependency discovery
        for(StringList::iterator i=what_if.begin(); i!=what_if.end(); ++i)
        {
                FileTarget *tgt = vfs.get_target(cwd/ *i);
@@ -566,7 +555,7 @@ int Builder::do_build()
 
        unsigned total = 0;
        for(map<string, Target *>::const_iterator i=targets.begin(); i!=targets.end(); ++i)
-               if(i->second->is_buildable() && i->second->get_rebuild())
+               if(i->second->is_buildable() && i->second->needs_rebuild())
                        ++total;
 
        if(!total)