02.05.2013 Views

Description - Mks.com

Description - Mks.com

Description - Mks.com

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

is a between-rules circular dependency. make detects a between-rule circular dependency when it<br />

is processing the dependency tree built during the parse phase.<br />

Normally make only detects circular dependencies for those targets actually being built. When a<br />

circular dependency is encountered, make issues a warning message, removes the offending<br />

prerequisite from the list, and continues parsing the makefile. The .CYCLECHECK special target<br />

can be used to alter make's treatment of circular dependencies. For details, see the Special Target<br />

Directives section of this reference page.<br />

Recipes<br />

You can use a target that has prerequisites but no recipes to add the given prerequisites to that<br />

target's list of prerequisites.<br />

You may preface any recipe line with a <strong>com</strong>mand prefix immediately following the character<br />

(-, @, + or all three). - indicates that make is to ignore non-zero exit values when it executes this<br />

recipe line. @ indicates that make is not to display the recipe line before executing it. + tells make to<br />

always execute this line, even when -n, -q, or -t is specified.<br />

Group recipes begin with [ in the first non-white space position of a line, and end with ] in the first<br />

non-white space position of a line. Recipe lines in a group recipe need not have a leading tab.<br />

make executes a group recipe by feeding it as a single unit to a shell. If you immediately follow the<br />

[ at the beginning of a group recipe with one of -, @ or +, they apply to the entire group in the<br />

same way that they apply to single recipe lines.<br />

Inference Rules<br />

With inference rules, you can specify general rules for building files rather than creating a specific<br />

rule for each target.<br />

MKS Make provides two forms of inference rules: suffix rules and meta-rules. MKS Make includes<br />

suffix rules to ensure <strong>com</strong>patibility with older makefiles. Meta-rules, however, provide a more<br />

general mechanism for specifying make's default behavior. They provide a superset of the<br />

functionality of suffix rules. make searches all meta-rules before using suffix rules.<br />

make uses the inference rules to infer how it can bring a target up to date. A list of inference rules<br />

defines the <strong>com</strong>mands to be executed. The default startup.mk contains a set of inference rules<br />

for the most <strong>com</strong>mon targets. You can specify additional rules in the makefile.<br />

When make finds no explicit target rule to update a target, it checks the inference rules. If make<br />

finds an applicable inference rule with an out-of-date prerequisite, it executes that rule's recipe.<br />

(See also the section describing the .DEFAULT special target).<br />

Meta-rules<br />

415 of 457

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!