aboutsummaryrefslogtreecommitdiff
path: root/tests/dependency/recipe/testscript
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2024-02-12 09:34:50 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2024-02-12 09:34:50 +0200
commit20e49b4e63779abc0e25bec4c74399a83ec8a83c (patch)
tree9f2f01ff0b6a40142fa8ee04a1a394c5b98c9a57 /tests/dependency/recipe/testscript
parentf0cfe78cb306532518d42e3d2b8e59405d006717 (diff)
Add ability to specify recipes in separate files
This can now be achieved with the new `recipe` directive: recipe <language> <file> Note that similar to the use of if-else and switch directives with recipes, this directive requires explicit % recipe header. For example, instead of: file{foo.output}: {{ echo 'hello' >$path($>) }} We can now write: file{foo.output}: % recipe buildscript hello.buildscript With hello.buildscript containing: echo 'hello' >$path($>) Similarly, for C++ recipes (this time for a pattern), instead of: [rule_name=hello] file{~'/(.+)\.output/'}: % update clean {{ c++ 1 -- -- ... }} We can now write: [rule_name=hello] file{~'/(.+)\.output/'}: % update clean recipe c++ hello.cxx With hello.cxx containing: // c++ 1 -- -- ... Relative <file> paths are resolved using the buildfile directory that contains the `recipe` directive as a base. Note also that this mechanism can be used in exported buildfiles with recipe files placed into build/export/ together with buildfiles.
Diffstat (limited to 'tests/dependency/recipe/testscript')
-rw-r--r--tests/dependency/recipe/testscript2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/dependency/recipe/testscript b/tests/dependency/recipe/testscript
index f43111e..a581724 100644
--- a/tests/dependency/recipe/testscript
+++ b/tests/dependency/recipe/testscript
@@ -406,7 +406,7 @@ alias{x}:
echo
}
EOI
-<stdin>:3:1: error: expected recipe block instead of '{'
+<stdin>:3:1: error: expected recipe block or 'recipe' instead of '{'
EOE
: duplicate-action-single