summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2024-05-04 22:05:11 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2024-05-05 21:41:06 +0200
commit7fc1c7fee52bce6ca5c59069a4a66bdb99e24998 (patch)
tree946be1a5fb6797f7ad8ae5ac8708c44a1dc78eee
parenta81ee7d552cb3b8e0752974e01445b1eae5f1b72 (diff)
downloadrebel-7fc1c7fee52bce6ca5c59069a4a66bdb99e24998.tar
rebel-7fc1c7fee52bce6ca5c59069a4a66bdb99e24998.zip
examples: style/structural changes to RecipeLang example
-rw-r--r--examples/recipes/gmp/build.recipe32
1 files changed, 15 insertions, 17 deletions
diff --git a/examples/recipes/gmp/build.recipe b/examples/recipes/gmp/build.recipe
index 024d2b3..c63fddd 100644
--- a/examples/recipes/gmp/build.recipe
+++ b/examples/recipes/gmp/build.recipe
@@ -18,52 +18,50 @@ fetch source {
}
task unpack() {
- depends = [source];
+ task.depends = [source];
- run = ```
+ ```
tar xf {{source.path}}
- ```;
+ ```
}
task configure(host: Platform) {
- parent = unpack();
- depends = [
+ task.parent = unpack();
+ task.depends = [
build_depend(toolchain::build_depends),
host_depend(toolchain::depends),
];
- run = ```
+ ```
mkdir {{builddir}}
cd {{builddir}}
{{sourcedir}}/configure \
--build={{build.gnu_triplet}} \
--host={{host.gnu_triplet}} \
--prefix={{host.prefix}}
- ```;
+ ```
}
task compile(host: Platform) {
- parent = configure(host);
+ task.parent = configure(host);
- run = ```
+ ```
cd {{builddir}}
make
- ```;
+ ```
}
task install(host: Platform) {
- parent = compile(host);
+ task.parent = compile(host);
- output = struct {
- default = struct {
- runtime_depends = [host_depend(toolchain::depends)],
- },
+ task.output["default"] = struct {
+ runtime_depends = [host_depend(toolchain::depends)],
};
- run = ```
+ ```
cd {{builddir}}
make DESTDIR={{destdir}} install
rm {{destdir}}{{host.prefix}}/lib/*.a
rm {{destdir}}{{host.prefix}}/lib/*.la
- ```;
+ ```
}