automake-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] Test `$(var:suf=rpl)' expansion in special automake variable


From: Stefano Lattarini
Subject: Re: [PATCH] Test `$(var:suf=rpl)' expansion in special automake variables.
Date: Thu, 9 Dec 2010 22:05:23 +0100
User-agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )

On Thursday 09 December 2010, Stefano Lattarini wrote:
> On Thursday 09 December 2010, Eric Blake wrote:
> > On 12/09/2010 05:46 AM, Stefano Lattarini wrote:
> > > Another testsuite-enhancing patch, based off of maint and intended for
> > > master.
> > > 
> > > Tested with Solaris 10 XPG4 make, Solaris 10 CCS make, Solaris 10 dmake,
> > > Heirloom make, GNU make from 3.79 up to 3.82, with the Debian ports of
> > > NetBSD make and FreeBSD make, with dash 0.5.2, bash 2.0, bash 4.1, pdksh,
> > > Solaris 10 /bin/sh and Heirloom shell.
> > > 
> > > I'll wait the customary 72 hours (until sunday evening) before
> > > pushing.
> > 
> > Can you also test whether $(var:$(var2)=$(var3)) works in all makes?
> >
> According to Ralf Wildenhues:
>  <http://www.mail-archive.com/address@hidden/msg16318.html>
> even $(var:=$(var2)) does not work portably.  I'm now going to check
> the make implementations I've access to to see if any of them fails
> with these constructs.  I will post the results shortly.
> 
> > That question was raised during today's Austin Group meeting, as part of
> > figuring out how portable recursive variable expansion is in practice.
> > 
> 
The syntax:
  $(var:$(var2)=$(var3)) 
seems to work with these make implementations:
  - GNU make from 3.79 to 3.82
  - Debian port of FreeBSD make, from package freebsd-buildutils,
    version 8.0-1
  - Debian port of NetBSD make, built from sources, version 1.111
    (sic, not a typo)
  - Heirloom make (2007), more info at
    <http://heirloom.sourceforge.net/devtools.html>
  - Solaris 10 XPG4 make
  - Solaris 10 CCS make
  - Solaris 10 dmake

I've used the following commands to perform the tests:
  $ cat > Makefile <<'END'
  var = a.x
  var1 = x
  var2 = y
  default:; @echo $(var:$(var1)=$(var2))
  END
  $ make
  ...

So your proposed syntax works ok with all the make implementations I've
access to.  Obviously, AIX, IRIX, and Tru64 make implementations should
be tried also, as well as older implementations of Solaris and BSD make.
Unfortunately, I don't have access to any of those.

Regards,
  Stefano




reply via email to

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