Walidix
Walidix

Reputation: 1277

What is wrong in this simple 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}

This is the output:

original str: test string for variable manipulation.

substitution:

The output should be:

original str: My test string for variable manipulation.

substitution: My test string foo variable manipulation.

Upvotes: 1

Views: 143

Answers (1)

Benjamin Bannier
Benjamin Bannier

Reputation: 58547

The substitution command is subst, not subset.

Upvotes: 4

Related Questions