|
|
BAKE
NAME
SYNOPSIS
DESCRIPTION
OPTIONS
ASSIGNMENTS
TARGETS
FILES
BUGS
SEE ALSO
AUTHOR
NAME
|
bake − yet another Make replacement
|
SYNOPSIS
|
bake [ OPTION | ASSIGNMENT |
TARGET ]
An OPTION starts with ‘-’. Multiple
single-character options with no arguments may be compounded
(‘-nv’ is the same as ‘-n -v’). For
a summary, see the OPTIONS section below.
An ASSIGNMENT is of the form
‘VARIABLE=value’. See the ASSIGNMENTS
section.
A TARGET is a name. See the TARGETS
section.
The parameters are evaluated in the order they are
specified. That means if you specify a target before an
option or an assignment, these don’t apply to the
target build procedure.
|
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.
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): |
|
-
|
It can handle header dependencies. (A dependency
resolution function for C source code is included.)
|
|
-
|
Build processes written in Python can be called
directly, without loading another shell and interpreter.
|
|
-
|
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.)
|
|
-
|
Subordinated instances can be called Python-internally
without loading another shell, too. A class is provided to
do the cleanup afterwards correctly.
|
|
-
|
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.
|
|
-
|
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.
|
|
Feel free to realize your own ideas. If there are other
useful applications, let me know.
See bakefile(5) for how to write description
files.
|
OPTIONS
|
Build targets anyway, even if they’re up to
date.
|
|
Build targets only if they’re not up to date
(default).
|
|
Change to directory DIR. From this point on, Bake
behaves as if it would have been called after a
‘cd’ command.
|
|
Let environment variabes precede variables from
bakefiles.
|
|
Environment variabes no longer precede variables from
bakefiles (default).
|
|
Use FILE as declaration file. If none is given as
soon as a target is specified, Bake tries to read
‘./bakefile’ or ‘./Bakefile’, in
this order.
|
|
Print a help message, explaining the calling syntax and
the options.
|
|
Do not execute commands, just print out what would be
done. Caution: functions and commands that are meant for
prerequisite detection are executed.
|
|
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’.
|
|
Produce definitely no output. Overrides verbose mode.
|
|
Become another user and group. SPEC is a
user:group specification, both user and group given
either as name or as number. If group is omitted, the
users default group is assumed. SPEC may further be a
path to a file or a directory. Then, the file objects
owner is detected and the rest behaves like you expect.
|
|
Especially the option combination
‘-Csomewhere -U.’ 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.
|
|
Print detailed information, what dependencies are found,
what macro expansions are done and so on. Overrides silent
mode.
|
|
Print version and copyright/(non-)warranty
information.
|
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.
Variables are expanded when executig shell commands like
in Make: ‘$(VAR)’ or ‘${VAR}’ expand
to the contents of the Variable. See the MACROS
section in bakefile(5) for a detailed
description.
|
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.
Dependencies are resolved automatically and header files
are searched where it is defined to do so.
|
FILES
|
The default declaration file if none is given in a
-f/--file option.
|
BUGS
|
As the project is young and as there are many cases to
test there are presumably some bugs not noticed yet.
Report bugs to <software@bertram-scharpf.de>.
|
SEE ALSO
AUTHOR
|
(C) 2004 Bertram Scharpf
<software@bertram-scharpf.de>
|
<previous next>
|