void ObjectFile::find_depends(Target *tgt)
{
SourceFile *src=dynamic_cast<SourceFile *>(tgt);
+ FileTarget *file=src;
if(!src)
{
if(Install *inst=dynamic_cast<Install *>(tgt))
+ {
+ file=inst;
src=dynamic_cast<SourceFile *>(&inst->get_source());
+ }
}
if(!src)
return;
- FS::Path spath=src->get_path();
+ FS::Path spath=FS::dirname(file->get_path());
const StringList &incpath=comp.get_build_info().incpath;
const list<string> &includes=src->get_includes();