aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/build/script/script.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-01-18 10:54:23 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-01-18 10:54:23 +0200
commit70e095024ab33404ba0cf20c184a7a9560bca5f0 (patch)
treeea56d10fb9efbb1361863c7fc59e9ff74cde6f7b /libbuild2/build/script/script.hxx
parent1da1ae7733b7ef329b85df16cd15b91709cf4db9 (diff)
Add dynamic prerequisites to $< unless --adhoc is specified
Also add a few tests for depdb-dyndep.
Diffstat (limited to 'libbuild2/build/script/script.hxx')
-rw-r--r--libbuild2/build/script/script.hxx20
1 files changed, 14 insertions, 6 deletions
diff --git a/libbuild2/build/script/script.hxx b/libbuild2/build/script/script.hxx
index 4e88785..0619253 100644
--- a/libbuild2/build/script/script.hxx
+++ b/libbuild2/build/script/script.hxx
@@ -94,6 +94,17 @@ namespace build2
bool temp_dir,
const optional<timestamp>& deadline = nullopt);
+ // (Re)set special $< and $> variables.
+ //
+ void
+ set_special_variables (action);
+
+ // Create the temporary directory (if it doesn't exist yet) and set
+ // the $~ special variable to its path.
+ //
+ void
+ set_temp_dir_variable ();
+
environment (environment&&) = delete;
environment (const environment&) = delete;
environment& operator= (environment&&) = delete;
@@ -117,6 +128,9 @@ namespace build2
variable_pool var_pool;
variable_map vars;
+ const variable& var_ts; // $>
+ const variable& var_ps; // $<
+
// Temporary directory for the script run.
//
// Currently this directory is removed regardless of the script
@@ -146,12 +160,6 @@ namespace build2
//
size_t exec_line = 1;
- // Create the temporary directory (if it doesn't exist yet) and set
- // the $~ special variable to its path.
- //
- void
- set_temp_dir_variable ();
-
virtual void
set_variable (string&& name,
names&&,