diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-03-13 14:34:24 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-03-13 14:34:24 +0200 |
commit | ca41ca8f9a6b21588248e5fee1a013363f3f52a8 (patch) | |
tree | 6e791ddac1c6f794273a9701c0c7f1bc9ec3d000 /build/b.cxx | |
parent | 0cee33621a93d3348a1bf19a0c94441b717cbcbc (diff) |
Add support for "first" and "last" execution modes
Diffstat (limited to 'build/b.cxx')
-rw-r--r-- | build/b.cxx | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/build/b.cxx b/build/b.cxx index 5096bc2..6bd1d86 100644 --- a/build/b.cxx +++ b/build/b.cxx @@ -109,12 +109,12 @@ main (int argc, char* argv[]) // see <operation> for details. Loading of the buildfiles can result // in additional names being added (via module loading). // - meta_operations.insert ("perform"); // Default. - meta_operations.insert ("configure"); - meta_operations.insert ("disfigure"); + meta_operations.insert (meta_operation_info {"perform"}); + meta_operations.insert (meta_operation_info {"configure"}); + meta_operations.insert (meta_operation_info {"disfigure"}); - operations.insert ("update"); // Default. - operations.insert ("clean"); + operations.insert (operation_info {"update", execution_mode::first}); + operations.insert (operation_info {"clean", execution_mode::last}); // Figure out work and home directories. // @@ -473,9 +473,11 @@ main (int argc, char* argv[]) { for (opspec& os: ms) { - current_rules = &rules[os.name]; action act (meta_operations.find (ms.name), operations.find (os.name)); + current_mode = operations[act.operation ()].mode; + current_rules = &rules[os.name]; + level4 ([&]{trace << ms.name << " " << os.name << " " << act;}); // Multiple targets in the same operation can be done in parallel. |