From feb55ebfdc536c32de2c173d108df5ee0004da44 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 23 Aug 2016 14:43:27 +0200 Subject: Add support for installing into a different file name Now the install variable is a path, not dir_path. If it is a directory (ends with a trailing slash), then the target is installed into this directory with the same name. Otherwise, the entire path is used as the installation destination. --- build2/install/utility | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'build2/install/utility') diff --git a/build2/install/utility b/build2/install/utility index a50ab9b..618b243 100644 --- a/build2/install/utility +++ b/build2/install/utility @@ -21,14 +21,14 @@ namespace build2 { auto r (s.target_vars[tt]["*"].insert ("install")); if (r.second) // Already set by the user? - r.first.get () = move (d); + r.first.get () = path_cast (move (d)); } template inline void install_path (scope& s, dir_path d) { - return install_path (T::static_type, s, d); + return install_path (T::static_type, s, move (d)); } inline void @@ -43,7 +43,7 @@ namespace build2 inline void install_mode (scope& s, string m) { - return install_mode (T::static_type, s, m); + return install_mode (T::static_type, s, move (m)); } } } -- cgit v1.1