AAP(1)

NAME
aap, a powerful build tool

SYNOPSIS
aap [-f recipe] [option ...] [VAR=value ...] [target ...]

DESCRIPTION
Aap executes recipes. A recipe has the structure of a Makefile: dependencies and build commands. Aap includes support for downloading, uploading, version control, Python commands and much more.

The default recipe used is "main.aap" in the current directory. Another one may be specified with the "-f" argument. For example, to use the recipe "doit.aap": aap -f doit.aap
An alternative is to use the "-u" or "--up" argument to search upwards in the directory tree for a "main.aap" recipe.

For the format of the recipe and the supported commands see the A-A-P web site: http://www.A-A-P.org/documentation.html. You may find it locally as /usr/local/share/doc/aap/index.html.

Here is an example for a recipe that compiles the "foobar" program from three source files: SOURCE = main.c common.c version.c TARGET = foobar

Target arguments indicate the files or virtual targets that are to be build. For example, this command builds the two targets "foo" and "bar": aap foo bar
When no target is specified on the command line, the target specified with TARGET in the recipe is build. If TARGET is not defined the "all" target is build. If there is no target argument, TARGET is not defined and there is no "all" target in the recipe this results in an error.

Assignments take the form "VAR=value". "VAR" is the name of a variable and "value" the value assigned to it. Example: aap GUI=motif
Note that aap does not use environment variables for internal variables to avoid unexpected side effects. Assignments on the command line do not overrule assignments in the recipe.

Here is an example that uses all of the above arguments to use the recipe "foo.aap", set the "BUILD" variable to "debug" and build the "test" target: aap -f foo.aap BUILD=debug test

OPTIONS
The options may be given in any order, before or after targets and assignments. Options without an argument can be combined after a single dash.

-   End of options, only targets and assignments follow

-a, --nocache
    Always download files, do not use the cache.

-c CMD, --command=CMD
    After reading the recipe execute CMD. No targets are build other than the one(s) specified in the command line.

-C, --contents
    Targets are only considered outdated when file contents changed, not when attributes or build signatures changed. Useful after changing a "publish" attribute that should not cause uploading or changing build commands that should not trigger them to be executed.

-d FLAGS, --debug=FLAGS
    Debug the specified items. Not yet implemented.

-f FILE, --recipe=FILE
    Specify the recipe to execute. If this is omitted the "main.aap" recipe will be used.

-F, --force
    Force building targets even when they are up-to-date.

-h, --help
    Print a help message and exit.

-I DIR, --include=DIR
    Directory to search for included recipes.

-j N, --jobs=N
    Maximum number of parallel jobs (not implemented yet).

-k, --continue
    Continue building after encountering an error. (Not fully implemented yet)

-l, --local
    Do not recurse into subdirectories. Applies to the "add" and "remove" targets. Also for "revise" concerning removing files.

-n, --nobuild
    Do not execute build commands, only display them. Commands at the toplevel and commands to discover dependencies will still be executed. System commands, commands that download, upload, write or delete files and version control commands are skipped. ":child" and ":include" commands won't work for recipes that have not been downloaded yet.

-N, --nofetch-recipe
    Do not fetch recipes when using the "fetch" or "update" argument, only fetch files.

--profile=FILE
    Profile execution and write the results in FILE. Use the Python pstats module to view the results. The PrintProfile module in aap lists the most useful info.

-R, --fetch-recipe
    For recipes that have a "fetch" attribute, obtain the latest version (refresh). This is done automatically for the "refresh", "fetch" and "update" targets, unless --nofetch-recipe was specified.

-s, --silent
    Print less information while executing recipes.

-S, --stop
    Stop building after encountering an error (this is the default).

-t, --touch
    Do not execute build commands but do update signatures as if they were build. After doing this the specified targets will be considered up-to-date. Commands at the toplevel will also be executed, except system commands, commands that write a file and version control commands.

-u, --search-up, --up
    Search the directory tree upwards for a "main.aap" recipe.

-v, --verbose
    Print more information while executing recipes.

-V, --version
    Print version information and exit.

FILES

/usr/local/share/doc/aap/*.html
    The aap documentation in HTML.

/usr/local/share/doc/aap/exec.pdf
    The aap documentation in PDF. Useful for printing.

AAP/log, AAP/log1, AAP/log2, ..., AAP/log9
    The log file with detailed messages about executing a recipe. Older log files are called log1, log2, etc.

For recent info see the A-A-P web site:
http://www.A-A-P.org/

EXIT VALUE
aap exits with a non-zero value when something went wrong.

AUTHOR
Project leader for A-A-P is Bram Moolenaar <Bram@A-A-P.org>.

BUGS
Probably. Not everything has been properly tested.