summaryrefslogtreecommitdiff
path: root/boost/tools/build/doc/src/abstract-target.xml
blob: dad53380c409861d320b7b00a95b48544cb75e37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<?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.abstract-target">

  <title>Class abstract-target</title>
  <indexterm>
    <primary>abstract-target</primary>
  </indexterm>

  <para>
    Base class for all abstract targets.
  </para>

<programlisting language="jam">
class abstract-target {
    rule <link linkend="bbv2.reference.class.abstract-target.__init__">__init__</link> ( name : project )
    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> ( )
    rule <link linkend="bbv2.reference.class.abstract-target.__init__">generate</link> ( property-set )
}
</programlisting>

  <para>
    Classes derived from <link linkend="bbv2.reference.class.abstract-target">abstract-target</link>:
    <itemizedlist>
      <listitem>
        <link linkend="bbv2.reference.class.project-target">project-target</link>
      </listitem>
      <listitem>
        <link linkend="bbv2.reference.class.main-target">main-target</link>
      </listitem>
      <listitem>
        <link linkend="bbv2.reference.class.project-target">basic-target</link>
      </listitem>
    </itemizedlist>
  </para>

  <orderedlist>
    
    <listitem id="bbv2.reference.class.abstract-target.__init__">
      <code language="jam">rule __init__ ( name : project )</code>
      <para>
        <variablelist>
          <varlistentry>
            <term><literal>name</literal></term>
            <listitem>
              <para>The name of the target in the Jamfile.</para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term><literal>project</literal></term>
            <listitem>
              <para>The <link linkend="bbv2.reference.class.project-target">project</link> to which this target belongs.</para>
            </listitem>
          </varlistentry>
        </variablelist>
      </para>
    </listitem>

    <listitem id="bbv2.reference.class.abstract-target.name">
      <indexterm zone="bbv2.reference.class.abstract-target.name">
        <primary>name</primary>
        <secondary>Abstract Target</secondary>
      </indexterm>
      <code language="jam">rule name ( )</code>
      <para>Returns the name of this target.</para>
    </listitem>

    <listitem id="bbv2.reference.class.abstract-target.project">
      <indexterm zone="bbv2.reference.class.abstract-target.project">
        <primary>project</primary>
        <secondary>Abstract Target</secondary>
      </indexterm>
      <code language="jam">rule project ( )</code>
      <para>Returns the <link linkend="bbv2.reference.class.project-target">project</link> for this target.</para>
    </listitem>

    <listitem id="bbv2.reference.class.abstract-target.location">
      <indexterm zone="bbv2.reference.class.abstract-target.location">
        <primary>location</primary>
        <secondary>Abstract Target</secondary>
      </indexterm>
      <code language="jam">rule location ( )</code>
      <para>Returns the location where the target was declared.</para>
    </listitem>

    <listitem id="bbv2.reference.class.abstract-target.full-name">
      <indexterm zone="bbv2.reference.class.abstract-target.full-name">
        <primary>full-name</primary>
        <secondary>Abstract Target</secondary>
      </indexterm>
      <code language="jam">rule full-name ( )</code>
      <para>Returns a user-readable name for this target.</para>
    </listitem>

    <listitem id="bbv2.reference.class.abstract-target.generate">
      <indexterm zone="bbv2.reference.class.abstract-target.generate">
        <primary>generate</primary>
        <secondary>Abstract Target</secondary>
      </indexterm>
      <code language="jam">rule generate ( property-set )</code>
      <para>
        Generates virtual targets for this abstract target using the specified
        properties, unless a different value of some feature is required by the
        target.  This is an abstract method which must be overriden by derived
        classes.
      </para>
      
      <para>
        On success, returns:
        <itemizedlist>
          <listitem>a property-set with the usage requirements to be applied to dependents</listitem>
          <listitem>a list of produced virtual targets, which may be empty.</listitem>
        </itemizedlist>
        If <code language="jam">property-set</code> is empty, performs the
        default build of this target, in a way specific to the derived class.
      </para>
    </listitem>
    
  </orderedlist>
  
</section>