20.3. Description File Lines
Instructions in the description file are interpreted as single lines.
If an instruction must span more than one input line, use a backslash
(\) at the end of
the line so that the next line is considered a
The description file may contain any of the following types of lines:
- Blank lines
- Blank lines are ignored.
- Comment lines
- A pound sign (#) can be used at the beginning of a line or anywhere
in the middle. make ignores everything after the #.
- Dependency lines
- Depending on one or more targets, certain commands that follow are executed. Possible formats include:
targets : prerequisites
targets :: prerequisites
In the first form, subsequent commands are executed if the prerequisites are met.
The second form is a variant that lets you specify the same targets on more
than one dependency line. In both forms, if no prerequisites are supplied,
subsequent commands are always executed (whenever any of
the targets are specified). No tab should precede any targets.
(At the end of a dependency line, you can specify a command,
preceded by a semicolon; however, commands are typically entered
on their own lines, preceded by a tab.)
Targets of the form
represent members of archive libraries, e.g.,
- Suffix rules
- These specify that files ending with the first suffix can be prerequisites for
files ending with the second suffix (assuming the root filenames are the
same). Either of these formats can be used:
The second form means that the root filename depends on the filename with the
- Macro definitions
- These have the following form:
name = string
Blank space is optional around the =.
- Include statements
- Similar to the C include directive, these have the form:
make processes the value of file
for macro expansions before attempting to open the file.
- Command lines
- These lines are where you give the commands to actually rebuild
those files that are out of date.
Commands are grouped below the dependency line and
are typed on lines that begin with a tab.
If a command is preceded by a hyphen (–), make ignores
any error returned. If a command is preceded by an at sign
the command line won't echo on the display (unless make is called
Further advice on command lines is given below.
Copyright © 2003 O'Reilly & Associates. All rights reserved.