aboutsummaryrefslogtreecommitdiff
path: root/build2/function.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-06-20 09:51:56 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-06-20 09:51:56 +0200
commit353438a94953bf4d093af0d84decd5ec7529ed34 (patch)
tree4c4e376ff8d831e85954a9b74f2157ad4b06351a /build2/function.hxx
parentc6b3f6659eda9b0b255ddc2d24accdd998b5938d (diff)
Add $process.run() and $process.run_regex() functions
$process.run(<prog>[ <args>...]) Return trimmed stdout. $process.run_regex(<prog>[ <args>...], <pat> [, <fmt>]) Return stdout lines matched and optionally processed with regex. Each line of stdout (including the customary trailing blank) is matched (as a whole) against <pat> and, if successful, returned, optionally processed with <fmt>, as an element of a list.
Diffstat (limited to 'build2/function.hxx')
-rw-r--r--build2/function.hxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/build2/function.hxx b/build2/function.hxx
index c2686f2..62666cc 100644
--- a/build2/function.hxx
+++ b/build2/function.hxx
@@ -45,10 +45,16 @@ namespace build2
// expected to issue diagnostics and throw failed. Note that the arguments
// are conceptually "moved" and can be reused by the implementation.
//
+ // @@ Maybe it makes sense to implicitly convert types like string to names
+ // -- providing all the overload combinations really gets tedious.
+ //
// A function can also optionally receive the current scope by having the
// first argument of the const scope* type. It may be NULL is the function
// is called out of any scope (e.g., command line).
//
+ // Note also that we don't pass the location to the function instead
+ // printing the info message pointing to the call site.
+ //
// Normally functions come in families that share a common qualification
// (e.g., string. or path.). The function_family class is a "registrar"
// that simplifies handling of function families. For example: