[Top][All Lists]

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

Re: target-specific variables

From: Paul D. Smith
Subject: Re: target-specific variables
Date: Sun, 14 Mar 2004 16:14:00 -0500

%% Sven Köhler <address@hidden> writes:

  >> 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?

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

There's no other way to get target-specific variables evaluated, no.

If you told us what you were trying to do at a higher level then maybe
we'd have more to say.

For example, if the variable is going to be set for a given target only
then why not just run the shell command as part of the rule script for
that target?

 Paul D. Smith <address@hidden>          Find some GNU make tips at:            
 "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]