aboutsummaryrefslogtreecommitdiff
path: root/build2/install
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/install
parent378b2598a305d4e332e52460ca89dd867546a58b (diff)
Add support for update-for-{test,install} operation aliases
Diffstat (limited to 'build2/install')
-rw-r--r--build2/install/init.cxx7
-rw-r--r--build2/install/operation.cxx18
-rw-r--r--build2/install/operation.hxx1
3 files changed, 23 insertions, 3 deletions
diff --git a/build2/install/init.cxx b/build2/install/init.cxx
index 259fb07..52875d4 100644
--- a/build2/install/init.cxx
+++ b/build2/install/init.cxx
@@ -140,10 +140,11 @@ namespace build2
if (!function_family::defined ("install"))
functions ();
- // Register the install and uninstall operations.
+ // Register our operations.
//
- r.operations.insert (install_id, op_install);
- r.operations.insert (uninstall_id, op_uninstall);
+ r.operations.insert (install_id, op_install);
+ r.operations.insert (uninstall_id, op_uninstall);
+ r.operations.insert (update_for_install_id, op_update_for_install);
return false;
}
diff --git a/build2/install/operation.cxx b/build2/install/operation.cxx
index 5279b3d..be4dd2d 100644
--- a/build2/install/operation.cxx
+++ b/build2/install/operation.cxx
@@ -30,6 +30,7 @@ namespace build2
const operation_info op_install {
install_id,
+ 0,
"install",
"install",
"installing",
@@ -52,6 +53,7 @@ namespace build2
//
const operation_info op_uninstall {
uninstall_id,
+ 0,
"uninstall",
"uninstall",
"uninstalling",
@@ -62,5 +64,21 @@ namespace build2
&install_pre,
nullptr
};
+
+ // Also the explicit update-for-install operation alias.
+ //
+ const operation_info op_update_for_install {
+ update_id, // Note: not update_for_install_id.
+ install_id,
+ op_update.name,
+ op_update.name_do,
+ op_update.name_doing,
+ op_update.name_did,
+ op_update.name_done,
+ op_update.mode,
+ op_update.concurrency,
+ op_update.pre,
+ op_update.post
+ };
}
}
diff --git a/build2/install/operation.hxx b/build2/install/operation.hxx
index 0d96faf..1f3db58 100644
--- a/build2/install/operation.hxx
+++ b/build2/install/operation.hxx
@@ -16,6 +16,7 @@ namespace build2
{
extern const operation_info op_install;
extern const operation_info op_uninstall;
+ extern const operation_info op_update_for_install;
}
}