Don't fail unlinking if the file didn't exist
string fn=include.substr(1);
if(verbose>=5)
- cout<<"Looking for include "<<fn<<" with path "<<join(path.begin(), path.end())<<'\n';
+ cout<<"Looking for include "<<fn<<" from "<<from<<" with path "<<join(path.begin(), path.end())<<'\n';
StringList syspath;
if(current_arch->is_native())
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=FS::dirname(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();
announce(spkg.get_name(), "RM", relative(t.get_path(), spkg.get_source()).str());
- unlink(t.get_path());
+ try
+ {
+ unlink(t.get_path());
+ }
+ catch(const Msp::SystemError &)
+ { }
}
int Unlink::check()