From e02c60ff172373319a746917b4ac43ca389ff792 Mon Sep 17 00:00:00 2001 From: Steven Watanabe Date: Wed, 4 Apr 2012 17:20:43 +0000 Subject: [PATCH] Link to the new class docs. [SVN r77761] --- v2/doc/src/extending.xml | 45 ++++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/v2/doc/src/extending.xml b/v2/doc/src/extending.xml index 0ca2e8732..9c4fe4b9b 100644 --- a/v2/doc/src/extending.xml +++ b/v2/doc/src/extending.xml @@ -76,12 +76,13 @@ in Jamfile, such as metatarget kind, name, sources and properties, and can be called with specific properties to generate concrete targets. At the code level it is represented by an instance of - class derived from abstract-target. + class derived from abstract-target. This name is historic, and will be eventuall changed to metatarget - The generate method takes the build properties + The generate + method takes the build properties (as an instance of the property-set class) and returns a list containing: @@ -96,46 +97,50 @@ targets.generate-from-reference function can both lookup and generate a metatarget. - The abstract-target class has three immediate - derived classes: + The abstract-target + class has three immediate derived classes: - project-target that + project-target that corresponds to a project and is not intended for further subclassing. The generate method of this class builds all targets in the project that are not marked as explicit. - main-target corresponds to a target in a project + main-target + corresponds to a target in a project and contains one or more target alternatives. This class also should not be - subclassed. The generate method of this class selects - an alternative to build, and calls the generate method of that - alternative. + subclassed. The generate + method of this class selects an alternative to build, and calls the + generate + method of that alternative. - basic-target corresponds to a - specific target alternative. This is base class, with a number of - derived classes. The generate method + basic-target + corresponds to a specific target alternative. This is base class, + with a number of derived classes. The + generate method processes the target requirements and requested build properties to determine final properties for the target, builds all sources, and - finally calls the abstract construct method with the list - of source virtual targets, and the final properties. + finally calls the abstract + construct + method with the list of source virtual targets, and the final properties. - The instances of the project-target and - main-target classes are created + The instances of the project-target and + main-target classes are created implicitly—when loading a new Jamfiles, or when a new target alternative with as-yet unknown name is created. The instances of the - classes derived from basic-target are typically - created when Jamfile calls a metatarget rule, + classes derived from basic-target + are typically created when Jamfile calls a metatarget rule, such as such as exe. It it permissible to create a custom class derived from - basic-target and create new metatarget rule + basic-target and create new metatarget rule that creates instance of such target. However, in the majority - of cases, a specific subclass of basic-target— + of cases, a specific subclass of basic-target— typed-target is used. That class is associated with a type and relays to generators to construct concrete targets of that type. This process will be explained below.