X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbuilder.cpp;h=9fdb8ee6a56e6b9fb5dfa709cd8d6e90cfdd596e;hb=25376a637c584fc9d491bb6a40c4c483341418b0;hp=0c39f6d48befd871ff7883ac7d53d72755723c47;hpb=dc4b917034c9d3718f07139e2f0f3631a080c6f3;p=builder.git diff --git a/source/builder.cpp b/source/builder.cpp index 0c39f6d..9fdb8ee 100644 --- a/source/builder.cpp +++ b/source/builder.cpp @@ -509,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); @@ -590,7 +581,7 @@ int Builder::do_build() if(tgt) { if(tgt->get_tool()) - IO::print("[%-10s] [%-4s] %s\n", tgt->get_package()->get_name(), tgt->get_tool()->get_tag(), tgt->get_name()); + IO::print("%-4s %s\n", tgt->get_tool()->get_tag(), tgt->get_name()); Task *task = tgt->build(); if(task) tasks.push_back(task); @@ -657,7 +648,8 @@ int Builder::do_clean() for(set::iterator i=clean_tgts.begin(); i!=clean_tgts.end(); ++i) if(FileTarget *ft = dynamic_cast(*i)) - unlink(ft->get_path()); + if(ft->get_mtime()) + FS::unlink(ft->get_path()); return 0; }