- I find it interesting that there's no mention of -n which seems like a bog-standard, POSIX-compliant, debugging method. It's also another way of getting around @. Simplistic but worth mentioning IMHO.
- I wonder why there's so much emphasis on $(info ...) since $(warning ...) will do the same job and also provide file:line so I prefer it for debugging purposes.
- In terms of "why does make insist on rebuilding this target", which is among the most common problems, ISTM that --debug=why or --trace is a simpler option than any messing with '@'. It cuts right to the chase and tells you what make is thinking.
- In an extreme case a user might want to try strace. E.g. create a script like this
$ cat ~/bin/tracesh
#!/bin/sh
exec strace -o /tmp/${0##*/}.log -e trace=process,chdir -fq /bin/sh "$@"
And run make with SHELL=tracesh. To keep the strace log manageable the SHELL assignment could be made target-specific.
- There's the old "Ask Mr Make" columns by John Graham-Cumming with a bunch of clever (and advanced) debugging techniques but I don't know if those are collected anywhere.
- You may not want to get into listing third-party tools, since there's potentially no end to such a thing, but I've written something called the Make Diagnostic Shell (
https://github.com/boyski/mdsh) which can do a lot of advanced analysis but only on the shell side of course, not the make-syntax side. There may be any number of other third-party make-helper tools.
David