Next: Using Variables Prev: Rules Up: Top
Writing the Commands in Rules
The commands of a rule consist of shell command lines to be executed
one by one. Each command line must start with a tab, except that the
first command line may be attached to the target-and-dependencies line
with a semicolon in between. Blank lines and lines of just comments
may appear among the command lines; they are ignored.
Users use many different shell programs, but commands in makefiles
are always interpreted by `/bin/sh' unless the makefile specifies
otherwise. Note: Command Execution.
The shell that is in use determines whether comments can be written
on command lines, and what syntax they use. When the shell is
`/bin/sh', a `#' starts a comment that extends to the end of the line.
The `#' does not have to be at the beginning of a line. Text on a line
before a `#' is not part of the comment.
- How to control when commands are echoed.
- How commands are executed.
- How commands can be executed in parallel.
- What happens after a command execution error.
- What happens when a command is interrupted.
- Invoking `make' from makefiles.
- Defining canned sequences of commands.
- Empty Commands
- Defining useful, do-nothing commands.
automatically generated by info2www