User guide
4.3. COMMANDS 111
% Comment - skip all characters unti l a non white space ch ar-
acter on a later input line.
[
Start of a new macro call.
!
Argument separator in macro calls.
#
Argument item prefix.
]
End of macro argument li st .
{
Open quote character.
}
Close quote characte r .
A typical macro definition and call is as follows:
[def!xxx!{This output results from the call {[xxx!}#1{]}}]
[xxx!yyy]
This would generate:
This output results from the call [xxx!yyy]
The syntax of bmake rules is as follows:
target-item <= item ... item << command-sequence >>
Every rule must have a target item and a body consisting of a poss i bl y empty c om-
mand sequence enclosed in << and >> brackets. The command-sequence is an arbitrary
sequence of characters not containing >>. The item list may be empty and, if so, the
symbol <= may be omitted. White space including ne wl i ne s are allowed anywhere
between items.
Pattern rules contain parameter of the form <tag> as in:
cin/<f> <= com/<f>.b g/hdr.h << c bc <f> >>
Such rules are only used when there is no explicit rule for a given target. When a rule
pattern is applied all occur r e nce s of its parameter are r e pl ac e d by the text that allowed
the target item to match the required target. So if cin/echo must be brought up to
date and has no explicit rule, the above pattern will automatically add th e following
explicit rule to the set:
cin/echo <= com/echo.b g/hdr.h << c bc echo >>
A target is out of date if it does not exist or if any of the it e ms it depends on are out
of date or have a modify dates later than that of the target. A target is brought up to
date by, first, bringing the i te ms it depends on up to date and then executing the CLI
command sequence given by the body.
Items may consist of any sequence of characters not including %, [, !, ], {, }, =, or
white space, and < and > may only appear in parameters.
In normal use, bmake generates a command-command file to bring the target up
to date and then returns to the CLI to cause this file to be executed. The -c option
allows the command-command file to be inspected without execution.