|author||Petr Hosek <firstname.lastname@example.org>||Thu Jul 14 16:02:25 2016 -0700|
|committer||Petr Hosek <email@example.com>||Mon Jul 18 14:48:06 2016 -0700|
Blueprint based package build system This is a simple package build system for Fuchsia based on Blueprint and Ninja that can be used to drive other build systems. Change-Id: I4215899c2c3c4f2e3624ce4d3d29f375c482460c
Toyen is a package build system for Fuchsia. Similarly to other package build systems, Toyen itself does not build the packages themselves. Toyen is responsible for invoking the build system of individual projects, handling dependencies across projects and packaging build artifacts.
After checking out the source, you need to run
toyen executable to generate the
$ toyen -src . -out out packages/root.bp
This is only needed after checking out the source for the first time. The Ninja files have rules re-generating themselves when necessary.
Therefore, a typical iteration loop is:
ninja -C out
Toyen build system is implemented on top of Blueprint and Ninja, so the reader should first understand how they work. This document provides a brief surface exploration of the Blueprint and Ninja.
Ninja provides a simple syntax for defining:
To keep things fast, there are very few other features. There's no branching logic, globbing, or decision making of any kind, really. Ninja files can be written and read by humans, but that would be pointlessly tedious. Instead, a program is used to generate Ninja files.
Unlike other build systems (even those that also generate Ninja files, like gn) Blueprint is not a stand-alone executable. You don‘t run Blueprint. Blueprint also doesn’t come with any pre-defined build rules, except for the two that are necessary to build Blueprint itself.
Blueprint is a set of Go packages that you use to implement whatever build rules your project finds useful. Through these packages, Blueprint provides high level constructs that are useful for generating Ninja files. Blueprint also provides a parser for reading Blueprint config files.
To use Blueprint, you implement two things: your build modules, and a builder. Blueprint comes with basic versions of both of these things that are capable of building Blueprint itself. To learn more, read the extensive comments in the Blueprint code for complete documentation.
Toyen is named after Marie Čermínová, known as Toyen, Czech surrealist painter and illustrator.