From 65dca85d0acc1ae69518e85b52a2877e38dc8c6d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 2 Apr 2015 15:06:55 +0200 Subject: Implement translation of meta/operations to natural language --- build/operation | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'build/operation') diff --git a/build/operation b/build/operation index ac93999..3d9c4a4 100644 --- a/build/operation +++ b/build/operation @@ -122,6 +122,13 @@ namespace build { const std::string name; + // Name derivatives for diagnostics. If empty, then the meta- + // operation need not be mentioned. + // + const std::string name_do; // E.g., [to] 'configure'. + const std::string name_doing; // E.g., [while] 'configuring'. + const std::string name_already_done; // E.g., [already] 'configured'. + void (*meta_operation_pre) (); // Start of meta-operation batch. operation_id (*operation_pre) (operation_id); // Start of operation batch. @@ -184,6 +191,17 @@ namespace build struct operation_info { const std::string name; + + // Name derivatives for diagnostics. Note that unlike meta-operations, + // these can only be empty for the default operation (id 1), And + // meta-operations that make use of the default operation shall not + // have empty derivatives (failed which only target name will be + // printed). + // + const std::string name_do; // E.g., [to] 'update'. + const std::string name_doing; // E.g., [while] 'updating'. + const std::string name_already_done; // E.g., [already] 'up to date'. + const execution_mode mode; }; -- cgit v1.1