方法一echo:
这个方法需要用到tab键,如:
%:
[tab]@echo 222222222222222
这个方法难免有点臃肿,而且最近在项目使用中发现容易失效,原因还没找到。
方法二使用info warning error关键字,不需要tab键:
使用info/warning/error增加调试信息
info
$(info “here add the debug info”)
注,info信息,不打印信息所在行号
warning
$(warning “here add the debug info”)
error
$(error “error: this will stop the compile”)
这个可以停止当前makefile的编译
打印变量的值
$(info $(TARGET_DEVICE) )