To print a variable named MY_VAR
defined in a Makefile:
$(info $$MY_VAR is [${MY_VAR}])
You can also define a rule
print-%:
@echo $* = $($*)
and then run make print-MY_VAR
.
This comes from this StackOverflow post.
Home | Back to blogThis work is licensed under CC BY-NC 4.0