diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2020-05-14 14:18:50 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2020-05-17 17:48:37 +0300 |
commit | 96908ec43ed27d9f34da27b6a94a6db357465056 (patch) | |
tree | 7d61f1ccb6c4cef366b652f4446eee7e38eb6736 /libbuild2/build/script/runner.cxx | |
parent | e5827facbfbfe90eae1b71c355a08bf61e2f6e1a (diff) |
Add build script
Diffstat (limited to 'libbuild2/build/script/runner.cxx')
-rw-r--r-- | libbuild2/build/script/runner.cxx | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/libbuild2/build/script/runner.cxx b/libbuild2/build/script/runner.cxx new file mode 100644 index 0000000..f52d1c0 --- /dev/null +++ b/libbuild2/build/script/runner.cxx @@ -0,0 +1,50 @@ +// file : libbuild2/build/script/runner.cxx -*- C++ -*- +// license : MIT; see accompanying LICENSE file + +#include <libbuild2/build/script/runner.hxx> + +#include <libbuild2/script/run.hxx> + +namespace build2 +{ + namespace build + { + namespace script + { + void default_runner:: + enter (environment&, const location&) + { + // Noop. + } + + void default_runner:: + leave (environment& env, const location& ll) + { + clean (env, ll); + } + + void default_runner:: + run (environment& env, + const command_expr& expr, + size_t li, + const location& ll) + { + if (verb >= 3) + text << ": " << expr; + + build2::script::run (env, expr, li, ll); + } + + bool default_runner:: + run_if (environment& env, + const command_expr& expr, + size_t li, const location& ll) + { + if (verb >= 3) + text << ": ?" << expr; + + return build2::script::run_if (env, expr, li, ll); + } + } + } +} |