Aap Command Line Arguments

A-A-P home page | A-A-P Recipe Executive
--- | ---
Prev |  | Next

# Chapter 25. Aap Command Line Arguments

## Three Kinds Of Arguments

`aap [option]... [assignment]... [target]...`

The order of arguments is irrelevant. Options are explained in the next section.

Assignments take the form "VAR=value". This works just like putting this at the top of the main recipe used.

Targets specify what needs to be done. If "target" is omitted, one of the targets in the recipe is executed, see RECIPE EXECUTING.

## Options

    -a
    --nocache	For remote files, don't use cached files, download it once for
    		this invocation.

    -c command
    --command command
    		After reading the recipe, execute "command".  May appear
    		several times, all the commands are executed.

    		Commands to be executed can be specified on the command line.
    		This is useful, for example, to fetch individual files:

    	aap -c ":fetch main.c"
    	aap -c ":commit common.h"

    		Since the recipe is first read (and all child recipes), the
    		attributes that are given to "main.c" will be used for
    		fetching.

    		When no target is specified nothing is build, only the
    		specified commands are executed.  But the toplevel commands in
    		the recipe are always executed.

    		Keep in mind that the shell must not change the argument, use
    		single quotes to avoid $VAR to be expanded by the shell:

    	aap -c ':print $SOURCE'

    -C
    --contents	Only take action when file contents was changed, not when
    		build commands or attributes changed.

    		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.

    		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.

    		The signatures are updated (unless --nobuild is used as well).
    		Thus the next invocation without "--contents" will not build
    		or publish as well.

    -d flags	switch on debugging for 'flags'

    -f FILE
    --recipe FILE	specify recipe to execute

    -F
    --force		force rebuilding even when a target appears up-to-date

    -h
    --help		print help message and exit

    -I DIR
    --include DIR	directory to search for included recipes

    -j N
    --jobs N	maximum number of parallel jobs

    -k
    --continue	continue after encountering an error

    -l
    --local		Do not recurse into subdirectories.  Only applies to "add" and
    		"remove" targets on the command line.  Also for "revise" for
    		its remove action.

    -n
    --nobuild	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.
    		Note: since no files are downloaded, ":child" commands won't
    		work for non-existing recipes.

    -N
    --nofetch-recipe
    		Do not fetch recipes when using the "fetch" and "update"
    		targets.  Useful if the current recipe is to be used when
    		files must be fetched.

    --profile FILE
    		Profile the execution of A-A-P and write the results in FILE.
    		This file can then be examined with the standard Python module
    		"pstats".

    -R
    --fetch-recipe
    		Fetch the recipe and child recipes.  This is impled by using
    		a "refresh", "fetch" or "update" target, unless
    		"--nofetch-recipe" is used.

    -S
    --stop		stop building after encountering an error (default)

    -s
    --silent	print less information, see MESSAGE.

    -t
    --touch		Update signatures on targets without executing build commands.
    		After doing this the specified targets and intermediate
    		results are considered up-to-date.
    		Commands at the toplevel will be executed, except system
    		commands, commands that write a file and version control
    		commands.

    -u
    --up
    --search-up	search directory tree upwards for main.aap recipe

    -V
    --version	print version information and exit

    -v
    --verbose	print more information, see MESSAGE.

    -		end of options, only targets and assignments follow

Prev | Contents | Next
Reference Manual | Up | Recipe Syntax and Semantics