Makefiles and especially recursive Makefiles can be hard to understand and debug. But the good old debugging method of printing out values from certain locations in the source code can be employed here too.
- To print a message when make parses past that location in the Makefile:
$(info Hello World Make just parsed past this line)
Note that make typically parses a file twice before it executes what is needed to satisfy its targets. So, you will see the message you are printing twice.
- To print the value of a make variable at a certain location in the Makefile: