-/* $Id$
-
-This file is part of builder
-Copyright © 2006-2010 Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
#include <msp/fs/utils.h>
#include "builder.h"
#include "copy.h"
{
buildable = true;
add_depend(&source);
+
+ if(const SharedLibrary *shlib = dynamic_cast<const SharedLibrary *>(&source))
+ if(!shlib->get_soname().empty())
+ link = FS::dirname(path)/FS::basename(shlib->get_path());
+
+ if(!link.empty())
+ builder.register_path(link, this);
}
Target *Install::get_real_target()
Action *Install::create_action()
{
- return new Copy(builder, *package, source.get_path(), path);
+ return new Copy(builder, *package, source.get_path(), path, link);
}
FS::Path Install::generate_target_path(const FileTarget &tgt, const std::string &loc)
if(mid.empty())
throw invalid_argument("Don't know where to install "+tgtname);
- return (base/mid/tgtname).str();
+ return base/mid/tgtname;
}