help-make
[Top][All Lists]
Advanced

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

Re: Problem about multiple targets


From: Oleksandr Gavenko
Subject: Re: Problem about multiple targets
Date: Mon, 20 Sep 2010 12:15:59 +0300
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4

On 17.09.2010 10:33, Philip Guenther wrote:
On Thu, Sep 16, 2010 at 6:21 PM, 董理<address@hidden>  wrote:
I want to write a rule with multiple targets as following:

        ${TARGET}: $(addsuffix .F90, $@) ${OBJECT}
                ...

You almost certainly do not want a multiple target rule, because that
would make *each* ${TARGET} depend on *all* the matching .F90 source
files: changing *any* source file would require recompiling *all* the
target files!

Instead, I think you want just a static pattern rule, such as

${TARGET}: %: %.F90 ${OBJECT}
         ...
Another possibility use .SECONDEXPANSION, but this case unusual
(look to duplicated $$ sign!):

.SECONDEXPANSION:
${TARGET}: $$(addsuffix .F90,$$@) ${OBJECT}

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



reply via email to

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