aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/script/script.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-05-26 14:55:40 +0300
committerBoris Kolpackov <boris@codesynthesis.com>2020-05-27 14:38:01 +0200
commitd6581aa9be74e83cc689bfdaae9aaf2e78287975 (patch)
treee741d2c6fcdb567d8c7b897d17f3f0ca2358d307 /libbuild2/script/script.hxx
parente6470e37093084251b7ee60a904a78e54d13e31b (diff)
Create build script temporary directory on demand
Diffstat (limited to 'libbuild2/script/script.hxx')
-rw-r--r--libbuild2/script/script.hxx15
1 files changed, 12 insertions, 3 deletions
diff --git a/libbuild2/script/script.hxx b/libbuild2/script/script.hxx
index b887df6..b80c44a 100644
--- a/libbuild2/script/script.hxx
+++ b/libbuild2/script/script.hxx
@@ -373,7 +373,9 @@ namespace build2
const dir_name_view sandbox_dir;
// Used by the script running machinery to create special files in it.
- // Must be an absolute path.
+ // Must be an absolute path, unless empty. Can be empty until the
+ // create_temp_dir() function call, which can be used for the create-on-
+ // demand strategy implementation.
//
const dir_path& temp_dir;
@@ -454,10 +456,17 @@ namespace build2
public:
// Set variable value with optional (non-empty) attributes.
//
- // Note: see also parser::lookup_variable().
+ virtual void
+ set_variable (string&& name,
+ names&&,
+ const string& attrs,
+ const location&) = 0;
+
+ // Create the temporary directory and set the temp_dir reference target
+ // to its path. Must only be called if temp_dir is empty.
//
virtual void
- set_variable (string&& name, names&&, const string& attrs) = 0;
+ create_temp_dir () = 0;
public:
virtual