[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AC_CONFIG_COMMANDS expansion
From: |
Ralf Wildenhues |
Subject: |
Re: AC_CONFIG_COMMANDS expansion |
Date: |
Mon, 14 Apr 2008 22:50:39 +0200 |
User-agent: |
Mutt/1.5.17+20080114 (2008-01-14) |
Hello Jason,
* Jason Roscoe wrote on Mon, Apr 14, 2008 at 09:00:46PM CEST:
>
> AC_CONFIG_COMMANDS([version.h], [echo version is "`awk '/MAJOR/
> {major="$3"} END {printf "%d\n", major}' module.h`" > version.h])
<http://www.gnu.org/software/autoconf/manual/html_node/Shell-Substitutions.html>
explains why you should rather assign the awk script output to an
intermediate variable (including M4 quoting):
version=`awk '/MAJOR/ {major="$[3]"} END {printf "%d\n", major}' module.h`
AC_CONFIG_COMMANDS([version.h], [echo "version is $version" > version.h])
Also, please do not post the same question independently to several
lists, thanks.
Cheers,
Ralf