aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/build
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-05-19 14:50:16 +0300
committerBoris Kolpackov <boris@codesynthesis.com>2020-05-27 08:35:29 +0200
commitdb05f8ead4c2b5ef8a27c3ffc6b20c291b0e7c8c (patch)
tree5bed4bd0901e6abd728b53bbeed31489af4d1e4b /libbuild2/build
parent9054e7e2fd59e2222258e2dce3a3300c8d16fb05 (diff)
Set proper build script command default redirects
Also add printing of set and exit pseudo-builtin command arguments for verb >= 2 as we do for normal builtins.
Diffstat (limited to 'libbuild2/build')
-rw-r--r--libbuild2/build/script/script.cxx5
-rw-r--r--libbuild2/build/script/script.hxx12
2 files changed, 14 insertions, 3 deletions
diff --git a/libbuild2/build/script/script.cxx b/libbuild2/build/script/script.cxx
index 5dbd24c..2a796ab 100644
--- a/libbuild2/build/script/script.cxx
+++ b/libbuild2/build/script/script.cxx
@@ -25,7 +25,10 @@ namespace build2
pt.ctx,
cast<target_triplet> (pt.ctx.global_scope["build.host"]),
work,
- wd_name),
+ wd_name,
+ redirect (redirect_type::none),
+ redirect (redirect_type::merge, 2),
+ redirect (redirect_type::pass)),
script (s),
primary_target (pt),
vars (context, false /* global */)
diff --git a/libbuild2/build/script/script.hxx b/libbuild2/build/script/script.hxx
index dfd725b..8569a1f 100644
--- a/libbuild2/build/script/script.hxx
+++ b/libbuild2/build/script/script.hxx
@@ -20,10 +20,18 @@ namespace build2
{
using build2::script::line;
using build2::script::line_type;
+ using build2::script::redirect;
+ using build2::script::redirect_type;
using build2::script::command_expr;
- // Once parsed, the script can be executed in multiple threads with the
- // state (variable values, etc) maintained in the environment object.
+ // Notes:
+ //
+ // - Once parsed, the script can be executed in multiple threads with
+ // the state (variable values, etc) maintained in the environment
+ // object.
+ //
+ // - The default script command redirects semantics is none for stdin,
+ // merge into stderr for stdout, and pass for stderr.
//
class script
{