[Top][All Lists]

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

Re: target-specific variable bug?

From: Paul D. Smith
Subject: Re: target-specific variable bug?
Date: Wed, 24 Aug 2005 16:08:03 -0400

%% "Martin d'Anjou" <address@hidden> writes:

  md> I have this makefile where the target specific variable TOP_FILE
  md> is in effect for an unrelated target:

I don't think you're understanding how pattern-specific variables work.
They aren't associated with a particular pattern rule.

ANY target that matches the pattern will have that pattern-specific
variable matched.  Patterns here are more like ones in vpath, etc. where
they match ANY filename.

You have a file "file.tgt", and you've declared a pattern-specific
variable for the pattern %.tgt which matches that filename, so you'll
get that variable defined.

It doesn't have to be the case that "file.tgt" matches a given pattern
rule, or even that a pattern rule exist at all.

 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]