Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r77788 - trunk/tools/build/v2/doc/src
From: steven_at_[hidden]
Date: 2012-04-05 17:43:13


Author: steven_watanabe
Date: 2012-04-05 17:43:12 EDT (Thu, 05 Apr 2012)
New Revision: 77788
URL: http://svn.boost.org/trac/boost/changeset/77788

Log:
Add synopsis to basic-target/main-target/project-target.
Text files modified:
   trunk/tools/build/v2/doc/src/basic-target.xml | 69 +++++++++++++++++-------------------
   trunk/tools/build/v2/doc/src/main-target.xml | 46 +++++------------------
   trunk/tools/build/v2/doc/src/project-target.xml | 75 ++++++++++-----------------------------
   3 files changed, 63 insertions(+), 127 deletions(-)

Modified: trunk/tools/build/v2/doc/src/basic-target.xml
==============================================================================
--- trunk/tools/build/v2/doc/src/basic-target.xml (original)
+++ trunk/tools/build/v2/doc/src/basic-target.xml 2012-04-05 17:43:12 EDT (Thu, 05 Apr 2012)
@@ -9,9 +9,19 @@
     <primary>basic-target</primary>
   </indexterm>
 
- <para>
- Derived from <link linkend="bbv2.reference.class.abstract-target">abstract-target</link>.
- </para>
+<programlisting language="jam">
+class basic-target : <link linkend="bbv2.reference.class.abstract-target">abstract-target</link> {
+ rule <link linkend="bbv2.reference.class.basic-target.__init__">__init__</link> ( name : project : sources * : requirements * : default-build * : usage-requirements * )
+ rule <link linkend="bbv2.reference.class.basic-target.generate">generate</link> ( property-set )
+ rule <link linkend="bbv2.reference.class.basic-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> ( )
+}
+</programlisting>
 
   <para>
     Implements the most standard way of constructing main target alternative from
@@ -23,39 +33,24 @@
 
   <orderedlist>
 
- <listitem>
+ <listitem id="bbv2.reference.class.basic-target.__init__">
       <code language="jam">rule __init__ ( name : project : sources * : requirements * : default-build * : usage-requirements * )</code>
- </listitem>
-
- <listitem id="bbv2.reference.class.basic-target.name">
- <code language="jam">rule name ( )</code>
- <para>
- Returns the name of this target. Inherited from
- <link linkend="bbv2.reference.class.abstract-target">abstract-target</link>.
- </para>
- </listitem>
-
- <listitem id="bbv2.reference.class.basic-target.project">
- <code language="jam">rule project ( )</code>
- <para>
- Returns the project for this target. Inherited from
- <link linkend="bbv2.reference.class.abstract-target">abstract-target</link>.
- </para>
- </listitem>
-
- <listitem id="bbv2.reference.class.basic-target.location">
- <code language="jam">rule location ( )</code>
- <para>
- Return the location where the target was declared. Inherited from
- <link linkend="bbv2.reference.class.abstract-target">abstract-target</link>.
- </para>
- </listitem>
-
- <listitem id="bbv2.reference.class.basic-target.full-name">
- <code language="jam">rule full-name ( )</code>
       <para>
- Returns a user-readable name for this target. Inherited from
- <link linkend="bbv2.reference.class.abstract-target">abstract-target</link>.
+ <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>
+ </variablelist>
       </para>
     </listitem>
 
@@ -88,10 +83,10 @@
         <primary>construct</primary>
         <secondary>Basic Target Method</secondary>
       </indexterm>
- <code language="jam">rule construct ( name : source-targets * : properties * )</code>
+ <code language="jam">rule construct ( name : source-targets * : property-set )</code>
       <para>
- Constructs virtual targets for this abstract target and the dependency
- graph. Returns a usage-requirements property-set and a list of virtual
+ Constructs virtual targets for this abstract target. Returns a
+ usage-requirements property-set and a list of virtual
         targets. Should be overriden in derived classes.
       </para>
     </listitem>

Modified: trunk/tools/build/v2/doc/src/main-target.xml
==============================================================================
--- trunk/tools/build/v2/doc/src/main-target.xml (original)
+++ trunk/tools/build/v2/doc/src/main-target.xml 2012-04-05 17:43:12 EDT (Thu, 05 Apr 2012)
@@ -9,9 +9,17 @@
     <primary>main-target</primary>
   </indexterm>
 
- <para>
- Derived from <link linkend="bbv2.reference.class.abstract-target">abstract-target</link>.
- </para>
+<programlisting language="jam">
+class main-target : <link linkend="bbv2.reference.class.abstract-target">abstract-target</link> {
+ rule <link linkend="bbv2.reference.class.main-target.generate">generate</link> ( 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> ( )
+}
+</programlisting>
 
   <para>
     A <link linkend="bbv2.reference.class.main-target">main-target</link>
@@ -20,38 +28,6 @@
 
   <orderedlist>
 
- <listitem id="bbv2.reference.class.main-target.name">
- <code language="jam">rule name ( )</code>
- <para>
- Returns the name of this target. Inherited from
- <link linkend="bbv2.reference.class.abstract-target">abstract-target</link>.
- </para>
- </listitem>
-
- <listitem id="bbv2.reference.class.main-target.project">
- <code language="jam">rule project ( )</code>
- <para>
- Returns the project for this target. Inherited from
- <link linkend="bbv2.reference.class.abstract-target">abstract-target</link>.
- </para>
- </listitem>
-
- <listitem id="bbv2.reference.class.main-target.location">
- <code language="jam">rule location ( )</code>
- <para>
- Return the location where the target was declared. Inherited from
- <link linkend="bbv2.reference.class.abstract-target">abstract-target</link>.
- </para>
- </listitem>
-
- <listitem id="bbv2.reference.class.main-target.full-name">
- <code language="jam">rule full-name ( )</code>
- <para>
- Returns a user-readable name for this target. Inherited from
- <link linkend="bbv2.reference.class.abstract-target">abstract-target</link>.
- </para>
- </listitem>
-
     <listitem id="bbv2.reference.class.main-target.generate">
       <indexterm zone="bbv2.reference.class.main-target.generate">
         <primary>generate</primary>

Modified: trunk/tools/build/v2/doc/src/project-target.xml
==============================================================================
--- trunk/tools/build/v2/doc/src/project-target.xml (original)
+++ trunk/tools/build/v2/doc/src/project-target.xml 2012-04-05 17:43:12 EDT (Thu, 05 Apr 2012)
@@ -8,10 +8,22 @@
   <indexterm>
     <primary>project-target</primary>
   </indexterm>
-
- <para>
- Derived from <link linkend="bbv2.reference.class.abstract-target">abstract-target</link>.
- </para>
+
+<programlisting language="jam">
+class project-target : <link linkend="bbv2.reference.class.abstract-target">abstract-target</link> {
+ rule <link linkend="bbv2.reference.class.project-target.generate">generate</link> ( property-set )
+ rule <link linkend="bbv2.reference.class.project-target.build-dir">build-dir</link> ( )
+ rule <link linkend="bbv2.reference.class.project-target.main-target">main-target</link> ( name )
+ rule <link linkend="bbv2.reference.class.project-target.has-main-target">has-main-target</link> ( name )
+ rule <link linkend="bbv2.reference.class.project-target.find">find</link> ( id : no-error ? )
+
+ # 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> ( )
+}
+</programlisting>
 
   <para>
     This class has the following responsibilities:
@@ -23,59 +35,9 @@
       </listitem>
     </itemizedlist>
   </para>
-
- <para>
- Main targets are constructed in two stages:
- <itemizedlist>
- <listitem>
- <para>
- When Jamfile is read, a number of calls to 'add-alternative' are made. At
- that time, alternatives can also be renamed to account for inline targets.
- </para>
- </listitem>
- <listitem>
- <para>
- The first time 'main-target' or 'has-main-target' rule is called, all
- alternatives are enumerated and main targets are created.
- </para>
- </listitem>
- </itemizedlist>
- </para>
 
   <orderedlist>
 
- <listitem id="bbv2.reference.class.project-target.name">
- <code language="jam">rule name ( )</code>
- <para>
- Returns the name of this target. Inherited from
- <link linkend="bbv2.reference.class.abstract-target">abstract-target</link>.
- </para>
- </listitem>
-
- <listitem id="bbv2.reference.class.project-target.project">
- <code language="jam">rule project ( )</code>
- <para>
- Returns the project for this target. Inherited from
- <link linkend="bbv2.reference.class.abstract-target">abstract-target</link>.
- </para>
- </listitem>
-
- <listitem id="bbv2.reference.class.project-target.location">
- <code language="jam">rule location ( )</code>
- <para>
- Return the location of the project. Inherited from
- <link linkend="bbv2.reference.class.abstract-target">abstract-target</link>.
- </para>
- </listitem>
-
- <listitem id="bbv2.reference.class.project-target.full-name">
- <code language="jam">rule full-name ( )</code>
- <para>
- Returns a user-readable name for this target. Inherited from
- <link linkend="bbv2.reference.class.abstract-target">abstract-target</link>.
- </para>
- </listitem>
-
     <listitem id="bbv2.reference.class.project-target.generate">
       <indexterm zone="bbv2.reference.class.project-target.generate">
         <primary>generate</primary>
@@ -117,7 +79,9 @@
       <code language="jam">rule main-target ( name )</code>
       <para>
         Returns a <link linkend="bbv2.reference.class.main-target">main-target</link>
- class instance corresponding to <literal>name</literal>.</para>
+ class instance corresponding to <literal>name</literal>.
+ Can only be called after the project has been fully loaded.
+ </para>
     </listitem>
 
     <listitem id="bbv2.reference.class.project-target.has-main-target">
@@ -129,6 +93,7 @@
       <para>
         Returns whether a <link linkend="bbv2.reference.class.main-target">main-target</link>
         with the specified name exists.
+ Can only be called after the project has been fully loaded.
       </para>
     </listitem>
 


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