Makefile文件总结

有时需要对makefile中的变量进行调试,可在makefile中增加下列代码

ifdef DBG

@echo varible monitor:
@echo name   = $(DBG)
@echo value  = $(value $(DBG))
@echo origin = $(origin $(DBG))
@echo flavor = $(flavor $(DBG))

endif

使用make DBG=ARMCC命令即可打印ARMGCC变量信息,如下:

varible monitor:
name = ARMCC
value = arm-linux-gcc
origin = file
flavor = recursive

你可能感兴趣的:(Makefile文件总结)