File: aap.1

package info (click to toggle)
aap 1.072-1.1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny
  • size: 4,976 kB
  • ctags: 2,160
  • sloc: python: 15,113; makefile: 62; sh: 13
file content (217 lines) | stat: -rw-r--r-- 6,357 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
.\" ES - Example Start - indents and turns off line fill
.de ES
.RS
.nf
..
.\" EE - Example End - ends intend and turns line fill back on
.de EE
.RE
.fi
..
.TH AAP 1 "2003 Aug 7"
.SH NAME
aap, a powerful build tool
.SH SYNOPSIS
.na
.br
.B aap
[-f recipe] [option ...] [VAR=value ...] [target ...]
.ad
.SH DESCRIPTION
.B Aap
executes recipes.
A recipe has the structure of a Makefile: dependencies and build commands.
.B Aap
includes support for downloading, uploading, version control, Python commands
and much more.
.PP
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":

.ES
aap -f doit.aap
.EE

The recipe may be a URL.  It will be downloaded to the current directory before it is executed.  Example:

.ES
aap -f ftp://ftp.vim.org/pub/vim/runtime/main.aap
.EE

An alternative is to use the "-u" or "--up" argument to search upwards in the
directory tree for a "main.aap" recipe.
.PP
For the format of the recipe and the supported commands see the A\-A\-P web site:
.nh
http://www.A\-A\-P.org/documentation.html.
.hy
You may find it locally as "/usr/share/doc/aap-doc/html/index.html".
.PP
Here is an example for a recipe that compiles the "foobar" program from three source files:

.ES
:program foobar : main.c common.c version.c
.EE

.PP
Target arguments indicate the files or virtual targets that are to be built.
For example, this command builds the two targets "foo" and "bar":

.ES
aap foo bar
.EE

When no target is specified on the command line, the "all" target specified 
in the recipe is built.  If there is no "all" target the programs and libraries
specified with ":program", ":lib" and similar commands are built.
If none of these targets are specified this results in an error.
.PP
Assignments take the form "VAR=value".  "VAR" is the name of a variable and
"value" the value assigned to it.  Example:

.ES
aap GUI=motif
.EE

Note that
.B 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.
.PP
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:

.ES
aap -f foo.aap BUILD=debug test
.EE

.SH 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.
.TP 12
--
End of options, only targets and assignments follow.
Use this if a target starts with "-".
.TP
-a, --nocache
Always download files, do not use the cache.
.TP
-c CMD, --command CMD
After reading the recipe execute CMD.  No targets are built other than the
one(s) specified in the command line.
.TP
--changed FILE
The file FILE is considered changed, no matter whether it was really changed.
Similar to the recipe command ":changed FILE".
.TP
-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.
.TP
-d FLAGS, --debug FLAGS
Debug the specified items.  Not yet implemented.
.TP
-f FILE, --recipe FILE
Specify the recipe to execute.  If this is omitted the "main.aap" recipe will
be used.
.TP
-F, --force
Force building targets even when they are up-to-date.
.TP
-h, --help
Print a help message and exit.
.TP
-I DIR, --include DIR
Directory to search for included recipes.
.TP
--install PACKAGE
Install the package PACKAGE.  Only works for a few packages that are supported, such as "scp" and "unzip".
Does not read a recipe in the usual way, only the specified package is
installed.
.TP
-j N, --jobs N
Maximum number of parallel jobs (not implemented yet).
.TP
-k, --continue
Continue building after encountering an error. (Not fully implemented yet)
.TP
-l, --local
Do not recurse into subdirectories.  Applies to the "add" and "remove" targets.
Also for "revise" concerning removing files.
.TP
-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.
.TP
-N, --nofetch-recipe
Do not fetch recipes when using the "fetch" or "update" argument, only fetch
files.
.TP
--profile FILE
Profile execution and write the results in FILE.  Use the Python pstats module
to view the results.  The PrintProfile module in
.B aap
lists the most useful info.
.TP
-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.
.TP
-s, --silent
Print less information while executing recipes.
.TP
-S, --stop
Stop building after encountering an error (this is the default).
.TP
-t, --touch
Do not execute build commands but do update signatures as if they were built.
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.
.TP
-u, --search-up, --up
Search the directory tree upwards for a "main.aap" recipe.
.TP
-v, --verbose
Print more information while executing recipes.
.TP
-V, --version
Print version information and exit.
.SH FILES
.TP 15
"/usr/share/doc/aap-doc/html/*.html"
The
.B aap
documentation in HTML.
.TP
"/usr/share/doc/aap-doc/exec.pdf.gz"
The
.B aap
documentation in PDF.  Useful for printing.
.TP
AAPDIR/log, AAPDIR/log1, AAPDIR/log2, ..., AAPDIR/log9
The log file with detailed messages about executing a recipe.
Older log files are called log1, log2, etc.
.SH WEB SITE
For recent info see the A\-A\-P web site:
.br
http://www.A\-A\-P.org/
.SH EXIT VALUE
.B aap
exits with a non-zero value when something went wrong.
.SH AUTHOR
Project leader for A\-A\-P is
Bram Moolenaar <Bram@A\-A\-P.org>.
.SH BUGS
Probably.  Not everything has been properly tested.
For recent info see the A\-A\-P web site:
.br
http://www.A\-A\-P.org/aaptodo.html