help-make
[Top][All Lists]
Advanced

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

Re: user input


From: Gustavo A. Baratto
Subject: Re: user input
Date: Sun, 9 Nov 2003 17:17:32 -0800

yes... that's make sense... thank you very much.

is there any other way to handle user input? I came up with this, but I
think it is pretty lame. pretty sure there a smarter way to this...

again... thanks

----- Original Message ----- 
From: "Paul D. Smith" <address@hidden>
To: "Gustavo A. Baratto" <address@hidden>
Cc: <address@hidden>
Sent: Sunday, November 09, 2003 4:55 PM
Subject: Re: user input


> %% "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
>





reply via email to

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