At 09:38 AM 3/14/2004, Sven K�hler wrote:
I'd still like to use the $(shell ...) stuff and define a variable, but only if the target t1 is executed. Is there any trick to achieve that?

ohh, i guess = instead of := does the trick, although the shell-command will be executed many times if the variable is used many times.

It seems clearly documented to me, but here's an example anyway:


% cat Makefile
t1: hallo :=target 1

t1:
        echo $(hallo)

t2:
        echo $(hallo)

% make t1
echo target 1
target 1
% make t2
echo

%

-David Boyce



_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make

Reply via email to