help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: setting variable value


From: Aditya Kher
Subject: Re: setting variable value
Date: Wed, 1 Nov 2006 14:13:17 +0530

digging up old thread.
Lets say I have following.
$ cat Makefile
FOO := whatever
.PHONY : all
all : target_1 target_2 target_3
target_1 : FOO := foo # override FOO for this target
target_2 : FOO := bar # override FOO for this target
target_% : ; @echo "cd ${FOO} && ls"

Is it possible to set value for more than one variable for a given target ? e.g.

target_1 : FOO := foo  BOO:= boo
target_2 : FOO := foo_1  BOO:= boo_1

so that this allows me to set variable values for FOO *and* BOO for
target target_1, target_2 etc.. separately?

The above statement doesnt work  as-is  (I am using GNU Make 3.81-Beta).

Any tweaks? or a neater way perhaps?

--
Aditya Kher
http://kher.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]