Incomplete build system
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

concept.md 1.5KB

The following sections are imagined to be subsections of a longer, currently incomplete document.

Providers and Providing

Oftentimes, it makes sense to select one of several different pieces of code to compile. For example, the reason this tool was created was for an operating system. The operating system can be compiled for one or more architectures, but they all provide a common set of features. Similarly, a video game may allow for the selection of one of multiple graphics backends.

For these cases, this tool has a notion of providers. Providers are components that provide a certain feature. Providers are used in dependency resolution in the build stage. Rather than specify a path to a build file, specify a feature which is provided. (Specifying a path will work, as paths are automatically added as provided features; see the below section, “Features”, for details.)

Features

Internally, a feature is just a string, and can be arbitrary. However, a style is recommended. A feature string should consist of a relevant path (relative to the source root, and followed by a trailing slash), then a colon, then the name of a feature. The default build file of a directory will automatically provide the feature corresponding to that directory name, but with no colon or feature name.

Configuration Settings as Providers

TODO - but the gist is to allow, e.g., different sets of enumeration values based on some other setting. Thus, predicates can be between providers, and providing can be dependent on a predicate.