Debugging the Makefile
Some Makefiles contain this -
ifneq ($(call try-cc,$(SOURCE_LIBUNWIND),$(FLAGS_UNWIND),libunwind),y)
msg := $(warning No libunwind found, disabling post unwind support. Please install libunwind-dev[el] >= 0.99);
NO_LIBUNWIND := 1
and whenever I run this make I get an error like
warning No libunwind found, disabling post unwind support. Please install libunwind-dev[el] >= 0.99
I want to debug this problem - want to know the values SOURCE_LIBUNWIND
that FLAGS_UNWIND
are causing this problem - how can I get these values ββprinted to stdout for debugging purposes?
source to share
GNU make
provides several features that can be used to print variable values: $(error ...)
, $(warning ...)
and $(info ...)
. The manual mentions them in section 8.12. Functions that make management .
Alternatively, you can use the command line parameter -p
or --print-data-base
to print the values ββof all rules and variables. Redirecting the output to a file and parsing, which can give you a better idea of ββwhy the values ββare what they are. For more information, see Section 9.7 Parameter Summary .
source to share
Rainier and Shraddha have the correct answers to the question asked, but I'm not sure if the correct question was asked.
It seems to me (based on just a snippet of the makefile made) that they are more likely to be variables that you can set than variables that are already set. That is, they will control how you control the location used to find libunwind.
So, if the try-cc call fails, I would assume that it means that you either don't have libunwind installed or you installed in a non-standard system location, and they don't set these variables, do so.
source to share