这个简单的Makefile有什么问题

时间:2010-05-09 22:58:34

标签: makefile

SRC_VAR = test string for variable manipulation.

TEST1_VAR = $(subset for,foo,${SRC_VAR})

all: 
    @echo original str: ${SRC_VAR}
    @echo substitution: ${TEST1_VAR}

这是输出:

original str: test string for variable manipulation.

substitution:

输出应为:

original str: My test string for variable manipulation.

substitution: My test string foo variable manipulation.

1 个答案:

答案 0 :(得分:4)

替换命令为subst,而不是subset