4
我有很多变量,称为 allow_xxx其中xxx是一个功能。Makefile在foreach循环中使用ifeq条件
我想在我的makefile中创建一个变量,其中包含所有允许的值。
这是我尝试做:
allow_feat1 := 1
allow_feat2 := 1
allow_feat3 := 1
list_features := feat1 feat2 feat3
allowed := $(foreach V, $(list_features), $(ifeq ($(allow_$V),1),$V))
这不工作... 不知道如何正确地做到这一点?
谢谢!
谢谢,正是我所需要的。现在我了解了Makefile中的一个函数。 – 2011-12-14 13:15:08