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] Use GNU grep on Solaris.

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Use GNU grep on Solaris.
From: John Levon <levon@xxxxxxxxxxxxxxxxx>
Date: Tue, 17 Oct 2006 14:02:20 +0100
Delivery-date: Tue, 17 Oct 2006 06:02:40 -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: Mutt/1.5.9i
# HG changeset patch
# User john.levon@xxxxxxx
# Date 1161089909 25200
# Node ID 7147e57f18552bbb8d25155cc1c635315283ee31
# Parent  a4cd2876f27755cb0d530e929a72bdd179566026
Use GNU grep on Solaris.

Signed-off-by: John Levon <john.levon@xxxxxxx>

diff --git a/Config.mk b/Config.mk
--- a/Config.mk
+++ b/Config.mk
@@ -24,7 +24,7 @@ EXTRA_LIB += $(EXTRA_PREFIX)/$(LIBDIR)
 EXTRA_LIB += $(EXTRA_PREFIX)/$(LIBDIR)
 endif
 
-test-gcc-flag = $(shell $(1) -v --help 2>&1 | grep -q " $(2) " && echo $(2))
+test-gcc-flag = $(shell $(1) -v --help 2>&1 | $(GREP) -q " $(2) " && echo $(2))
 
 CFLAGS += -Wall -Wstrict-prototypes
 
diff --git a/buildconfigs/Rules.mk b/buildconfigs/Rules.mk
--- a/buildconfigs/Rules.mk
+++ b/buildconfigs/Rules.mk
@@ -19,7 +19,7 @@ endif
 
 # Expand Linux series to Linux version
 LINUX_SERIES   ?= 2.6
-LINUX_VER      ?= $(shell grep "^LINUX_VER " buildconfigs/mk.linux-2.6-xen | 
sed -e 's/.*=[ ]*//')
+LINUX_VER      ?= $(shell $(GREP) "^LINUX_VER " buildconfigs/mk.linux-2.6-xen 
| sed -e 's/.*=[ ]*//')
 
 # Setup Linux search path
 LINUX_SRC_PATH ?= .:..
@@ -122,7 +122,7 @@ ifeq ($(XEN_TARGET_X86_PAE),y)
 ifeq ($(XEN_TARGET_X86_PAE),y)
        sed -e 's!^CONFIG_HIGHMEM4G=y$$!\# CONFIG_HIGHMEM4G is not set!;s!^\# 
CONFIG_HIGHMEM64G is not set$$!CONFIG_HIGHMEM64G=y!' $(CONFIG_FILE) > 
$(CONFIG_FILE)- && mv $(CONFIG_FILE)- $(CONFIG_FILE)
 else
-       grep '^CONFIG_HIGHMEM64G=y' $(CONFIG_FILE) >/dev/null && ( sed -e 
's!^CONFIG_HIGHMEM64G=y$$!\# CONFIG_HIGHMEM64G is not set!;s!^\# 
CONFIG_HIGHMEM4G is not set$$!CONFIG_HIGHMEM4G=y!' $(CONFIG_FILE) > 
$(CONFIG_FILE)- && mv $(CONFIG_FILE)- $(CONFIG_FILE) ) || true
+       $(GREP) '^CONFIG_HIGHMEM64G=y' $(CONFIG_FILE) >/dev/null && ( sed -e 
's!^CONFIG_HIGHMEM64G=y$$!\# CONFIG_HIGHMEM64G is not set!;s!^\# 
CONFIG_HIGHMEM4G is not set$$!CONFIG_HIGHMEM4G=y!' $(CONFIG_FILE) > 
$(CONFIG_FILE)- && mv $(CONFIG_FILE)- $(CONFIG_FILE) ) || true
 endif
 
 # never delete any intermediate files.
diff --git a/config/Linux.mk b/config/Linux.mk
--- a/config/Linux.mk
+++ b/config/Linux.mk
@@ -10,6 +10,8 @@ STRIP      = $(CROSS_COMPILE)strip
 STRIP      = $(CROSS_COMPILE)strip
 OBJCOPY    = $(CROSS_COMPILE)objcopy
 OBJDUMP    = $(CROSS_COMPILE)objdump
+
+GREP       = grep
 
 INSTALL      = install
 INSTALL_DIR  = $(INSTALL) -d -m0755
diff --git a/config/SunOS.mk b/config/SunOS.mk
--- a/config/SunOS.mk
+++ b/config/SunOS.mk
@@ -10,6 +10,8 @@ STRIP      = $(CROSS_COMPILE)gstrip
 STRIP      = $(CROSS_COMPILE)gstrip
 OBJCOPY    = $(CROSS_COMPILE)gobjcopy
 OBJDUMP    = $(CROSS_COMPILE)gobjdump
+
+GREP       = ggrep
 
 INSTALL      = ginstall
 INSTALL_DIR  = $(INSTALL) -d -m0755

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Use GNU grep on Solaris., John Levon <=