Browse Source

- Call-Graphs

- Root-Tasks

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@893134 13f79535-47bb-0310-9956-ffa450edef68
master
Jan Materne 15 years ago
parent
commit
96a7c2dc08
1 changed files with 29 additions and 2 deletions
  1. +29
    -2
      docs/manual/targets.html

+ 29
- 2
docs/manual/targets.html View File

@@ -52,6 +52,8 @@
C, then B and then A is executed. Wrong! C depends on B, and B
depends on A, so first A is executed, then B, then C, and finally
D.</p>
<blockquote><pre><b>Call-Graph:</b> A --> B --> C --> D</pre></blockquote>

<p>In a chain of dependencies stretching back from a given target
such as D above, each target gets executed only once, even when
@@ -109,6 +111,8 @@
&lt/target&gt;
</pre></blockquote>

<blockquote><pre><b>Call-Graph:</b> myTarget.check --> maybe(myTarget)</pre></blockquote>

<p>If no <code>if</code> and no <code>unless</code> attribute is
present, the target will always be executed.</p>

@@ -131,8 +135,25 @@
so-called <i>initialization</i> target, on which all other targets
depend. Make sure that target is always the first one in the
depends list of the other targets. In this manual, most
initialization targets have the
name <code>&quot;init&quot;</code>.</p>
initialization targets have the name <code>&quot;init&quot;</code>.</p>
<blockquote><pre>
&lt;project&gt;
&lt;target name=&quot;init&quot;&gt;
&lt;tstamp/&gt;
&lt;/target&gt;
&lt;target name=&quot;otherTarget&quot; depends=&quot;init&quot;&gt;
...
&lt;/target&gt;
&lt;/project&gt;
</pre></blockquote>

<p>Especially if you only have a few tasks you also could place these
tasks direclty under the project tag (since Ant 1.6.0):</p>
<blockquote><pre>
&lt;project&gt;
&lt;tstamp/&gt;
&lt;/project&gt;
</pre></blockquote>

<p>If the depends attribute and the if/unless attribute are set, the
depends attribute is executed first.</p>
@@ -242,6 +263,9 @@
&lt;/target&gt;
</pre></blockquote>

<blockquote><pre><b>Call-Graph:</b> create-directory-layout --> 'empty slot' --> compile</pre></blockquote>


<p>And you need to generate some source before compilation, then in
your main build file you may use something like</p>
<blockquote><pre>
@@ -251,6 +275,9 @@
&lt;/target&gt;
</pre></blockquote>

<blockquote><pre><b>Call-Graph:</b> create-directory-layout --> generate-sources --> compile</pre></blockquote>


<p>This will ensure that the <em>generate-sources</em> target is
executed before the <em>compile</em> target.</p>



Loading…
Cancel
Save