Reputation: 360
Is it possible do the following in one $(call ...)
inside a prerequisite list?
That is, the following should assign the string value
to the variable $(var)
, while adding value
as a prerequisite for the target foo
.
foo: $(call assign-value-to-var,value)
# Do stuff
Upvotes: 0
Views: 63
Reputation: 15091
Yeah, why not?
assign-value-to-var=$(eval foo: private var:=$1)$1
foo: $(call assign-value-to-var,value)
# Do stuff
Upvotes: 1