automake
[Top][All Lists]
Advanced

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

Re: Autoreconf stops with "non-POSIX variable name"


From: Eric Blake
Subject: Re: Autoreconf stops with "non-POSIX variable name"
Date: Fri, 29 Mar 2013 15:54:02 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4

[adding automake]

On 03/29/2013 03:44 PM, Russ Allbery wrote:

>> MY_REVISION_FILE=my-revision.txt
>> MY_REVISION=$(shell cat $(top_srcdir)/$(MY_REVISION_FILE))

$(shell ...) is a GNU make extension, and by using it, you are making
your Makefile.am useless for all other make flavors.  Automake's goal is
to be portable to ALL makes by default, hence the warning.

> 
>> server/Makefile.am:9: cat $(top_srcdir: non-POSIX variable name
>> server/Makefile.am:9: (probably a GNU make extension)
>> autoreconf: automake failed with exit status: 1

Admittedly, the warning is rather poor quality; perhaps it is worth
turning this into an automake bug to improve the quality of that message.

> 
> This is actually an Automake question, but the short answer is that you
> probably have fatal warnings enabled and you need to add -Wno-portability
> to the Automake flags (in AM_INIT_AUTOMAKE, for example).

Or don't use $(shell), or upgrade to Automake-NG (which _requires_ GNU
make to be installed on the end-user's machine, and therefore should let
you use GNU make extensions without question).

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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