[Top][All Lists]

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

Re: Help copying & renaming filename inside makefile.

From: Oleksandr Gavenko
Subject: Re: Help copying & renaming filename inside makefile.
Date: Tue, 11 Jan 2011 12:29:25 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20101207 Thunderbird/3.1.7

On 10.01.2011 20:52, givemecode wrote:

Hi - I have an include directory with many .h files. I need to create a rule
which is a SINGLE line to loop through all *.h files in the include
directory to create a HEADER list (below) instead of manually creating the

HEADER    +=  a.hh
HEADER    +=  b.hh
HEADER    +=  c.hh

So I need a foreach loop which loops through all the include/*.h files, and
appends them with a .hh and adds them to the HEADER += .  list. Possibly
something like this, which I will mess up but anyway:

$(foreach i, $(INCLUDE_DIR)/%.h )
     HEADER += $(@:%.h=%.hh)

please help, thanks

HEADER += $(patsubst %.h,%.hh,$(widlcard $(INCLUDE_DIR)/%.h))

С уважением, Александр Гавенко.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]