Chapter 13. The Abuild.conf File

Table of Contents

13.1. Abuild.conf Syntax

The Abuild.conf file is the fundamental configuration file that describes each build item and the relationships between build items. It contains information about dependencies, file system locations, and platform support. It explicitly does not contain any information about how to build a particular build item or what targets are built.

13.1. Abuild.conf Syntax

Every build item must contain Abuild.conf. The Abuild.conf file is a simple text file consisting of colon-separated key/value pairs. Blank lines and lines that start with # are ignored. Long lines may be continued to the next line by ending them with a backslash character (\). Certain keys are permitted for some kinds of build items and not for others. For a discussion of different types of build items, please see Section 4.4, “Special Types of Build Items”.

The Abuild.conf is optional in an external or backing area root if Abuild.backing is present. For details about configuration backing areas, see Chapter 10, Backing Areas.

The following keys are supported in Abuild.conf:

child-dirs

This key is used to specify all subdirectories of this item that contain additional Abuild.conf files. The value is a whitespace-separated list of relative paths. Every child directory's Abuild.conf must have a parent-dir key that points back to this directory. Generally, the child-dirs key contains a list of single-element paths (i.e. paths with no directory names in them). Although abuild does allow lower-level directories to be specified (corresponding with more “..”'s in the lower-level items' parent-dir keys), for clarity, this practice is not recommended.

deleted

This key is allowed only in a root build item. It contains a list of the names of build items that should be removed from this build tree's namespace because they have been deleted. The build item must not be present in the local build tree but must be present in the build item's direct backing area chain (i.e., traversal of backing areas is permitted, but not externals). Abuild would ordinarily inherit build items that are not defined in the local tree but exist in a backing area. Listing an item in the deleted key prevents this from happening. Since all items listed here must be found in a backing area, this key would never appear in a build tree with no backing area. For more information, see Section 10.7, “Deleted Build Item”.

deps

This key's value is a whitespace-separated list of the names of build items on which this build item depends. This is the sole mechanism within abuild to specify inter-build-item dependencies. Any dependency in this list may be optionally followed by one or more -flag=interface-flag arguments. This causes the interface-flag interface flag to be set when this build item reads the interface of the dependent build item (see Chapter 20, Interface Flags). It is also possible to specify a -platform=selector option to a dependency to specify which of the dependent item's platforms applies to this dependency (see Section 21.2, “Cross-Platform Dependencies”).

description

This key can be used to add an information description to the build item. Description information is intended to be human readable. If present, it will be included in the output to abuild --dump-data. Providing a description here rather than just by using a comment in the Abuild.conf file can be useful to other programs that provide additional visualization of build items. For adding information that you may wish to categorize items for build purposes, use traits instead (see Section 8.3, “Traits”).

external-dirs

This key is allowed only in a root build item. It contains a list of whitespace-separated paths to the root directories of external build trees. For a discussion of using externals, please see Chapter 7, External Build Trees.

parent-dir

This key is used to specify this item's parent in the file system. It must be a relative path. All build items except for root build items have a parent-dir key. The Abuild.conf in a build item's parent directory must list the child directory in its child-dirs key. For a complete description of how abuild reads Abuild.conf files, see Section 29.3, “Traversal Details”. The most common value for parent-dir is “..”. Although abuild allows parent-dir to point other than to a parent or ancestor directory in the file system, this usage is not recommended and will likely lead to confusion. [23] In particular, the desc build set uses actual file system paths, not parent-dir/child-dirs relationships.

platform-types

This key is used to specify which platform types a given build item is expected to work on. It includes a whitespace-separated list of platform types. For details about platform types, see Chapter 5, Target Types, Platform Types, and Platforms. If a build item has a build file or an interface file, the platform-types key is mandatory. Otherwise, it must not be present. Note that a build item may have multiple platform types, but all platform types for a given build item must belong to the same target type.

supported-flags

This key contains a list of whitespace-separated flags that are supported by this build item. When a flag is listed here, it becomes available to this item's Abuild.interface file for flag-specific variable assignments. Other items can specify that this flag should be turned on when they depend on this item by using the -flag=interface-flag option in their deps key. For more information, see Chapter 20, Interface Flags.

supported-traits

This key is allowed only in a root build item. It contains a list of whitespace-separated traits that are supported by build items in the build tree. For more information about traits, see Section 8.3, “Traits”.

this

This key is used to set the name of the build item. Build item names consist of period-delimited segments. Each segment consists of one or more alphanumeric characters, dashes, or underscores. Some Abuild.conf files exist just to connect parent directories with child directories in the file system, as shown in examples below. In those cases, the this key may be omitted.

traits

This key contains a list of whitespace-separated traits that apply to this build item. A trait may be referent to one or more additional build items. To name a referent build item, follow the trait with the -item=build-item option. For more information about traits, see Section 8.3, “Traits”.

visible-to

This key's value is an indicator of the scope at which this build item is visible. If present, it allows build items in the named scope to access this build item directly when they would ordinarily be prevented from doing so by normal scoping rules. For information about build item name scopes and build item visibility, see Section 6.3, “Build Item Name Scoping”. For a discussion of the visible-to key in particular, see Chapter 22, Build Item Visibility

Note that the parent-dir, child-dirs, and external-dirs keys are the only keys that deal with paths rather than names.



[23] The main reason that abuild allows you to do this it all is that it can be handy as a short-term measure during reorganization of a build tree or to work around disk space issues.