WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] linux-2.6.18-xen.hg: check that awk supports 'gensub

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] linux-2.6.18-xen.hg: check that awk supports 'gensub' command
From: Michael Abd-El-Malek <mabdelmalek@xxxxxxx>
Date: Tue, 09 Oct 2007 22:53:37 -0400
Delivery-date: Tue, 09 Oct 2007 19:54:04 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.6 (Windows/20070728)
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>
diff -r b0ec211da98a scripts/Makefile.build
--- a/scripts/Makefile.build    Fri Oct 05 10:51:53 2007 +0100
+++ b/scripts/Makefile.build    Tue Oct 09 22:45:45 2007 -0400
@@ -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-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>