[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Assigning variables in a rule
From: |
Paul D. Smith |
Subject: |
Re: Assigning variables in a rule |
Date: |
22 Mar 2006 16:44:40 -0500 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 |
Please remember this list is host to a lot of different packages: make
explicit which one you're talking about. Putting "make" somewhere in
the subject, for instance, will help ensure the right people read your
message.
Also, remember to specify which type and release of OS you're using and
which version of the tool (in this case GNU make) you're using.
%% lamthierry@gmail.com writes:
l> Is it possible to assign a variable in a rule, for example:
l> hello:
l> name := world
If you have a sufficiently new version of GNU make you can write:
hello:
$(eval name := world)
However, it's possible this doesn't do what you want, and it's possible
there are better ways to do it anyway. But since this is all the info
we have, that's the best we can do :-).
--
-------------------------------------------------------------------------------
Paul D. Smith <psmith@gnu.org> Find some GNU make tips at:
http://www.gnu.org http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
Re: Assigning variables in a rule, lamthierry, 2006/03/22