[libvirt] [PATCH] mac os x: use awk selected by build system rather than first in path

Prior to this patch, the ChangeLog generation was hard coded to use "awk", when it should have been using the AWK variable set by our build system. This breaks compilation on a newly installed OS X system, where the default path has the Mac (non GNU) awk in the default search PATH before any installed GNU awk (gawk). --- docs/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index 114ea1f..7fae40d 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -88,7 +88,7 @@ api: libvirt-api.xml libvirt-refs.xml web: $(dot_html) html/index.html devhelp/index.html ChangeLog.xml: ../ChangeLog ChangeLog.awk - awk -f ChangeLog.awk < $< > $@ + $(AWK) -f ChangeLog.awk < $< > $@ ChangeLog.html.in: ChangeLog.xml ChangeLog.xsl @if [ -x $(XSLTPROC) ] ; then \ -- 1.7.2.3

On 09/28/2010 07:38 AM, Justin Clift wrote:
Prior to this patch, the ChangeLog generation was hard coded to use "awk", when it should have been using the AWK variable set by our build system.
This breaks compilation on a newly installed OS X system, where the default path has the Mac (non GNU) awk in the default search PATH before any installed GNU awk (gawk). --- docs/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/docs/Makefile.am b/docs/Makefile.am index 114ea1f..7fae40d 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -88,7 +88,7 @@ api: libvirt-api.xml libvirt-refs.xml web: $(dot_html) html/index.html devhelp/index.html
ChangeLog.xml: ../ChangeLog ChangeLog.awk - awk -f ChangeLog.awk< $< > $@ + $(AWK) -f ChangeLog.awk< $< > $@
In general: autoconf's AC_PROG_AWK only guarantees that $(AWK) is nawk or better (but of course, gawk is better than nawk) - so maybe there is a bug in ChangeLog.awk for using non-portable awk constructs. That said, on several platforms, plain 'awk' lacks essential features of nawk, so whether or not we also need to patch ChangeLog.awk, this patch is good. ACK. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

On 09/29/2010 12:33 AM, Eric Blake wrote: <snip>
In general: autoconf's AC_PROG_AWK only guarantees that $(AWK) is nawk or better (but of course, gawk is better than nawk) - so maybe there is a bug in ChangeLog.awk for using non-portable awk constructs. That said, on several platforms, plain 'awk' lacks essential features of nawk, so whether or not we also need to patch ChangeLog.awk, this patch is good.
ACK.
Thanks. Will push this in a minute. As an aside, this specific failure is a pain. It _only_ shows up here with a reasonably freshly installed box. After installing the MacPorts packaging system, the problem doesn't manifest. Even if MacPorts gets uninstalled right after the install. MacPorts obviously does "something" (more complex than setting a global path differently) which it's uninstall routine isn't undo-ing. (grrr) :/ So, I'll rebuild the OSX box soon (probably tomorrow), and then test things from a fresh install again to see if there are other gotchas. If things work ok then, we're actually making decent progress to having OSX being a workable platform. :)
participants (2)
-
Eric Blake
-
Justin Clift