2 #include <msp/fs/utils.h>
3 #include <msp/io/print.h>
6 #include "makesymlink.h"
11 MakeSymlink::MakeSymlink(Builder &b, const Symlink &sl):
14 FS::Path relpath = FS::relative(sl.get_target().get_path(), FS::dirname(sl.get_path()));
16 announce(sl.get_package()->get_name(), "LN", sl.get_path().str());
17 if(builder.get_verbose()>=2)
18 IO::print("%s -> %s\n", sl.get_name(), relpath.str());
20 if(!builder.get_dry_run())
21 symlink(relpath.str().c_str(), sl.get_path().str().c_str());
24 int MakeSymlink::check()