Command-Line Syntax

The make program is invoked as follows:

    make  [options
                
]  [targets]  [macro definitions]

Options, targets, and macro definitions can appear in any order. The last assignment to a variable is the one that’s used. Macro definitions are typed as:

name=string

or

name:=string

For more information, see the section "Creating and Using Macros,” later in this chapter.

If no GNUmakefile, makefile, or Makefile exists, make attempts to extract the most recent version of one from either an RCS file, if one exists, or from an SCCS file, if one exists. Note though, that if a real makefile exists, make will not attempt to extract one from RCS or SCCS, even if the RCS or SCCS file is newer than the makefile.

Get Unix in a Nutshell, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.