help-make
[Top][All Lists]
Advanced

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

Re: How to write rules for dependencies together with include?


From: Georg-Johann Lay
Subject: Re: How to write rules for dependencies together with include?
Date: Sun, 18 Jan 2009 18:23:56 +0100
User-agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)

Paul Smith schrieb:
On Sun, 2009-01-18 at 13:20 +0100, Georg-Johann Lay wrote:

In a make process I have to get verbatim copies (VPATH and vpath will not work) from files in, say, $(FILES), which are located in $(DIR).

DIR is one directory and FILES is a list of plain file names with no path prefixes.

So the rules to get the files should look like this:

foo1.a: $(DIR)/foo1.a
        cp $^ .

foo2.b: $(DIR)/foo2.b
        cp $^ .

Can you just use static pattern rules?

$(FILES): % : $(DIR)/%
        cp $< $@

Ah, yes. That works fine as far as I can see.
Thank you!

Regards,

Georg-Johann




reply via email to

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