3 This file is part of builder
4 Copyright © 2010 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
9 #include <msp/fs/utils.h>
10 #include <msp/io/print.h>
13 #include "makesymlink.h"
18 MakeSymlink::MakeSymlink(Builder &b, const Symlink &sl):
21 FS::Path relpath = FS::relative(sl.get_target().get_path(), FS::dirname(sl.get_path()));
23 announce(sl.get_package()->get_name(), "LN", sl.get_path().str());
24 if(builder.get_verbose()>=2)
25 IO::print("%s -> %s\n", sl.get_name(), relpath.str());
27 if(!builder.get_dry_run())
28 symlink(relpath.str().c_str(), sl.get_path().str().c_str());
31 int MakeSymlink::check()