Is there a command line way in make
to find out which of the prerequisites of a target is not updated?
Debugging GNU make
debugginggnu-makemakefile
Related Topic
- Define make variable at rule execution time
- Javascript – How to debug Node.js applications
- C# – How to remedy “The breakpoint will not currently be hit. No symbols have been loaded for this document.” warning
- Passing arguments to “make run”
- Using CMake with GNU Make: How to see the exact commands
- Passing additional variables from command line to make
- Php – Reference – What does this error mean in PHP
- How to print out a variable in makefile
Best Answer
should give you more than enough information to debug your makefile.
Be warned: it will take some time and effort to analyze the output but loading the output into your favorite editor and doing searches will assist a lot.
You can greatly reduce the amount of debugging output if you specify the specific target you're interested in. So if you're only interested in the
dodgy
target, instead of justmake -d
which may make a hundred different things, try:(assuming you have a
clean
target of course).The
make --debug
is identical tomake -d
but you can also specify:where flags can be:
a
for all debugging (same asmake -d
andmake --debug
).b
for basic debugging.v
for slightly more verbose basic debugging.i
for implicit rules.j
for invocation information.m
for information during makefile remakes.It looks like
make --debug=b
is the best option for what you need, as shown in the following transcript: