aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/build/script/script.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/build/script/script.hxx')
-rw-r--r--libbuild2/build/script/script.hxx14
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;