[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 'Generic' pattern rules
From: |
Lane Schwartz |
Subject: |
Re: 'Generic' pattern rules |
Date: |
Thu, 25 Aug 2011 08:58:23 -0400 |
On Thu, Aug 25, 2011 at 4:30 AM, <address@hidden> wrote:
> Hello,
>
> Is it possible to write 'generic' pattern rules? For instance:
>
> ----BEGIN----
>
> %.bar: %.foo
> cat $< >$@
>
> file.bar: file.foo
>
> file2.bar:
>
> anotherfile.bar: file.foo
>
> ----END----
>
> 'file.bar' will be built thanks to the pattern rule.
> 'anotherfile.bar' will not be built because the pattern rule does not match
> (i.e. anotherfile.foo is expected as prerequisite for the pattern rule to be
> matched).
>
> Is there a way to specify pattern rules that tell "here is how to build a
> *.bar file given any *.foo file"?
There is no simple way to do what you are trying to do.
There is probably a complicated way to most (but not all) of what
you're trying to do. Can you give a more detailed example that's
closer to your actual use case?
Cheers,
Lane