[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: target-specific variables
From: |
David Boyce |
Subject: |
Re: target-specific variables |
Date: |
Sun, 14 Mar 2004 09:56:37 -0500 |
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
Re: target-specific variables, Ken Smith, 2004/03/15