Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r77821 - trunk/tools/build/v2/doc/src
From: steven_at_[hidden]
Date: 2012-04-07 15:18:28


Author: steven_watanabe
Date: 2012-04-07 15:18:27 EDT (Sat, 07 Apr 2012)
New Revision: 77821
URL: http://svn.boost.org/trac/boost/changeset/77821

Log:
Document typed-target.
Added:
   trunk/tools/build/v2/doc/src/typed-target.xml (contents, props changed)
Text files modified:
   trunk/tools/build/v2/doc/src/extending.xml | 7 ++++---
   trunk/tools/build/v2/doc/src/reference.xml | 1 +
   2 files changed, 5 insertions(+), 3 deletions(-)

Modified: trunk/tools/build/v2/doc/src/extending.xml
==============================================================================
--- trunk/tools/build/v2/doc/src/extending.xml (original)
+++ trunk/tools/build/v2/doc/src/extending.xml 2012-04-07 15:18:27 EDT (Sat, 07 Apr 2012)
@@ -143,7 +143,7 @@
         <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 <link linkend="bbv2.reference.class.basic-target">basic-target</link>&mdash;
- <classname>typed-target</classname> is used. That class is associated
+ <link linkend="bbv2.reference.class.typed-target">typed-target</link> 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.
         When a new type is declared, a new metatarget rule is automatically defined.
@@ -207,11 +207,12 @@
         fact, Boost.Build defines concept of target type and
         <indexterm><primary>generators</primary></indexterm>
         <firstterm>generators</firstterm>, and has special metatarget class
- <classname>typed-target</classname>. Target type is merely an
+ <link linkend="bbv2.reference.class.typed-target">typed-target</link>. Target type is merely an
         identifier. It is associated with a set of file extensions that
         correspond to that type. Generator is an abstraction of a tool. It advertises
         the types it produces and, if called with a set of input target, tries to construct
- output targets of the advertised types. Finally, <classname>typed-target</classname>
+ output targets of the advertised types. Finally,
+ <link linkend="bbv2.reference.class.typed-target">typed-target</link>
         is associated with specific target type, and relays the generator (or generators)
         for that type.
         </para>

Modified: trunk/tools/build/v2/doc/src/reference.xml
==============================================================================
--- trunk/tools/build/v2/doc/src/reference.xml (original)
+++ trunk/tools/build/v2/doc/src/reference.xml 2012-04-07 15:18:27 EDT (Sat, 07 Apr 2012)
@@ -1959,6 +1959,7 @@
     <xi:include href="project-target.xml"/>
     <xi:include href="main-target.xml"/>
     <xi:include href="basic-target.xml"/>
+ <xi:include href="typed-target.xml"/>
     <xi:include href="property-set.xml"/>
   </section>
 

Added: trunk/tools/build/v2/doc/src/typed-target.xml
==============================================================================
--- (empty file)
+++ trunk/tools/build/v2/doc/src/typed-target.xml 2012-04-07 15:18:27 EDT (Sat, 07 Apr 2012)
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE section PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
+ "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+
+<section id="bbv2.reference.class.typed-target">
+
+ <title>Class typed-target</title>
+ <indexterm>
+ <primary>typed-target</primary>
+ </indexterm>
+
+<programlisting language="jam">
+class typed-target : <link linkend="bbv2.reference.class.basic-target">basic-target</link> {
+ rule <link linkend="bbv2.reference.class.typed-target.__init__">__init__</link> ( name : project : type : sources * : requirements * : default-build * : usage-requirements * )
+ rule <link linkend="bbv2.reference.class.typed-target.type">type</link> ( )
+ rule <link linkend="bbv2.reference.class.typed-target.construct">construct</link> ( name : source-targets * : property-set )
+
+ # Methods inherited from <link linkend="bbv2.reference.class.abstract-target">abstract-target</link>
+ rule <link linkend="bbv2.reference.class.abstract-target.name">name</link> ( )
+ rule <link linkend="bbv2.reference.class.abstract-target.project">project</link> ( )
+ rule <link linkend="bbv2.reference.class.abstract-target.location">location</link> ( )
+ rule <link linkend="bbv2.reference.class.abstract-target.full-name">full-name</link> ( )
+
+ # Methods inherited from <link linkend="bbv2.reference.class.basic-target">basic-target</link>
+ rule <link linkend="bbv2.reference.class.basic-target.generate">generate</link> ( property-set )
+ }
+</programlisting>
+
+ <para>
+ <link linkend="bbv2.reference.class.typed-target">typed-target</link>
+ is the most common kind of target alternative. Rules for creating
+ typed targets are defined automatically for each type.
+ </para>
+
+ <orderedlist>
+
+ <listitem id="bbv2.reference.class.typed-target.__init__">
+ <code language="jam">rule __init__ ( name : project : type : sources * : requirements * : default-build * : usage-requirements * )</code>
+ <para>
+ <variablelist>
+ <varlistentry>
+ <term><literal>name</literal></term>
+ <listitem><para>The name of the target</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>project</literal></term>
+ <listitem>
+ <para>
+ The <link linkend="bbv2.reference.class.project-target">project</link>
+ in which the target is declared.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><literal>type</literal></term>
+ <listitem>
+ <para>
+ The <link linkend="bbv2.reference.modules.type">type</link>
+ of the target.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </listitem>
+
+ <listitem id="bbv2.reference.class.typed-target.type">
+ <indexterm zone="bbv2.reference.class.typed-target.type">
+ <primary>type</primary>
+ <secondary>Typed Target Method</secondary>
+ </indexterm>
+ <code language="jam">rule type ( )</code>
+ <para>
+ Returns the <link linkend="bbv2.reference.modules.type">type</link>
+ of the target.
+ </para>
+ </listitem>
+
+ <listitem id="bbv2.reference.class.typed-target.construct">
+ <indexterm zone="bbv2.reference.class.typed-target.construct">
+ <primary>construct</primary>
+ <secondary>Typed Target Method</secondary>
+ </indexterm>
+ <code language="jam">rule construct ( name : source-targets * : property-set )</code>
+ <para>
+ Implements <link linkend="bbv2.reference.class.basic-target.construct">
+ basic-target.construct</link>. Attempts to create a target of
+ the correct type using generators appropriate for the given
+ <link linkend="bbv2.reference.class.property-set">property-set</link>.
+ Returns a <link linkend="bbv2.reference.class.property-set">
+ property-set</link> containing the usage requirements
+ and a list of virtual targets.
+
+ <note>
+ <para>
+ This function is invoked automatically by
+ <link linkend="bbv2.reference.class.basic-target.generate">basic-target.generate</link>
+ and should not be called directly by users.
+ </para>
+ </note>
+ </para>
+ </listitem>
+
+ </orderedlist>
+
+</section>


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk