diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2018-04-27 12:01:09 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2018-04-27 12:01:09 +0200 |
commit | 3813b05824fa2616b8ab9c18ed158c0c02265337 (patch) | |
tree | 35dc74b54ae0b6096e93fd76471faba140facb46 /build2/file.ixx | |
parent | bff415fd8a787a63bcda2d9f95c8e086e40c1368 (diff) |
Add support for build hooks
The following buildfiles are loaded (if present) at appropriate times from the
out_root subdirectories of a project:
build/bootstrap/pre-*.build # before loading bootstrap.build
build/bootstrap/post-*.build # after loading bootstrap.build
build/root/pre-*.build # before loading root.build
build/root/post-*.build # after loading root.build
Diffstat (limited to 'build2/file.ixx')
-rw-r--r-- | build2/file.ixx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/build2/file.ixx b/build2/file.ixx index 15fa8dc..ef944cf 100644 --- a/build2/file.ixx +++ b/build2/file.ixx @@ -26,4 +26,19 @@ namespace build2 assert (phase == run_phase::match || phase == run_phase::execute); return import (pk, true); } + + void + source_hooks (scope&, const dir_path&, bool); + + inline void + bootstrap_pre (scope& root) + { + source_hooks (root, bootstrap_dir, true /* pre */); + } + + inline void + bootstrap_post (scope& root) + { + source_hooks (root, bootstrap_dir, false /* pre */); + } } |