automake
[Top][All Lists]
Advanced

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

Re: Warn: non-POSIX variable name


From: Steven Woody
Subject: Re: Warn: non-POSIX variable name
Date: Tue, 19 Aug 2008 14:29:58 +0800

On Tue, Aug 19, 2008 at 10:51 AM, Brian Dessent <address@hidden> wrote:
> Steven Woody wrote:
>
>> How do I remove these warnings when do automake:
>>
>>     src/rmeterd/Makefile.am:9: shell ../../svndate-sh: non-POSIX variable 
>> name
>>     src/rmeterd/Makefile.am:9: (probably a GNU make extension)
>>
>> in the Makefile.am, I did something like this:
>>
>>     rmeterd_CXXFLAGS = \
>>                     -D'SVN_REV="$(shell ../../svnrev-sh)"' \
>>                     -D'SVN_DATE="$(shell ../../svndate-sh)"'
>>
>> That is, I call a external shell script to get values that will be set
>> to a -D definition.
>>
>> What's the correct way to do this without warning? Thanks.
>
> Are you asking how to do this in a way that's not GNU make specific, or
> are you asking how to make automake not warn about it?  For the latter,
> add -Wno-portability to your automake options (globally in
> AM_INIT_AUTOMAKE or per-Makefile in AUTOMAKE_OPTIONS.)  For the former,
> run the script at configure-time rather than at make-time and AC_SUBST
> the resulting value.
>
> Brian
>

Thank you. Adding -Wno-portablility to AM_INIT_AUTOMAKE works.  But I
don't understand your other words:  "For the former,
run the script at configure-time rather than at make-time and AC_SUBST
the resulting value."




reply via email to

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