%% Sven K�hler <[EMAIL PROTECTED]> writes:
>> If you told us what you were trying to do at a higher level then
>> maybe we'd have more to say.
sk> I'm trying to execute a shell command and store the result in a
sk> variable. since each command for a rule is executed in its own
sk> sub-shell, i cannot easily use shell-vars, so i wanted to use
sk> make-vars, but that doesn't seem to be possible :-(
So, you're trying to preserve a value to be used between different
rules, but you only want it to take effect if those rules are invoked,
is that it?
One simple thing to do would be to write the value to a file then source
the file in the command script of the other rules:
t1: var.sh
. $< && echo $$FOO
var.sh:
echo 'FOO=bar' > $@
Alternatively, you could use $(eval ...) but getting it into the right
spot might be tricky: you'd want to put it into the command script for
the _leaf_ target in that series (for example, in var.sh above).
--
-------------------------------------------------------------------------------
Paul D. Smith <[EMAIL PROTECTED]> 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
_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make