[Top][All Lists]

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

Re: "attributes" for source files?

From: Paul D. Smith
Subject: Re: "attributes" for source files?
Date: Wed, 5 Oct 2005 15:13:56 -0400

%% John Graham-Cumming <address@hidden> writes:

  jg> Torsten Mohr wrote:

  >>> You could define LIST_C and LIST_L like this:
  >>> LIST_C = $(filter %.c,$(LIST))
  >>> LIST_L = $(filter %.l,$(LIST))
  >> This does not work for me, %.c seems to only match a file name
  >> that ends with a single "c".  I'd like to also match "cl".

  jg> Well you could do

  jg> LIST_C = $(filter %.c %.clrm,$(LIST))

Or even:

    LIST_C = $(filter $(addprefix %.,$(foreach S,$(suffix $(LIST)),$(if 
$(findstring c,$(S)),$(S)))),$(LIST))

I think that will work.  Untested though.

 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]