/[eiffelstudio]/vendor/gobosoft.com/gobo/current/doc/geant/target.xml
ViewVC logotype

Contents of /vendor/gobosoft.com/gobo/current/doc/geant/target.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 90767 - (show annotations)
Tue Jan 22 00:56:30 2013 UTC (6 years, 8 months ago) by manus
File MIME type: text/xml
File size: 8931 byte(s)
Updated svn:eol-style to be native and svn:mime-style to be text/xml

1 <?xml version="1.0"?>
2
3 <!--
4 description:
5
6 "Target"
7
8 library: "Gobo Eiffel Ant"
9 copyright: "Copyright (c) 2004, Sven Ehrke and others"
10 license: "MIT License"
11 date: "$Date$"
12 revision: "$Revision$"
13 -->
14
15 <chapter xmlns="http://www.gobosoft.com/eiffel/gobo/documentation" id="target">
16 <chapterinfo>
17 <copyright>
18 <year>2002-2005</year>
19 <holder>Sven Ehrke</holder>
20 </copyright>
21 <author>
22 <firstname>Sven</firstname><surname>Ehrke</surname>
23 </author>
24 <email>ericb@gobosoft.com</email>
25 <date>7 July 2005</date>
26 </chapterinfo>
27
28 <title>Target</title>
29
30 <section id="target_description">
31 <title>Description</title>
32 <para>
33 A build file's target is comparable to a method of class in an object oriented
34 programming language. Targets can be invoked from the command line or from within
35 the build script itself. If a build script 'build.eant' contains a target 't1' for
36 example you can invoke this target from the commondline like this:
37 </para>
38 <programlisting><![CDATA[
39 geant t1
40 ]]>
41 </programlisting>
42 </section>
43
44 <section id="target_parameters">
45 <title>Parameters</title>
46
47 <variablelist>
48 <varlistentry>
49 <term>name</term>
50 <listitem>
51 <para><emphasis>Description: </emphasis>
52 The target's name. The name must be unique within the build file. If the build file
53 inherits from other build file(s) the inheritance rules must be followed as well.
54 The mechanisms to resolve naming conflicts are basically the same as in the Eiffel
55 programming language. Since probably all users of geant are Eiffel developers and thus
56 are familiar with Eiffel's inheritance mechanisms these rules are not documented.
57 Geant will display error messages in case these rules are violated.
58 </para>
59 </listitem>
60 <listitem>
61 <para><emphasis>Domain: </emphasis>String</para>
62 </listitem>
63 <listitem>
64 <para><emphasis>Default: </emphasis>-</para>
65 </listitem>
66 </varlistentry>
67 <varlistentry>
68 <term>if</term>
69 <listitem>
70 <para><emphasis>Description: </emphasis>
71 execute target only if the variable used in the attribute value is defined. If the
72 value is '$some_var' for example and the variable name 'some_var' is defined the target
73 will be executed (but only if evaluation of attribute 'unless' does not prevent this).
74 Note that the variable can also reference an environment variable like '$WINDIR' for example.
75 In addition to simply checking if a variable is defined or not it is also possible to check if its
76 value is equal to a certain string. This is done like this: '${some_var}=some_value'. At the
77 moment only equality comparison is supported. For convenience (when automatically generating
78 geant build files), it is also accepted to pass "true" or "false" as attribute value. In
79 that case the target is executed only if the attribute value is "true".
80 </para>
81 </listitem>
82 <listitem>
83 <para><emphasis>Domain: </emphasis>variable definition or variable-value comparison</para>
84 </listitem>
85 <listitem>
86 <para><emphasis>Default: </emphasis>-</para>
87 </listitem>
88 </varlistentry>
89 <varlistentry>
90 <term>unless</term>
91 <listitem>
92 <para><emphasis>Description: </emphasis>
93 The description of attribute 'if' is valid for this attribute as well with the difference
94 that the evaluation of the attribute value is negated. Thus this means the target is
95 executed only if the variable referenced in the attribute value is not defined etc.
96 (but only if evaluation of attribute 'if' does not prevent this)
97 </para>
98 </listitem>
99 <listitem>
100 <para><emphasis>Domain: </emphasis>variable definition or variable-value comparison</para>
101 </listitem>
102 <listitem>
103 <para><emphasis>Default: </emphasis>-</para>
104 </listitem>
105 </varlistentry>
106 <varlistentry>
107 <term>once</term>
108 <listitem>
109 <para><emphasis>Description: </emphasis>Should target be executed only once?
110 If set to 'true' this target will be executed only on it's first invocation.
111 Note: Use this attribute instead of the obsolete attribute 'depend'
112 </para>
113 </listitem>
114 <listitem>
115 <para><emphasis>Domain: </emphasis>true|false</para>
116 </listitem>
117 <listitem>
118 <para><emphasis>Default: </emphasis>false</para>
119 </listitem>
120 </varlistentry>
121 <varlistentry>
122 <term>depend</term>
123 <listitem>
124 <para><emphasis>Description: </emphasis>Obsolete. Use attribute 'once' instead.
125 Comma separated list of names of targets which should be invoked before this target is executed.
126 Execution of targets is done from left to rights. Thus if the value of this attribute is 'a,b,c'
127 The first target 'a', then target 'b' and finally target 'c' are called. Note that these targets
128 are only executed if they have not been executed before.
129 </para>
130 </listitem>
131 <listitem>
132 <para><emphasis>Domain: </emphasis>Comma separated list of target names</para>
133 </listitem>
134 <listitem>
135 <para><emphasis>Default: </emphasis>-</para>
136 </listitem>
137 </varlistentry>
138 </variablelist>
139 </section>
140
141 <section id="fileset_nested_parameters">
142 <title>Parameters specified as nested elements</title>
143
144 <variablelist>
145 <varlistentry>
146 <term>obsolete</term>
147 <listitem>
148 <para><emphasis>Description: </emphasis>If provided marks this target as obsolete.
149 The nested text is displayed if this target gets executed. The target list (shown by
150 invoking 'geant -t' will include this text as well next
151 to the target's description.
152 </para>
153 </listitem>
154 <listitem>
155 <para><emphasis>Domain: </emphasis>Text</para>
156 </listitem>
157 <listitem>
158 <para><emphasis>Default: </emphasis>-</para>
159 </listitem>
160 </varlistentry>
161
162 <varlistentry>
163 <term>description</term>
164 <listitem>
165 <para><emphasis>Description: </emphasis>A description of what this target does.
166 The target list (shown by invoking 'geant -t' will include this text next
167 to the target's name.
168 </para>
169 </listitem>
170 <listitem>
171 <para><emphasis>Domain: </emphasis>Text</para>
172 </listitem>
173 <listitem>
174 <para><emphasis>Default: </emphasis>-</para>
175 </listitem>
176 </varlistentry>
177 <varlistentry>
178 <term>argument</term>
179 <listitem>
180 <para><emphasis>Description: </emphasis>Element representing a formal argument
181 of this target. The name of the argument is specified by it's attribute 'name'.
182 There can be any number of this element to specify an arbitrary number of arguments.
183 It is not allowed to have two or more argument elements with the same name. The
184 sequence of the argument definition is important since it defines the actual to
185 formal argument value assignments when it is called in the so called terse way (see
186 documentation of tasks 'geant' and 'precursor' for more information). If the target is
187 redefined the number of arguments must match the precursor's.
188 </para>
189 </listitem>
190 <listitem>
191 <para><emphasis>Domain: </emphasis>-</para>
192 </listitem>
193 <listitem>
194 <para><emphasis>Default: </emphasis>-</para>
195 </listitem>
196 </varlistentry>
197 </variablelist>
198 </section>
199
200 <section id="target_specification">
201 <title>RNG Specification</title>
202
203 <programlisting><![CDATA[
204 <define name="target">
205 <element name="target">
206 <optional>
207 <element name="obsolete">
208 <text/>
209 </element>
210 </optional>
211 <zeroOrMore>
212 <element name="argument">
213 <attribute name="name"/>
214 </element>
215 </zeroOrMore>
216 <ref name="description"/>
217 <attribute name="name"/>
218 <optional>
219 <attribute name="once"/>
220 </optional>
221 <optional>
222 <attribute name="depend"/>
223 </optional>
224 <ref name="dir_if_unless"/>
225 <ref name="tasks"/>
226 </element>
227 </define>
228
229 <define name="tasks">
230 <zeroOrMore>
231 <choice>
232 <ref name="available"/>
233 <ref name="copy"/>
234 <ref name="echo"/>
235 <ref name="delete"/>
236 <ref name="exec"/>
237 <ref name="exit"/>
238 <ref name="geant"/>
239 <ref name="gelex"/>
240 <ref name="geyacc"/>
241 <ref name="gepp"/>
242 <ref name="getest"/>
243 <ref name="gexace"/>
244 <ref name="gexmlsplit"/>
245 <ref name="input"/>
246 <ref name="ise"/>
247 <ref name="mkdir"/>
248 <ref name="move"/>
249 <ref name="outofdate"/>
250 <ref name="precursor"/>
251 <ref name="replace"/>
252 <ref name="set"/>
253 <ref name="setenv"/>
254 <ref name="unset"/>
255 <ref name="xslt"/>
256 </choice>
257 </zeroOrMore>
258 </define>
259 ]]>
260 </programlisting>
261 </section>
262
263 <section id="target_examples">
264 <title>Examples</title>
265
266 <programlisting><![CDATA[
267 <target name="t1">
268 <echo message="This is target 't1'"/>
269 </target>
270 ]]>
271 </programlisting>
272 </section>
273 </chapter>

Properties

Name Value
svn:mime-type text/xml

  ViewVC Help
Powered by ViewVC 1.1.23