Contents(Read Me First)

Here I will continously update some contents about sytanx in GNU make which is uncommon I think or ones is not eaily understood by intuition. If you have interesting about that, you will gain big benefit from reading the document(https://www.gnu.org/software/make/manual/make.html).

Automatic Variables

The Automatic variables feature of GUN make allow you have variable whose value computed afresh for each rule that is executed in the runtime.

$@ and $< pair


Static Pattern Rules

Cited from documentation(4.12):

Static pattern rules are rules which specify multiple targets and construct the prerequisite names for each target based on the target name. They are more general than ordinary rules with multiple targets because the targets do not have to have identical prerequisites. Their prerequisites must be analogous, but not necessarily identical.

Syntax of Static Pattern Rules

targets …: target-pattern: prereq-patterns …
        recipe
        …
comments powered by Disqus