automake
[Top][All Lists]
Advanced

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

Re: pattern rules


From: Ralf Wildenhues
Subject: Re: pattern rules
Date: Thu, 27 Mar 2008 00:36:54 +0100
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

Hello Ralf,

* Ralf Hemmecke wrote on Wed, Mar 26, 2008 at 10:49:35AM CET:
>
> pattern rules are forbidden by automake, but I have the following problem.

They are not forbidden.  They are unportable to non-GNU make, and
automake may not fully understand them, but other than that, there
is no problem (and there shouldn't be a problem with your rules).

> %.nw.tex: %.nw
>       noweave $< > $@
>
> %.someext: %.someext.nw
>       notangle $< > $@
>
> I cannot think of anything reasonable to transform that into suffix  
> rules. Do you have some hints.

Does this work (untested)?

SUFFIXES = .nw.tex .nw .someext .someext.nw
.nw.nw.tex:
        noweave $< > $@

.someext.nw.someext:
        notangle $< > $@

I'm pretty sure though that suffixes containing multiple dots aren't
portable to all make implementations, either.  Posix explicitly
disallows periods and slashes in suffixes for inference rules.
So you might as well stick to the pattern rules.

> Interestingly, I have
>
> AC_CONFIG_FILES([Makefile:Makefile.in:literate.mk])
>
> in my configure.ac and Automake doesn't complain if I put pattern rules  
> inside literate.mk. Is this a bug or a feature?

<http://www.gnu.org/software/automake/manual/html_node/Requirements.html>

Cheers,
Ralf




reply via email to

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