aboutsummaryrefslogtreecommitdiff
path: root/build2/dist
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-03-28 15:59:06 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-03-28 16:03:35 +0200
commit96f2131e593e206f0e458409f22adfff8c1b5356 (patch)
treefdb71a7a435d631872e0413dbe13113a636932de /build2/dist
parent69801c4e23f877359118e55ed291737f4fbece04 (diff)
Clean up variable usage
Diffstat (limited to 'build2/dist')
-rw-r--r--build2/dist/module.cxx10
-rw-r--r--build2/dist/operation.cxx14
2 files changed, 11 insertions, 13 deletions
diff --git a/build2/dist/module.cxx b/build2/dist/module.cxx
index 6f40b33..ab8c5a3 100644
--- a/build2/dist/module.cxx
+++ b/build2/dist/module.cxx
@@ -46,10 +46,8 @@ namespace build2
v.find<dir_path> ("dist.root");
v.find<dir_path> ("config.dist.root");
- //@@ VAR type
- //
- v.find<string> ("dist.cmd");
- v.find<string> ("config.dist.cmd");
+ v.find<path> ("dist.cmd");
+ v.find<path> ("config.dist.cmd");
v.find<strings> ("dist.archives");
v.find<strings> ("config.dist.archives");
@@ -112,13 +110,13 @@ namespace build2
if (s)
{
const value& cv (
- config::required (r, "config.dist.cmd", "install").first);
+ config::required (r, "config.dist.cmd", path ("install")).first);
if (cv && !cv.empty ())
v = cv;
}
else
- v = "install";
+ v = path ("install");
}
// dist.archives
diff --git a/build2/dist/operation.cxx b/build2/dist/operation.cxx
index cb418be..11ee313 100644
--- a/build2/dist/operation.cxx
+++ b/build2/dist/operation.cxx
@@ -49,12 +49,12 @@ namespace build2
// install -d <dir>
//
static void
- install (const string& cmd, const dir_path&);
+ install (const path& cmd, const dir_path&);
// install <file> <dir>
//
static void
- install (const string& cmd, file&, const dir_path&);
+ install (const path& cmd, file&, const dir_path&);
// cd <root> && tar|zip ... <pkg>.<ext> <pkg>
//
@@ -103,7 +103,7 @@ namespace build2
info << "did you forget to set dist.package?";
const string& dist_package (cast<string> (l));
- const string& dist_cmd (cast<string> (rs->vars["dist.cmd"]));
+ const path& dist_cmd (cast<path> (rs->vars["dist.cmd"]));
// Get the list of operations supported by this project. Skip
// default_id.
@@ -303,11 +303,11 @@ namespace build2
// install -d <dir>
//
static void
- install (const string& cmd, const dir_path& d)
+ install (const path& cmd, const dir_path& d)
{
path reld (relative (d));
- cstrings args {cmd.c_str (), "-d"};
+ cstrings args {cmd.string ().c_str (), "-d"};
args.push_back ("-m");
args.push_back ("755");
@@ -340,12 +340,12 @@ namespace build2
// install <file> <dir>
//
static void
- install (const string& cmd, file& t, const dir_path& d)
+ install (const path& cmd, file& t, const dir_path& d)
{
path reld (relative (d));
path relf (relative (t.path ()));
- cstrings args {cmd.c_str ()};
+ cstrings args {cmd.string ().c_str ()};
// Preserve timestamps. This could becomes important if, for
// example, we have pre-generated sources. Note that the