From 3813b05824fa2616b8ab9c18ed158c0c02265337 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 27 Apr 2018 12:01:09 +0200 Subject: 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 --- build2/config/operation.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'build2/config') diff --git a/build2/config/operation.cxx b/build2/config/operation.cxx index 1bd5d4d..cdf2f9a 100644 --- a/build2/config/operation.cxx +++ b/build2/config/operation.cxx @@ -641,8 +641,11 @@ namespace build2 // Clean up the directories. // + // Note: try to remove the root/ hooks directory if it is empty. + // + r = rmdir (out_root / root_dir, 2) || r; r = rmdir (out_root / bootstrap_dir, 2) || r; - r = rmdir (out_root / build_dir, 2) || r; + r = rmdir (out_root / build_dir, 2) || r; switch (rmdir (out_root)) { -- cgit v1.1