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 --- tests/hooks/testscript | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 tests/hooks/testscript (limited to 'tests/hooks/testscript') diff --git a/tests/hooks/testscript b/tests/hooks/testscript new file mode 100644 index 0000000..7ad8028 --- /dev/null +++ b/tests/hooks/testscript @@ -0,0 +1,30 @@ +# file : tests/hooks/testscript +# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +.include ../common.test + ++cat <'print bootstrap' >+build/bootstrap.build ++cat <'print root' >=build/root.build + ++mkdir build/bootstrap ++cat <'print pre-bootstrap' >=build/bootstrap/pre-bootstrap.build ++cat <'print post-bootstrap' >=build/bootstrap/post-bootstrap.build + ++mkdir build/root ++cat <'print pre-root' >=build/root/pre-root.build ++cat <'print post-root' >=build/root/post-root.build + +: basics +: +$* <>EOO +print buildfile +EOI +pre-bootstrap +bootstrap +post-bootstrap +pre-root +root +post-root +buildfile +EOO -- cgit v1.1