]> 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 6623c2d033423981a5930016936756cc67c6fb3d..504fc7d8ea565139fdda95eb731f61ea103fd60e 100644 (file)
@@ -28,7 +28,6 @@
 #include "pkgconfiggenerator.h"
 #include "sharedlibrary.h"
 #include "sourcepackage.h"
-#include "systemlibrary.h"
 #include "tar.h"
 #include "task.h"
 #include "virtualtarget.h"
@@ -269,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)
@@ -510,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);
@@ -565,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)