[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: user input
From: |
Paul D. Smith |
Subject: |
Re: user input |
Date: |
Sun, 9 Nov 2003 19:55:27 -0500 |
%% "Gustavo A. Baratto" <address@hidden> writes:
gab> CREATE = ${shell echo 'read input; echo $$input' > input.sh}
gab> CHMOD = ${shell chmod 700 input.sh}
gab> $(warning enter value 1:)
gab> VALUE1 = ${shell ./input.sh}
gab> $(warning enter value 2:)
gab> VALUE2 = ${shell ./input.sh}
gab> as you can see make prints all the warnings before giving me the
gab> prompts... I have no more ideas on how to get out of this. can
gab> someone help?
You need to use simple variable assignments (:=) instead of recursive
assignments (=), so that the right-hand side of the assignment is
evaluated immediately when the variable is declared.
Otherwise, it won't be evaluated until the variable is used (and it will
be evaluated _every time_ the variable is used), which is definitely not
what you want.
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> 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
- user input, Gustavo A. Baratto, 2003/11/09
- Re: user input,
Paul D. Smith <=