Hello, * Brian Dessent wrote on Tue, Aug 19, 2008 at 04:51:42AM CEST: > Steven Woody wrote: > > > > rmeterd_CXXFLAGS = \ > > -D'SVN_REV="$(shell ../../svnrev-sh)"' \ > > -D'SVN_DATE="$(shell ../../svndate-sh)"'
> > 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. Of course one could also simply use plain old backquote command substitution: -D"SVN_REV=`../../svnrev-sh)`" but that would run the scripts each time those flags were used anywhere, which would be pretty expensive. Or use rmeterd_CXXFLAGS := -D"SVN_REV=`../../svnrev-sh)`" ... that would be less expensive, still GNU make-specific (due to the ':='), but probably fixable in 5 seconds by a user that were eager to cope with another make. Cheers, Ralf