Last update Feb 1, 2003
Commands can be prefixed with a special character to control how it is executed (just like makefiles for make):
+ | Force use of COMMAND.COM or CMD.EXE to execute the rule. This is useful for .BAT files or commands using I/O redirection. |
- | Ignore exit status from this rule. |
% | Exit status must be non-zero. |
@ | Do not echo this rule when it's executed. |
* | Use _CMDLINE environment variable to pass long command lines. |
Macros are expanded like in make, i.e. one letter macros are expanded by $M, multi-letter macros by $(ABC).
Options are specified as lists of | separated choices enclosed by parentheses, such as:
del *.(c|h)means execute the command twice, once using the c and the other time using the h. Blank options, like (c|), are allowed. Multiple options can be used:
dir *.(c|) /(w|d)will execute the command 4 times with:
dir *.c /w dir *. /w dir *.c /d dir *. /dThe substitutions are stored as numbered macros, and are available for expansion in the subsequent lines in the group as well:
dmc -m(s|n) test (-g|-o) link lib$1causes these to be executed:
dmc -ms test -g link libs dmc -mn test -g link libn dmc -ms test -o link libs dmc -mn test -o link libn
shell filename.sh { macro definitions }If no filename.sh is given, shell looks for and runs test.sh.
macro definitions are of the form NAME=VALUE.