Makefile Cheat Sheet/Enable debug output

Print internal decision-making details.

Section: Core make commands

Enable debug output

bash
bash
make --debug=b
Explanation

GNU make supports several debug modes such as `a`, `b`, `v`, `i`, `j`, and `m`.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Core make commands
Dry run
Print commands without executing them.
OpenIn sheetbashsame section
Trace recursive directories
Show enter/leave directory messages.
OpenIn sheetbashsame section
Warn on undefined variables
Emit warnings when undefined variables are expanded.
OpenIn sheetbashsame section
Print database
Dump parsed rules and variables.
OpenIn sheetbashsame section
Run default target
Run make using the default makefile and first target.
OpenIn sheetbashsame section
Build a specific target
Run a named target from the makefile.
OpenIn sheetbashsame section