automake
[Top][All Lists]
Advanced

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

Re: Warn: non-POSIX variable name


From: Brian Dessent
Subject: Re: Warn: non-POSIX variable name
Date: Mon, 18 Aug 2008 19:51:42 -0700

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




reply via email to

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