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

[Xen-devel] [PATCH] Use GNU grep on Solaris.



# 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


 


Rackspace

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