Loops gnu make中的多变量for循环(类似于bmake)
bmake使您能够使用非常有用的for循环 LIST= \ s1 t1 \ s2 t2 \ s3 t3 all: .for s t in ${LIST} @echo ${s} ${t} .endfor 列表=\ s1 t1\ s2 t2\ S3T3 全部: .for${LIST}中的ST @echo${s}${t} endfor先生 效果将是: # bmake s1 t1 s2 t2 s3 t3 #制造 s1 t1 s2 t2 S3T3 在gnu make中有可能做这样的事情吗?Loops gnu make中的多变量for循环(类似于bmake),loops,for-loop,makefile,Loops,For Loop,Makefile,bmake使您能够使用非常有用的for循环 LIST= \ s1 t1 \ s2 t2 \ s3 t3 all: .for s t in ${LIST} @echo ${s} ${t} .endfor 列表=\ s1 t1\ s2 t2\ S3T3 全部: .for${LIST}中的ST @echo${s}${t} endfor先生 效果将是: # bmake s1 t1 s2 t2 s3 t3 #制造 s1 t1 s2 t2 S3T3 在gnu make中有可能做这样的事
thx没有。但是你可以用不同的方式,比如:
LIST = s1:t1 s2:t2 s3:t3
all: ; $(foreach L,$(LIST),echo $(subst :, ,$L) ;)
如果列表项中可能包含:
,请选择其他分隔符