|
From: | Gustavo A. Baratto |
Subject: | user input |
Date: | Fri, 7 Nov 2003 12:56:04 -0800 |
greetings,
I couldn't find a good way of working with user
input in the Makefiles:
What I want is to check if the variable was defined
in the command line, if not print a msg in the screen asking for a value, read
stdin for the value, and assign it to a variable. I did something like
this:
I tried this
------
CREATE = ${shell echo 'read input; echo $$input'
> input.sh}
CHMOD = ${shell chmod 700 input.sh} $(warning enter value 1:) VALUE1 = ${shell ./input.sh} $(warning enter value 2:) VALUE2 = ${shell ./input.sh} test:
echo
${VALUE1}
echo
${VALUE2}
---------
the result is:
#make test
Makefile:3: enter value 1:
Makefile:5: enter value 2:
<PROMPT>
<PROMPT>
as you can see make prints all the warnings before
giving me the prompts... I have no more ideas on how to get out of this. can
someone help?
thanks :)
PS: pls, reply to myself as well, as I'm not
subscribed to the mailing list: address@hidden
|
[Prev in Thread] | Current Thread | [Next in Thread] |