In further describing build items and their attributes, it is useful to classify build items into several types. Most build items serve the purpose of providing code to be compiled. There are a number of special types of build items that serve other purposes. We discuss these here:
The root build item of a build tree is the item in that tree
that has no parent-dir key. It is often
the case that the root build item is unnamed and therefore
lacks a this key. (See below for a
discussion of unnamed build items.) Keys that define
attributes of the build tree may appear only in the root
build item's Abuild.conf.
In order to refer to one build item from another, both build
items must have names. Abuild requires that every named
build item in a build tree be named uniquely within that
tree. A name is given to a build item by setting the
this key in its
Abuild.conf.
[9]
Sometimes, a build item exists for the sole purpose of
bridging its parent with its children in the file system.
Such items do not need to be referenced by other build items,
so they do not need names. The only use of an unnamed build
item is to serve as an intermediary during traversal of the
file system. Such a build item's
Abuild.conf may only contain the
parent-dir and
child-dirs keys. Abuild doesn't
retain any information about these build items. It simply
traverses through them when locating build items at startup
time.
Interface-only build items are build items that contain (in
addition to Abuild.conf) an
Abuild.interface file. They do not
build anything and therefore do not contain build files (such
as Abuild.mk or
Abuild-ant.properties). Since they have
nothing to build, abuild never actually invokes a backend
on them. They are, however, included in all dependency and
integrity checks. A typical use of interface-only build
items would be to add the locations of external libraries to
the include and library paths (or to the classpaths for Java
items). There may also be some interface-only build items
that consist solely of static files (templated C++ classes,
lists of constants, etc.).
Pass-through build items are useful for solving some more advanced abuild problems. They contain no build or interface files, but they are named and have dependencies. This makes pass-through build items useful as top-level facades for hiding more complicated build item structures. This could include build items that have private names relative to the pass-through item, and it could also include structures containing build items that cross language and platform boundaries. Several examples in the documentation use pass-through build items to hide private build item names. For further discussion of using pass-through build items in a cross-platform environment, please see Section 21.2, “Cross-Platform Dependencies”.
Plugins are capable of extending the functionality of abuild beyond what can be accomplished in regular build items. Plugins must be named and not have any dependencies. No other build items may depend on them. Plugins are a topic in their own right. They are discussed in depth in Chapter 26, Enhancing Abuild with Plugins.
[9] Perhaps name would have been a better name for this key, but it's too late to change it now. This key might be renamed in a future major release of abuild.