diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2020-05-21 22:47:10 +0300 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-05-27 08:38:57 +0200 |
commit | b27f36b7af5186ad66fd1afa6e7fdc742f2aa1bd (patch) | |
tree | 194e275a20eb0f3e021f71f5f4389c8a8ca8d4fa /libbuild2/build/script/script.hxx | |
parent | 84cc0fc42c6b86eb09b06c7f59a0beb94397a38a (diff) |
Make build script to create special files in temporary directory
Diffstat (limited to 'libbuild2/build/script/script.hxx')
-rw-r--r-- | libbuild2/build/script/script.hxx | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/libbuild2/build/script/script.hxx b/libbuild2/build/script/script.hxx index 29d62aa..f8306e1 100644 --- a/libbuild2/build/script/script.hxx +++ b/libbuild2/build/script/script.hxx @@ -9,6 +9,7 @@ #include <libbuild2/utility.hxx> #include <libbuild2/variable.hxx> +#include <libbuild2/filesystem.hxx> // auto_rmdir #include <libbuild2/script/script.hxx> @@ -58,9 +59,6 @@ namespace build2 location end_loc; }; - //@@ Does environment need script? Can't we just pass it to parser along - // with environment. - // class environment: public build2::script::environment { public: @@ -83,6 +81,16 @@ namespace build2 // variable_map vars; + // Temporary directory for the script run (see build2::script:: + // environment::temp_dir for details). + // + // Currently this directory is removed regardless of the script + // execution success or failure. Later, to ease the troubleshooting, + // we may invent the build2 option suppressing the directory removal + // on failure. + // + auto_rmdir temp_dir; + virtual void set_variable (string&& name, names&&, const string& attrs) override; |