[Top][All Lists]

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

Re: Make pattern matching question

From: Paul D. Smith
Subject: Re: Make pattern matching question
Date: 22 Jul 2005 01:14:18 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

%% writes:

  r> $(EGGS): %: $(wildcard %*)
  r>     do-stuff-to $^

This won't work because the expansion order is wrong: all variables and
functions are expanded FIRST, before the static patterns are handled.

So, $(wildcard %*) is expanded literally and, unless you have some files
that begin with "%" in your directory, it expands to the empty string.

  r> I didn't get far enough to try to filter the extensions I want, I'm
  r> just trying to get the equivalent of bash's "ls %*" where % means
  r> the target name.  Is this possible?

The only way you can do something like this without writing a separate
line for every target is to use the eval function (first available in
GNU make 3.80), or to use the "auto-re-exec" trick.

 Paul D. Smith <>          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]