Download gmake reference manual
Transcript
ST9+ gmake Reference Manual 12 12 - Features of GNU Make FEATURES OF GNU MAKE Here is a summary of the features of GNU make, for comparison with and credit to other versions of make. We consider the features of make in 4.2 BSD systems as a baseline. If you are concerned with portable makefiles, you should not use the features of make listed here, nor the ones in Missing. Many features come from the version of make in System V. • The VPATH variable and its special meaning. See Section 4.4: Searching directories for prerequisites on page 31. This feature exists in System V make, but is undocumented. It is documented in 4.3 BSD make (which says it mimics System V’s VPATH feature). • Included makefiles. See Section 3.3: Including other makefiles on page 20. Allowing multiple files to be included with a single directive is a GNU extension. • Variables are read from and communicated via the environment. See Section 6.9: Variables from the environment on page 74. • Options passed through the variable MAKEFLAGS to recursive invocations of make. See Section 5.6.3: Communicating options to a sub-make on page 58. • The automatic variable $% is set to the member name in an archive reference. See Section 10.5.3: Automatic variables on page 123. • The automatic variables $@, $*, $<, $%, and $? have corresponding forms like $(@F) and $(@D). We have generalized this to $^ as an obvious extension. See Section 10.5.3: Automatic variables on page 123. • Substitution variable references. See Section 6.1: Basics of variable references on page 63. • The command-line options -b and -m, accepted and ignored. In System V make, these options actually do something. • Execution of recursive commands to run make via the variable MAKE even if n, -q or -t is specified. See Section 5.6: Recursive use of make on page 55. • Support for suffix .a in suffix rules. This feature is obsolete in GNU make, because the general feature of rule chaining (see Section 10.4: Chains of implicit rules on page 119 for more information) allows one pattern rule for installing members in an archive to be sufficient. • The arrangement of lines and backslash-newline combinations in commands is retained when the commands are printed, so they appear as they do in the makefile, except for the stripping of initial whitespace. 137/185