aboutsummaryrefslogtreecommitdiff
path: root/build2/install/utility
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-08-23 14:43:27 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-08-23 14:43:27 +0200
commitfeb55ebfdc536c32de2c173d108df5ee0004da44 (patch)
tree2f3cc4c9656c3308398bad1dd333c762aed403a4 /build2/install/utility
parent5e2f713a1828f2795b85f5343f62ecafff0d475a (diff)
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.
Diffstat (limited to 'build2/install/utility')
-rw-r--r--build2/install/utility6
1 files changed, 3 insertions, 3 deletions
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<path> (move (d));
}
template <typename T>
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));
}
}
}