From ca41ca8f9a6b21588248e5fee1a013363f3f52a8 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 13 Mar 2015 14:34:24 +0200 Subject: Add support for "first" and "last" execution modes --- build/b.cxx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'build/b.cxx') 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 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. -- cgit v1.1