mirror of
https://github.com/boostorg/build.git
synced 2026-02-17 01:32:12 +00:00
Link to the new class docs.
[SVN r77761]
This commit is contained in:
@@ -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 <classname>abstract-target</classname>.
|
||||
class derived from <link linkend="bbv2.reference.class.abstract-target">abstract-target</link>.
|
||||
<footnote><para>This name is historic, and will be eventuall changed to
|
||||
<code>metatarget</code></para></footnote>
|
||||
</para>
|
||||
|
||||
<para>The <methodname>generate</methodname> method takes the build properties
|
||||
<para>The <link linkend="bbv2.reference.class.abstract-target.generate">generate</link>
|
||||
method takes the build properties
|
||||
(as an instance of the <classname>property-set</classname> class) and returns
|
||||
a list containing:</para>
|
||||
<itemizedlist>
|
||||
@@ -96,46 +97,50 @@
|
||||
<code>targets.generate-from-reference</code> function can both
|
||||
lookup and generate a metatarget.</para>
|
||||
|
||||
<para>The <classname>abstract-target</classname> class has three immediate
|
||||
derived classes:</para>
|
||||
<para>The <link linkend="bbv2.reference.class.abstract-target">abstract-target</link>
|
||||
class has three immediate derived classes:</para>
|
||||
<itemizedlist>
|
||||
|
||||
<listitem><para><classname>project-target</classname> that
|
||||
<listitem><para><link linkend="bbv2.reference.class.project-target">project-target</link> that
|
||||
corresponds to a project and is not intended for further
|
||||
subclassing. The <methodname>generate</methodname> method of this
|
||||
class builds all targets in the project that are not marked as
|
||||
explicit.</para></listitem>
|
||||
|
||||
<listitem><para><classname>main-target</classname> corresponds to a target in a project
|
||||
<listitem><para><link linkend="bbv2.reference.class.main-target">main-target</link>
|
||||
corresponds to a target in a project
|
||||
and contains one or more target alternatives. This class also should not be
|
||||
subclassed. The <methodname>generate</methodname> method of this class selects
|
||||
an alternative to build, and calls the <methodname>generate</methodname> method of that
|
||||
alternative.</para></listitem>
|
||||
subclassed. The <link linkend="bbv2.reference.class.main-target.generate">generate</link>
|
||||
method of this class selects an alternative to build, and calls the
|
||||
<link linkend="bbv2.reference.class.basic-target.generate">generate</link>
|
||||
method of that alternative.</para></listitem>
|
||||
|
||||
<listitem><para><classname>basic-target</classname> corresponds to a
|
||||
specific target alternative. This is base class, with a number of
|
||||
derived classes. The <methodname>generate</methodname> method
|
||||
<listitem><para><link linkend="bbv2.reference.class.basic-target">basic-target</link>
|
||||
corresponds to a specific target alternative. This is base class,
|
||||
with a number of derived classes. The
|
||||
<link linkend="bbv2.reference.class.basic-target.generate">generate</link> method
|
||||
processes the target requirements and requested build properties to
|
||||
determine final properties for the target, builds all sources, and
|
||||
finally calls the abstract <classname>construct</classname> method with the list
|
||||
of source virtual targets, and the final properties.
|
||||
finally calls the abstract
|
||||
<link linkend="bbv2.reference.class.basic-target.construct">construct</link>
|
||||
method with the list of source virtual targets, and the final properties.
|
||||
</para></listitem>
|
||||
|
||||
</itemizedlist>
|
||||
|
||||
<para>The instances of the <classname>project-target</classname> and
|
||||
<classname>main-target</classname> classes are created
|
||||
<para>The instances of the <link linkend="bbv2.reference.class.project-target">project-target</link> and
|
||||
<link linkend="bbv2.reference.class.main-target">main-target</link> 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 <classname>basic-target</classname> are typically
|
||||
created when Jamfile calls a <firstterm>metatarget rule</firstterm>,
|
||||
classes derived from <link linkend="bbv2.reference.class.basic-target">basic-target</link>
|
||||
are typically created when Jamfile calls a <firstterm>metatarget rule</firstterm>,
|
||||
such as such as <code>exe</code>.
|
||||
</para>
|
||||
|
||||
<para>It it permissible to create a custom class derived from
|
||||
<classname>basic-target</classname> and create new metatarget rule
|
||||
<link linkend="bbv2.reference.class.basic-target">basic-target</link> and create new metatarget rule
|
||||
that creates instance of such target. However, in the majority
|
||||
of cases, a specific subclass of <classname>basic-target</classname>—
|
||||
of cases, a specific subclass of <link linkend="bbv2.reference.class.basic-target">basic-target</link>—
|
||||
<classname>typed-target</classname> is used. That class is associated
|
||||
with a <firstterm>type</firstterm> and relays to <firstterm>generators</firstterm>
|
||||
to construct concrete targets of that type. This process will be explained below.
|
||||
|
||||
Reference in New Issue
Block a user