automake
[Top][All Lists]
Advanced

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

Re: convert a pattern rule to a suffix rule


From: YuGiOhJCJ Mailing-List
Subject: Re: convert a pattern rule to a suffix rule
Date: Thu, 26 Aug 2010 09:43:44 +0200

You say pattern rules and suffix rules are not portable. Also, the only way to 
be portable is to to spell out the rule for each target.
So, can you tell me why autoreconf complains only when I use pattern rules and 
not when I use suffix rules?

On Wed, 25 Aug 2010 20:37:04 +0200
Ralf Wildenhues <address@hidden> wrote:

> 
> Hello,
> 
> * YuGiOhJCJ Mailing-List wrote on Wed, Aug 25, 2010 at 11:14:15AM CEST:
> > I know that pattern rules are not portable. When we use one pattern
> > rule, then we call autoreconf, we can see this warning :
> > man/Makefile.am:8: `%'-style pattern rules are a GNU make extension
> > So if we want a protable project, we should not use them in a Makefile.am 
> > file.
> 
> Or you use -Wno-portability to silence the warning, and require GNU
> make for building your project.
> 
> > But we can use a old fashioned suffix rule which is portable. The
> > problem is when the prerequisites arn't in the same directory than the
> > target and when the prerequisites have no suffix.
> 
> Then you cannot use suffix rules in a portable way, unfortunately;
> you can get around the directory fairly portably by setting something
> like
>   VPATH = @srcdir@:../src:@srcdir@/../src
> 
> in the Makefile.am and then forget about the directory (but you need a
> new Autoconf for this to work because we recently found an Autoconf bug
> in this area), but single suffix rules work the other way round; see for
> example `info Autoconf "Single Suffix Rules"'.
> 
> If you don't want to require GNU make, the only fully portable way I
> know is to spell out the rule for each target.
> 
> Hope that helps.
> 
> Cheers,
> Ralf
> 


-- 
YuGiOhJCJ Mailing-List <address@hidden>




reply via email to

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