|
|
A dependency line lists both targets and components, separated by either
one or two colons. A target name can appear on more than one
dependency line, but all of those lines must be of the same (single or
double-colon) type. For example, if a single colon is used on a
dependency line, then only a single set of commands can be associated
with that target. If a target appears on more than one single-colon
line, only one of those lines can have a command sequence associated with it.
The occurrence of targets on multiple single-colon lines is used
as a notational convenience for clarifying complex makefiles.
make concatenates all the components following each occurrence of the repeated target into a single dependency list. For example:
target1 : comp1 comp2 commands target1 : comp2 comp3This is identical to:
target1 : comp1 comp2 comp3 commandsA double colon allows the listing of the same target on two or more dependency lines, permitting commands to be associated with each target line. For example:
target1 target2 :: comp1 comp2 commands target2 :: comp3 commands