[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem about multiple targets
From: |
董理 |
Subject: |
Re: Problem about multiple targets |
Date: |
Fri, 24 Sep 2010 09:17:16 +0800 |
Thanks Phillip! I have found out "static pattern rule", it is what I want!
On Fri, Sep 17, 2010 at 3:33 PM, Philip Guenther <address@hidden> 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}
> ...
>
>
> Philip Guenther
>