#include "install.h"
#include "objectfile.h"
#include "package.h"
+#include "sourcefile.h"
#include "target.h"
using namespace std;
if(mode!=REBUILD && mode!=ALLDEPS)
{
// Skip trivial targets
- if(dynamic_cast<ObjectFile *>(&tgt))
- return build_depend_table(*tgt.get_depends().front(), depth);
- else if(dynamic_cast<Install *>(&tgt))
- return build_depend_table(*tgt.get_depends().front(), depth);
+ if(ObjectFile *obj=dynamic_cast<ObjectFile *>(&tgt))
+ return build_depend_table(obj->get_source(), depth);
+ else if(Install *inst=dynamic_cast<Install *>(&tgt))
+ return build_depend_table(inst->get_source(), depth);
}
else if(mode==REBUILD && !tgt.get_rebuild())
/* All targets that depend on to-be-built targets will be rebuilt