if(!from_file || !dep_file)
return &dep;
- const SourcePackage *from_pkg = from.get_package();
- if(dep_file->get_package()!=from_pkg || FS::descendant_depth(dep_file->get_path(), from_pkg->get_source_directory())<0)
+ const Component *from_comp = from_file->get_real_target()->get_component();
+ const Component *dep_comp = dep_file->get_component();
+ if(dep_comp!=from_comp)
return &dep;
/* Adjust the path of the dependency to account for the install location
of the dependent target. */
- const Component *from_comp = from_file->get_real_target()->get_component();
- const Component *dep_comp = dep_file->get_component();
FS::Path from_inst = from_comp->get_install_map().get_install_location(*from_file->get_real_target());
FS::Path dep_inst = dep_comp->get_install_map().get_install_location(*dep_file);
FS::Path displaced = FS::dirname(from_file->get_path())/FS::relative(dep_inst, from_inst)/FS::basename(dep_file->get_path());