1 正常情况
Makefile文件中
root_dir := $(abspath ..)
socip_dir := $(root_dir)/socip
display:
@echo Hello world
@echo $(socip_dir )
命令:make display
打印信息:
Hello world
/home/xxx/prj/cx/socip
2 打印选择语句中变量
verif_dir := abc/cdf/edf/
ifeq ($(batchmode), 1)
makefile_abs_path ?= $(verif_dir)
endif
display:
@echo Hello world
@echo $(socip_dir )
命令:make display batchmode=1
打印信息:
Hello world
abc/cdf/edf/