#include "gnuccompiler.h"
#include "gnucxxcompiler.h"
#include "gnulinker.h"
-#include "header.h"
-#include "install.h"
+#include "installedfile.h"
#include "misc.h"
#include "package.h"
#include "pkgconfig.h"
#include "pkgconfiggenerator.h"
#include "sharedlibrary.h"
#include "sourcepackage.h"
-#include "systemlibrary.h"
#include "tar.h"
#include "task.h"
#include "virtualtarget.h"
if(j->second->get_package()==i->second)
{
++count;
- if(j->second->get_rebuild())
+ if(j->second->needs_rebuild())
++to_be_built;
}
if(count)
if(spkg->get_install_flags()&(SourcePackage::LIB|SourcePackage::INCLUDE))
{
PkgConfig *pc = new PkgConfig(*this, *spkg);
- install->add_depend(new Install(*this, *spkg, *pc));
+ install->add_depend(new InstalledFile(*this, *spkg, *pc));
}
}
- // 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);
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)
// Cleaning doesn't care about ordering, so a simpler method can be used
set<Target *> clean_tgts;
- TargetList queue;
+ list<Target *> queue;
queue.push_back(get_target("cmdline"));
while(!queue.empty())
if(tgt->is_buildable() && (tgt->get_package()==main_pkg || clean>=2))
clean_tgts.insert(tgt);
- const TargetList &deps = tgt->get_depends();
- for(TargetList::const_iterator i=deps.begin(); i!=deps.end(); ++i)
+ const Target::Dependencies &deps = tgt->get_depends();
+ for(list<Target *>::const_iterator i=deps.begin(); i!=deps.end(); ++i)
if(!clean_tgts.count(*i))
queue.push_back(*i);
}