From b27f36b7af5186ad66fd1afa6e7fdc742f2aa1bd Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 21 May 2020 22:47:10 +0300 Subject: Make build script to create special files in temporary directory --- libbuild2/build/script/script.hxx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'libbuild2/build/script/script.hxx') 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 #include +#include // auto_rmdir #include @@ -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; -- cgit v1.1