File: bake.1

package info (click to toggle)
bake 1.0-10
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 212 kB
  • ctags: 151
  • sloc: python: 895; sh: 289; ansic: 50; makefile: 41
file content (152 lines) | stat: -rw-r--r-- 5,821 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
.\"
.\" bake.1  --  bake manpage
.\"
.TH BAKE "1" "September 2004" "bake 1.0" "Progammers Utility"
.SH NAME
bake \- yet another Make replacement
.SH SYNOPSIS
.B bake
[ \fIOPTION\fP | \fIASSIGNMENT\fP | \fITARGET\fP ]
.PP
An \fIOPTION\fP starts with `-'.  Multiple single-character options
with no arguments may be compounded (`-nv' is the same as `-n -v').
For a summary, see the \fBOPTIONS\fP section below.
.PP
An \fIASSIGNMENT\fP is of the form `VARIABLE=value'.  See the
\fBASSIGNMENTS\fP section.
.PP
A \fITARGET\fP is a name.  See the \fBTARGETS\fP section.
.PP
The parameters are evaluated in the order they are specified.  That
means if you specify a target before an option or an assignment, those
don't apply to the target build procedure.
.SH DESCRIPTION
Bake is a replacement for Make, the popular Unix utility.  It surveys
project generation regarding build dependencies.  The motivation to
write Bake was that Make doesn't handle header dependencies itself.
.PP
Bake is written in Python.  Definition files, usually named
`bakefile', are Python source code as well.  This makes it very
flexible.  Further advantages come out of this fact.  They are (as far
as yet detected):
.RS 2
.IP - 2
It can handle header dependencies.  (A dependency resolution function
for C source code is included.)
.IP - 2
Build processes written in Python can be called directly, without
loading another shell and interpreter.
.IP - 2
Password entering can be put in front of all other work.  For example
when a homepage is built and uploaded afterwards, you can ask for the
FTP password, then build the pages and finally establish a FTP
connection to your web hoster.  (Normally, you would have to wait
until the pages are built and you could enter tha password just before
the upload.)
.IP - 2
Subordinated instances can be called Python-internally without loading
another shell, too.  A class is provided to do the cleanup afterwards
correctly.
.IP - 2
The names of the files to be built can be collected in a list.  This
list can be used to generally compose cleanup or installation targets.
.IP - 2
Bake can change its user and group id.  If you're building a target as
root and a program that will be run may be a security risk, just
change to the user id that is the owner of the directory you're
currently in.
.RE
.PP
Feel free to realize your own ideas.  If there are other useful
applications, let me know.
.PP
See \fBbakefile\fP(5) for how to write description files.
.SH OPTIONS
.TP
\fB-a\fP, \fB--anyway\fP
Build targets anyway, even if they're up to date.
.TP
\fB-A\fP, \fB--noanyway\fP
Build targets only if they're not up to date (default).
.TP
\fB-C\fP, \fB--chdir\fP \fIDIR\fP
Change to directory \fIDIR\fP.  From this point on, Bake behaves as if
it would have been called after a `cd' command.
.TP
\fB-e\fP, \fB--envprec\fP
Let environment variabes precede variables from bakefiles.
.TP
\fB-E\fP, \fB--noenvprec\fP
Environment variabes no longer precede variables from bakefiles
(default).
.TP
\fB-f\fP, \fB--file\fP \fIFILE\fP
Use \fIFILE\fP as declaration file.  If none is given as soon as a
target is specified, Bake tries to read `./bakefile' or `./Bakefile',
in this order.
.TP
\fB-h\fP, \fB--help\fP
Print a help message, explaining the calling syntax and the options.
.TP
\fB-n\fP, \fB--noexec\fP
Do not execute commands, just print out what would be done.  Caution:
functions and commands that are meant for prerequisite detection are
executed.
.TP
\fB-p\fP, \fB--printout\fP
Print out all variables, rules and suffix rules as they are currently
defined.  If no bakefile is loaded, the standard bakefile will be read
in first.  To obtain the empty set, call `bake -f /dev/null -p'.
.TP
\fB-s\fP, \fB--silent\fP
Produce definitely no output.  Overrides verbose mode.
.TP
\fB-U\fP, \fB--usergrp\fP \fISPEC\fP
Become another user and group.  \fISPEC\fP is a \fIuser:group\fP
specification, both user and group given either as name or as number.
If \fIgroup\fP is omitted, the users default group is assumed.
\fISPEC\fP may further be a \fIpath\fP to a file or a directory.
Then, the file objects owner is detected and the rest behaves like you
expect.
.TP
\&
Especially the option combination `\fB-C\fPsomewhere \fB-U\fP.' comes
in handy when you're root and you build targets for real users that
aren't fully security-trusted.  Caution!  This is highly
order-sensitive; the `.' directory refers to the previous directory
change.  Any target specified before the user change will be built as
the old user.
.TP
\fB-v\fP, \fB--verbose\fP
Print detailed information, what dependencies are found, what macro
expansions are done and so on.  Overrides silent mode.
.TP
\fB-V\fP, \fB--version\fP
Print version and copyright/(non-)warranty information.
.SH ASSIGNMENTS
As in Make, you may declare variables in three ways: environment
variables, variable objects in the declaration file (bakefile) and
assignments on the command line.  The latter overrides the former.
.PP
Variables are expanded when executig shell commands like in Make:
`$(VAR)' or `${VAR}' expand to the contents of the Variable.  See the
\fBMACROS\fP section in \fBbakefile\fP(5) for a detailed description.
.SH TARGETS
The targets given on the command line will be built.  If no target is
given, the first one in the declaration file (bakefile) is assumed.
.PP
Dependencies are resolved automatically and header files are searched
where it is defined to do so.
.SH FILES
.PP
.IP "./bakefile or ./Bakefile"
The default declaration file if none is given in a -f/--file option.
.SH BUGS
As the project is young and as there are many cases to test there
are presumably some bugs not noticed yet.
.PP
Report bugs to <software@bertram-scharpf.de>.
.SH "SEE ALSO"
\fBbakefile\fP(5)
.SH AUTHOR
(C) 2004 Bertram Scharpf <software@bertram-scharpf.de>