[build2] Running commands in buildfile

Boris Kolpackov boris at codesynthesis.com
Mon Nov 20 08:36:21 UTC 2023


Phuwasate Lutchanont via users <users at build2.org> writes:

> I would like to ask if there is any good resource or documentation for
> learning the internal commands supported by the buildfile language? In
> particular, I could not understand the code inside double curly braces
> whenever I encountered them in the introduction and manual. I cannot seem
> to find any thorough explanation on what is going on in the code anywhere
> either.

There is no proper documentation for this yet, but it's high up on my
TODO list.

The things in double curly braces are ad hoc recipes/rules. Currently,
they can be written in Buildscript or C++, most commonly the former:

https://build2.org/release/0.13.0.xhtml#adhoc-recipe
https://build2.org/release/0.14.0.xhtml#adhoc-rules
https://build2.org/release/0.15.0.xhtml#dyndep
https://build2.org/release/0.16.0.xhtml#dyn-target

Buildscript is a portable shell-like language that originated in
Testscript. In a sense, these two languages shared a common "script"
core. Testscript is well documented, and most of the core language
documentation applies to Buildscript:

https://build2.org/build2/doc/build2-testscript-manual.xhtml



More information about the users mailing list