automake
[Top][All Lists]
Advanced

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

expansion in AC_CONFIG_COMMANDS


From: Jason Roscoe
Subject: expansion in AC_CONFIG_COMMANDS
Date: Mon, 14 Apr 2008 14:43:43 -0400
User-agent: Thunderbird 2.0.0.9 (X11/20071031)

Hi,
I'm trying to call awk from within the AC_CONFIG_COMMANDS macro in order to create a file called version.h. But, I'm not sure if what I am trying to do is possible or whether I am just not quoting it correctly. No matter how I quote it, I can never get the appropriate command in the resulting configure script.

In configure.ac, for example  I have the following:

AC_CONFIG_COMMANDS([version.h], [echo version is "`awk '/MAJOR/ {major="$3"} END {printf "%d\n", major}' module.h`" > version.h])

This results in the following in 'configure':

"version.h":C) echo version is "`awk '/MAJOR/ {major=""} END {printf "%d\n", major}' module.h`" > version.h ;;

This, of course, is not what I want. Instead of major="", I would like the ending result to say major=$3 so. Can someone provide a hint as to how I can achieve this? Or, if there is a better way to do this I am also interested in suggestions. Thanks.





reply via email to

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