aboutsummaryrefslogtreecommitdiff
path: root/build2/context.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-02-07 15:48:50 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-02-07 16:52:55 +0200
commit968d8a7acd6c23078a3ea6936c03be0b45523227 (patch)
treed7da843d0961b649ff93f6f299b9ce65b1255003 /build2/context.cxx
parent378b2598a305d4e332e52460ca89dd867546a58b (diff)
Add support for update-for-{test,install} operation aliases
Diffstat (limited to 'build2/context.cxx')
-rw-r--r--build2/context.cxx16
1 files changed, 9 insertions, 7 deletions
diff --git a/build2/context.cxx b/build2/context.cxx
index 6f3abcc..e73f0a1 100644
--- a/build2/context.cxx
+++ b/build2/context.cxx
@@ -341,8 +341,8 @@ namespace build2
const char var_extension[10] = "extension";
- const string* current_mname;
- const string* current_oname;
+ string current_mname;
+ string current_oname;
const meta_operation_info* current_mif;
const operation_info* current_inner_oif;
@@ -393,8 +393,10 @@ namespace build2
operation_table.insert ("update");
operation_table.insert ("clean");
operation_table.insert ("test");
+ operation_table.insert ("update-for-test");
operation_table.insert ("install");
operation_table.insert ("uninstall");
+ operation_table.insert ("update-for-install");
// Create global scope. Note that the empty path is a prefix for any other
// path. See the comment in <libbutl/prefix-map.mxx> for details.
@@ -762,7 +764,7 @@ namespace build2
{
r = m.name_do;
- if (!io.name_doing.empty ())
+ if (io.name_doing[0] != '\0')
{
r += ' ';
r += io.name_doing;
@@ -800,7 +802,7 @@ namespace build2
if (!m.name_doing.empty ())
r = m.name_doing;
- if (!io.name_doing.empty ())
+ if (io.name_doing[0] != '\0')
{
if (!r.empty ()) r += ' ';
r += io.name_doing;
@@ -838,7 +840,7 @@ namespace build2
{
r = m.name_did;
- if (!io.name_doing.empty ())
+ if (io.name_doing[0] != '\0')
{
r += ' ';
r += io.name_doing;
@@ -877,7 +879,7 @@ namespace build2
{
os << t;
- if (!io.name_done.empty ())
+ if (io.name_done[0] != '\0')
os << ' ' << io.name_done;
if (oo != nullptr)
@@ -885,7 +887,7 @@ namespace build2
}
else
{
- if (!io.name_doing.empty ())
+ if (io.name_doing[0] != '\0')
os << io.name_doing << ' ';
if (oo != nullptr)