Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > a6d417e36f6bb1154f4c003e6717e298 > files > 123

a-a-p-1.090-2mdv2009.0.noarch.rpm

<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 32. Aap Command Line Arguments</title><meta name="generator" content="DocBook XSL Stylesheets V1.71.1"><link rel="start" href="index.html" title="A-A-P Recipe Executive"><link rel="up" href="reference.html" title="Part III. Reference Manual"><link rel="prev" href="reference.html" title="Part III. Reference Manual"><link rel="next" href="ref-syntax.html" title="Chapter 33. Recipe Syntax"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table width="100%" id="navtable"><tbody><tr><td align="left" class="left" width="33%"><b><a href="http://www.a-a-p.org">A-A-P home page</a></b></td><td align="center" class="center" width="34%"><b><a href="index.html">A-A-P Recipe Executive</a></b></td><td align="right" class="right" width="33%"></td></tr><tr><td align="left" class="left"><a accesskey="p" href="reference.html">Prev</a></td><td align="center" class="center">Reference Manual</td><td align="right" class="right"><a accesskey="n" href="ref-syntax.html">Next</a></td></tr></tbody></table><hr><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="ref-arguments"></a>Chapter 32. Aap Command Line Arguments</h2></div></div></div><h2><a name="id2665159"></a>Three Kinds Of Arguments</h2><p>
<strong class="userinput"><code>
  aap [option]... [assignment]... [target]...
</code></strong>
</p><p>
The order of arguments is irrelevant.
Options are explained in the next section.
</p><p>
Assignments take the form "VAR=value".  This works just like putting this at
the top of the main recipe used.  But the shell used to start Aap may require
escaping special characters, such as spaces.  Putting the argument in double
quotes often works (but not always).
</p><p>
Targets specify what needs to be done.
If no target is given, one of the targets in the recipe is executed, see
<a href="user-basics.html#recipe-execution"> Recipe Execution Details</a>.
</p><p>
Variables in the targets are expanded.  This makes it possible to build a
target in a directory whose name is set in the recipe.  For example, to build
a target in $BDIR:
</p><p>
</p><pre class="programlisting">
       aap '$BDIR/foo.o'
</pre><p>
</p><p>
Note: you must make sure that the variable is not expanded by the shell.  In
the example this is done by putting the argument in single quotes.  This works
for most Unix shells.  To use a target with a $ character in the name use $($)
in place of the $.
</p><h2><a name="ref-options"></a>Options</h2><p>
An option must appear only once, except for the ones that are noted to be
allowed multiple times.

</p><div class="variablelist"><dl><dt><a name="option-nocache"></a><span class="term"><div class="cmdsynopsis"><p><code class="command">-a</code> <br><code class="command">--nocache</code> </p></div></span></dt><dd><p>
       For a remote file, don't use a cached copy. Download it once for this
       invocation.  Note that the file may be downloaded anyway, because it is
       not always possible to check if the cached copy is still valid.  Use
       the {usecache} or {constant} attribute on a file to use the cached
       version whenever possible, see <a href="ref-commands.html#cmd-fetch">:fetch</a>.
      </p></dd><dt><a name="option-command"></a><span class="term"><div class="cmdsynopsis"><p><code class="command">-c</code>   <em class="replaceable"><code>command</code></em> <br><code class="command">--command</code>   <em class="replaceable"><code>command</code></em> </p></div></span></dt><dd><p>
        After reading the recipe, execute <em class="replaceable"><code>command</code></em>.  May appear
        several times, all the commands are executed.
      </p><p>
        Commands to be executed can be specified on the command line.
        This is useful, for example, to fetch individual files:
        </p><p>
</p><pre class="programlisting">
        aap -c ":fetch main.c"
        aap -c ":commit common.h"
</pre><p>
        </p><p>
        Since the recipe is first read (and all child recipes), the
        attributes that are given to "main.c" will be used for
        fetching.
        </p><p>
        The commands are executed before updating targets.
        When no target is specified nothing is built, only the
        specified commands are executed.  But the toplevel commands in
        the recipe are always executed, before executing the command
        arguments.
        </p><p>
        Keep in mind that the shell must not change the argument, use
        single quotes to avoid $VAR to be expanded by the shell:
        </p><p>
</p><pre class="programlisting">
        aap -c ':print $SOURCE'
</pre><p>
        </p></dd><dt><a name="option-changed"></a><span class="term"><div class="cmdsynopsis"><p><code class="command">--changed</code>   <em class="replaceable"><code>file</code></em> </p></div></span></dt><dd><p>
        The file <em class="replaceable"><code>file</code></em> is considered changed, no matter whether
        it was
        really changed.  Targets build from <em class="replaceable"><code>file</code></em> will also be
        considered changed, recursively.
        </p><p>
          Similar to the recipe command
          <a href="ref-commands.html#cmd-changed">:changed</a> <em class="replaceable"><code>file</code></em>.
      </p></dd><dt><a name="option-contents"></a><span class="term"><div class="cmdsynopsis"><p><code class="command">-C</code> <br><code class="command">--contents</code> </p></div></span></dt><dd><p>
        Only take action when file contents was changed, not when build
        commands or attributes changed.
      </p><p>
        For normal dependencies the buildcheck is ignored.  This means
        that the build commands can be changed without causing them to
        be executed.  The commands are executed anyway when one of the
        sources is out-of-date.
      </p><p>
        For publishing the "publish" attribute is ignored.  The file
        is still published when its contents changed since the last
        time it was published to any destination, or if it was never
        published.
      </p><p>
        The signatures are updated as usual (unless --nobuild is used as
        well).  Thus the new buildcheck and "publish" attribute are stored.
        This is useful if the buildcheck or "publish" argument changed in a
        way that you know does not require building or publishing.
      </p></dd><dt><a name="option-debug"></a><span class="term"><div class="cmdsynopsis"><p><code class="command">-d</code>   <em class="replaceable"><code>flags</code></em> <br><code class="command">--debug</code>   <em class="replaceable"><code>flags</code></em> </p></div></span></dt><dd><p>
      Switch on debugging for <em class="replaceable"><code>flags</code></em>.  Not implemented yet.
      </p></dd><dt><a name="option-recipe"></a><span class="term"><div class="cmdsynopsis"><p><code class="command">-f</code>   <em class="replaceable"><code>file</code></em> <br><code class="command">--recipe</code>   <em class="replaceable"><code>file</code></em> </p></div></span></dt><dd><p>
       Specify the main recipe to read.  When an URL is used the recipe is
       downloaded to the current directory before it is used.  The name is the
       last part of the path.  If it already exists the user is asked whether
       it should be overwritten.  Example:
      </p><div class="literallayout"><p>        cd /usr/local/share/vim/vim62/runtime<br>
        aap -f ftp://ftp.vim.org/pub/vim/runtime/main.aap </p></div><p>
        When the file is "NONE" no recipe is read.  This is useful when only a
        command is to be executed.  Example:
      </p><div class="literallayout"><p>        aap -f NONE -c ':print $AAP' </p></div></dd><dt><a name="option-force"></a><span class="term"><div class="cmdsynopsis"><p><code class="command">-F</code> <br><code class="command">--force</code> </p></div></span></dt><dd><p>
       Force rebuilding everything.
       That a target is already up-to-date is ignored.
      </p></dd><dt><a name="option-help"></a><span class="term"><div class="cmdsynopsis"><p><code class="command">-h</code> <br><code class="command">--help</code> </p></div></span></dt><dd><p>
        Print a help message and exit.
        Does not read a recipe.
      </p></dd><dt><a name="option-include"></a><span class="term"><div class="cmdsynopsis"><p><code class="command">-I</code>   <em class="replaceable"><code>directory</code></em> <br><code class="command">--include</code>   <em class="replaceable"><code>directory</code></em> </p></div></span></dt><dd><p>
        Add a directory to search for included recipes.
        This option may appear multiple times.
      </p></dd><dt><a name="option-install"></a><span class="term"><div class="cmdsynopsis"><p><code class="command">--install</code>   <em class="replaceable"><code>package</code></em> </p></div></span></dt><dd><p>
        Install the package <em class="replaceable"><code>package</code></em>.  Only works for those
        packages that are supported, such as "cvs" and "rcp".
      </p><p>
      Does not read a recipe in the usual way, only the specified package is
      installed.
      </p></dd><dt><a name="option-jobs"></a><span class="term"><div class="cmdsynopsis"><p><code class="command">-j</code>   <em class="replaceable"><code>number</code></em> <br><code class="command">--jobs</code>   <em class="replaceable"><code>number</code></em> </p></div></span></dt><dd><p>
        Maximum number of parallel jobs.  Not implemented yet.
      </p></dd><dt><a name="option-continue"></a><span class="term"><div class="cmdsynopsis"><p><code class="command">-k</code> <br><code class="command">--continue</code> </p></div></span></dt><dd><p>
        Continue after encountering an error.
        </p><p>
        When an error is detected in a block of build commands, the execution
        of that block is aborted.  Building continues for other targets, but a
        target that depends on a target that failed to build will not be
        build.
        </p><p>
        To continue execution after an error in the same block of commands
        use the Python ":try" statement.  Example:
        </p><pre class="programlisting">
        @try:
            :print  this is an $error
        @except UserError, e:
            :print caught error: `str(e)`
</pre><p>
        </p><p>
        Not fully implemented, still stops at some errors.
        Careful: When an error has side effects strange things may happen.
      </p></dd><dt><a name="option-local"></a><span class="term"><div class="cmdsynopsis"><p><code class="command">-l</code> <br><code class="command">--local</code> </p></div></span></dt><dd><p>
         Do not recurse into subdirectories.  Only applies to "add" and
         "remove" targets on the command line.  Also for "revise" for its
         remove action.
      </p></dd><dt><a name="option-nobuild"></a><span class="term"><div class="cmdsynopsis"><p><code class="command">-n</code> <br><code class="command">--nobuild</code> </p></div></span></dt><dd><p>
       Only print messages about what will be done, don't execute
        build rules.  Commands at the toplevel and commands to
        discover dependencies are executed, but system commands,
        commands that download, upload, write or delete files and
        version control commands are skipped.
        </p><p>
          Note: since no files are downloaded,
          <a href="ref-commands.html#cmd-child">:child</a> commands won't
        work for not existing recipes.
      </p></dd><dt><a name="option-nofetch-recipe"></a><span class="term"><div class="cmdsynopsis"><p><code class="command">-N</code> <br><code class="command">--nofetch-recipe</code> </p></div></span></dt><dd><p>
        Do not fetch recipes when using the "fetch" and "update"
        targets.  Useful if the current recipe is to be used while
        files must be fetched.
      </p></dd><dt><a name="option-profile"></a><span class="term"><div class="cmdsynopsis"><p><code class="command">--profile</code>   <em class="replaceable"><code>file</code></em> </p></div></span></dt><dd><p>
        Profile the execution of A-A-P and write the results in
        <em class="replaceable"><code>file</code></em>.
        This file can then be examined with the standard Python module
        "pstats".  The PrintProfile.py script can be used for this (it is
        located with the other <span class="application">Aap</span> modules).
      </p></dd><dt><a name="option-fetch-recipe"></a><span class="term"><div class="cmdsynopsis"><p><code class="command">-R</code> <br><code class="command">--fetch-recipe</code> </p></div></span></dt><dd><p>
        Fetch the recipe and child recipes.  This is impled by using
        a "refresh", "fetch" or "update" target, unless
        "--nofetch-recipe" is used.
      </p></dd><dt><a name="option-stop"></a><span class="term"><div class="cmdsynopsis"><p><code class="command">-S</code> <br><code class="command">--stop</code> </p></div></span></dt><dd><p>
        Stop building after encountering an error.
        This is the default, thus this option has no effect.
        Also see <a href="ref-arguments.html#option-continue">--continue</a>.
      </p></dd><dt><a name="option-silent"></a><span class="term"><div class="cmdsynopsis"><p><code class="command">-s</code> <br><code class="command">--silent</code> </p></div></span></dt><dd><p>
       Print less information, see <a href="ref-variables.html#var-message">$MESSAGE</a>.
      </p></dd><dt><a name="option-touch"></a><span class="term"><div class="cmdsynopsis"><p><code class="command">-t</code> <br><code class="command">--touch</code> </p></div></span></dt><dd><p>
         Update signatures on targets without executing build commands.
          After doing this the specified targets and intermediate
          results are considered up-to-date.
        </p><p>
          Commands at the toplevel will be executed, except system
          commands, commands that write a file and version control
          commands.
      </p></dd><dt><a name="option-up"></a><span class="term"><div class="cmdsynopsis"><p><code class="command">-u</code> <br><code class="command">--up</code> <br><code class="command">--search-up</code> </p></div></span></dt><dd><p>
        Search the directory tree upwards for the main.aap recipe.
        Useful when in a sub-directory of a large project, where the main.aap
        recipe is an unknown number of directory levels upwards.
      </p></dd><dt><a name="option-version"></a><span class="term"><div class="cmdsynopsis"><p><code class="command">-V</code> <br><code class="command">--version</code> </p></div></span></dt><dd><p>
        Print version information and exit.
        Does not read a recipe.
      </p></dd><dt><a name="option-verbose"></a><span class="term"><div class="cmdsynopsis"><p><code class="command">-v</code> <br><code class="command">--verbose</code> </p></div></span></dt><dd><p>
       Print more information, see <a href="ref-variables.html#var-message">$MESSAGE</a>.
      </p></dd><dt><a name="option-end"></a><span class="term"><div class="cmdsynopsis"><p><code class="command">--</code> </p></div></span></dt><dd><p>
          End of options, only targets and assignments follow.  Use this when
          a target starts with a "-".
      </p></dd></dl></div><p>
</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="reference.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ref-syntax.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Part III. Reference Manual </td><td width="20%" align="center"><a accesskey="h" href="index.html">
		    Contents</a></td><td width="40%" align="right" valign="top"> Chapter 33. Recipe Syntax</td></tr></table></div></body></html>