diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-08-23 14:43:27 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-08-23 14:43:27 +0200 |
commit | feb55ebfdc536c32de2c173d108df5ee0004da44 (patch) | |
tree | 2f3cc4c9656c3308398bad1dd333c762aed403a4 /build2/install/init.cxx | |
parent | 5e2f713a1828f2795b85f5343f62ecafff0d475a (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/init.cxx')
-rw-r--r-- | build2/install/init.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/build2/install/init.cxx b/build2/install/init.cxx index 221cfcf..e301f08 100644 --- a/build2/install/init.cxx +++ b/build2/install/init.cxx @@ -183,7 +183,13 @@ namespace build2 // Note: not overridable. // - v.insert<dir_path> ("install"); + // The install variable is a path, not dir_path, since it can be used + // to both specify the target directory (to install with the same file + // name) or target file (to install with a different name). And the + // way we distinguish between the two is via the presence/absence of + // the trailing directory separator. + // + v.insert<path> ("install"); v.insert<string> ("install.mode"); } |