X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Finstalledfile.cpp;h=f2909f6127ec94d72f475ed200a9182276fd4742;hb=3b13563d75a8fd711a9cf87cae62960f90a5bc39;hp=09cfed6db03a47165b3cb7c1834e2758244cc803;hpb=f2b26f1929a8209a746bcf4944165b0ba9ef303f;p=builder.git diff --git a/source/installedfile.cpp b/source/installedfile.cpp index 09cfed6..f2909f6 100644 --- a/source/installedfile.cpp +++ b/source/installedfile.cpp @@ -1,3 +1,4 @@ +#include #include #include "builder.h" #include "installedfile.h" @@ -33,7 +34,12 @@ FS::Path InstalledFile::generate_target_path(const FS::Path &prefix, const FileT else mid = tgt.get_install_location(); - return prefix/mid/FS::basename(tgt.get_path()); + string fn = FS::basename(tgt.get_path()); + if(const SharedLibrary *shlib = dynamic_cast(&tgt)) + if(!shlib->get_soname().empty()) + fn = shlib->get_soname(); + + return prefix/mid/fn; } Target *InstalledFile::get_real_target() @@ -49,4 +55,6 @@ void InstalledFile::check_rebuild() mark_rebuild(source.get_name()+" has changed"); else if(source.needs_rebuild()) mark_rebuild(source.get_name()+" needs rebuilding"); + else if(!link.empty() && !FS::exists(link)) + mark_rebuild("Symlink does not exist"); }