diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2020-05-26 13:10:37 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-05-27 08:40:59 +0200 |
commit | 57e2aaa28e19da1cd4e51982f46ef2630739ff8a (patch) | |
tree | 138a169b29aad630150906ffb4a8f30a5f9bdf5a /libbuild2/build/script/runner.cxx | |
parent | 29c59165396eb842d92367fca74c4e459ea25900 (diff) |
Wrap up $<, $> variables and related ($target.path(), hashing, cleanup)
Diffstat (limited to 'libbuild2/build/script/runner.cxx')
-rw-r--r-- | libbuild2/build/script/runner.cxx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libbuild2/build/script/runner.cxx b/libbuild2/build/script/runner.cxx index c4a93fd..559a6cd 100644 --- a/libbuild2/build/script/runner.cxx +++ b/libbuild2/build/script/runner.cxx @@ -5,6 +5,7 @@ #include <libbutl/filesystem.mxx> +#include <libbuild2/target.hxx> #include <libbuild2/script/run.hxx> using namespace butl; @@ -75,6 +76,24 @@ namespace build2 void default_runner:: leave (environment& env, const location& ll) { + // Drop cleanups of target paths. + // + for (auto i (env.cleanups.begin ()); i != env.cleanups.end (); ) + { + const target* m (&env.target); + for (; m != nullptr; m = m->adhoc_member) + { + if (const path_target* pm = m->is_a<path_target> ()) + if (i->path == pm->path ()) + break; + } + + if (m != nullptr) + i = env.cleanups.erase (i); + else + ++i; + } + clean (env, ll); // Note that since the temporary directory may only contain special |