4

How do I set more than one target specific variable?

If I try:

x: Y := foo Z := bar

I end up with Y = "foo Z := bar". There must be some syntax which will allow for multiple variables...

1 Answer 1

6

In GNU make you specify the target multiple times to accommodate the required number of variable assignments, like as:

x: Y := foo
x: Z := bar
x:
  @echo Y=$(Y) -- Z=$(Z)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .