diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-10-10 17:48:03 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-10-10 17:48:03 +0200 |
commit | ddf8c2b62fa09eb765afc0c093d0d8908f7b69e4 (patch) | |
tree | 5956e674e0cb368061a9a9eb6d8bf742f96ffa75 /bpkg/pkg-command.cxx | |
parent | ec931aa6550b47461e92062a703e6ef9f4c24b17 (diff) |
Complete build command
Diffstat (limited to 'bpkg/pkg-command.cxx')
-rw-r--r-- | bpkg/pkg-command.cxx | 35 |
1 files changed, 24 insertions, 11 deletions
diff --git a/bpkg/pkg-command.cxx b/bpkg/pkg-command.cxx index 39caa8e..67ea07a 100644 --- a/bpkg/pkg-command.cxx +++ b/bpkg/pkg-command.cxx @@ -18,11 +18,33 @@ namespace bpkg { void pkg_command (const string& cmd, + const dir_path& c, + const shared_ptr<selected_package>& p) + { + tracer trace ("pkg_command"); + + assert (p->state == package_state::configured); + assert (p->out_root); // Should be present since configured. + + level4 ([&]{trace << "command: " << cmd;}); + + dir_path out_root (c / *p->out_root); // Always relative. + level4 ([&]{trace << "out_root: " << out_root;}); + + // Form the buildspec. + // + string bspec (cmd + "(" + out_root.string () + "/)"); + level4 ([&]{trace << "buildspec: " << bspec;}); + + run_b (bspec); + } + + void + pkg_command (const string& cmd, const configuration_options& o, cli::scanner& args) { tracer trace ("pkg_command"); - level4 ([&]{trace << "command: " << cmd;}); const dir_path& c (o.directory ()); level4 ([&]{trace << "configuration: " << c;}); @@ -48,16 +70,7 @@ namespace bpkg level4 ([&]{trace << p->name << " " << p->version;}); - assert (p->out_root); // Should be present since configured. - dir_path out_root (c / *p->out_root); // Always relative. - level4 ([&]{trace << "out_root: " << out_root;}); - - // Form the buildspec. - // - string bspec (cmd + "(" + out_root.string () + "/)"); - level4 ([&]{trace << "buildspec: " << bspec;}); - - run_b (bspec); + pkg_command (cmd, c, p); if (verb) text << cmd << (cmd.back () != 'e' ? "ed " : "d ") |