=========不同分支,目标不同
如下所示:
ifeq ("$(__diablo_build_mode)","avp13_release")
all:release
else ifeq ("$(__diablo_build_mode)","avp13_develop")
all:develop
else
all:release
endif
release:
@echo release...
@echo $(__diablo_build_mode)
develop:
@echo develop...
@echo $(__diablo_build_mode)
注意,被修改的变量是_build_mode1而不能是_build_mode
=========规则内的分支,以及不同分支,不同变量(Make变量)值
ifeq ($strip($(__diablo_build_mode)),"")#此句无用
__diablo_config_file:=avp13_rel_defconfig
endif
ifeq ($(__diablo_build_mode),"avp13_release")
__diablo_config_file:=avp13_rel_defconfig
else ifeq ($(__diablo_build_mode),"avp13_develop")
__diablo_config_file:=avp13_rel_defconfig
else
__diablo_config_file:=avp13_rel_defconfig2
endif
__test=
all:
@echo $(__diablo_config_file)
@echo $(__diablo_build_mode)
@if [ -f good ] ;then \
echo good \
;else \
echo bad \
;fi
================规则内修改变量(Make变量)
阅读(1398) | 评论(0) | 转发(0) |