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

[Xen-changelog] [linux-2.6.18-xen] Check that awk supports 'gensub' command.



# HG changeset patch
# User Keir Fraser <keir@xxxxxxxxxxxxx>
# Date 1192012335 -3600
# Node ID 48a6d8bc31b8717c4218fc5e3c5bc9d848703db4
# Parent  caacda7fe7cf6a893034b7cae14e6586400454ac
Check that awk supports 'gensub' command.

The linux-2.6.18-xen.hg/scripts/Makefile.xen.awk script depends on the
GNU AWK-specific function "gensub".  If another awk is used (e.g.,
Debian installs mawk by default), the lack of gensub trickles down to
cause the -xen.c files to not be compiled.  This was time-consuming to
track.  So we should check that the awk program supports 'gensub'.

Signed-off-by: Michael Abd-El-Malek <mabdelmalek@xxxxxxx>
---
 scripts/Makefile.build |    2 ++
 1 files changed, 2 insertions(+)

diff -r caacda7fe7cf -r 48a6d8bc31b8 scripts/Makefile.build
--- a/scripts/Makefile.build    Tue Oct 09 12:14:39 2007 +0100
+++ b/scripts/Makefile.build    Wed Oct 10 11:32:15 2007 +0100
@@ -71,6 +71,8 @@ ifeq ($(CONFIG_XEN),y)
 ifeq ($(CONFIG_XEN),y)
 $(objtree)/scripts/Makefile.xen: $(srctree)/scripts/Makefile.xen.awk 
$(srctree)/scripts/Makefile.build
        @echo '  Updating $@'
+       $(if $(shell echo a | $(AWK) '{ print gensub(/a/, "AA", "g"); }'),\
+        ,$(error 'Your awk program does not define gensub.  Use gawk or 
another awk with gensub'))
        @$(AWK) -f $< $(filter-out $<,$^) >$@
 
 xen-src-single-used-m  := $(patsubst $(srctree)/%,%,$(wildcard $(addprefix 
$(srctree)/,$(single-used-m:.o=-xen.c))))

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.