[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Portable Use of Variables
From: |
Eric Blake |
Subject: |
Re: Portable Use of Variables |
Date: |
Tue, 11 Nov 2014 12:25:35 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 |
On 11/11/2014 10:59 AM, fr33domlover wrote:
>>> The first form of expansion on that page, $(var:.a=.b), should be OK.
>>> They are standard in POSIX and work on all make implementations that I
>>> know of.
>>>
>>> The version with % characters is not portable.
>>
>> That said, POSIX is hoping to standardize it in the next few years:
>>
>> http://austingroupbugs.net/view.php?id=519
>>
>
> Hmmm I was sure it's portable because `make distcheck` doesn't complain about
> the %s, and I'm using -Werror and -Wall automake flags. How bad is it? I
> suppose it's not specific to just GNU make alone?
automake can't warn about all non-portable aspects, although patches to
make it warn about more cases would be welcome. And the fact that POSIX
is planning to standardize % substitutions in make is a sign that
existing implementations that already support it are in agreement (more
than just GNU make), so if you want to be on the leading edge of the
curve, you aren't excluding that many users.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature