Options

Like just about every other GNU program, GNU make has both long and short options. The available options are as follows:

-b

Silently accepted, but ignored, for compatibility with other versions of make.

-B, --always-make

Treat all targets as out of date. All targets are remade, no matter what the actual status is of their prerequisites.

-Cdir, --directory=dir

Change directory to dir before reading makefiles. With multiple options, each one is relative to the previous. This is usually used for recursive invocations of make.

-d

Print debugging information in addition to regular output. This information includes which files are out of date, the file times being compared, the rules being used to update the targets, and so on. Equivalent to --debug=a.

--debug[ = debug-opt ]

Print debugging information as specified by debug-opt, which is one or more of the following letters, separated by spaces or commas. With no argument, provide basic debugging.

a

All. Enable all debugging.

b

Basic. Print each target that is out of date, and whether or not the build was successful.

i

Implicit. Like basic, but include information about the implicit rules searched for each target.

j

Jobs. Provide information about subcommand invocation.

m

Makefiles. Enable basic debugging, and any of the other options, for description of attempts to rebuild makefiles. (Normally, make doesn’t print information about its attempts to rebuild makefiles.)

v

Verbose. Like basic, but also print information ...

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.