Avoid need for GREP variable by avoiding GNUisms. The

only one we appear to have is use of '-q'. Replace it
with redirection to /dev/null.

Also avoid use of 'tail' by replacing with 'head' or
'grep' as appropriate.

Signed-off-by: Keir Fraser <keir@xensource.com>
This commit is contained in:
kfraser@localhost.localdomain committed 2006-10-18 13:43:35 +01:00
1 parent 68666c06e8
commit a3ef82b068
6 files changed
+6 -10

No files matched your search

+1 -1
View File
@@ -26,7 +26,7 @@ EXTRA_INCLUDES += $(EXTRA_PREFIX)/include
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 " $(2) " >/dev/null 2>&1 && echo $(2))
ifneq ($(debug),y)
CFLAGS += -DNDEBUG
+2 -2
View File
@@ -22,7 +22,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 ?= .:..
@@ -125,7 +125,7 @@ config-update-pae:
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.
-2
View File
@@ -11,8 +11,6 @@ STRIP = $(CROSS_COMPILE)strip
OBJCOPY = $(CROSS_COMPILE)objcopy
OBJDUMP = $(CROSS_COMPILE)objdump
GREP = grep
INSTALL = install
INSTALL_DIR = $(INSTALL) -d -m0755
INSTALL_DATA = $(INSTALL) -m0644
-1
View File
@@ -11,7 +11,6 @@ STRIP = $(CROSS_COMPILE)gstrip
OBJCOPY = $(CROSS_COMPILE)gobjcopy
OBJDUMP = $(CROSS_COMPILE)gobjdump
GREP = ggrep
SHELL = bash
INSTALL = ginstall
+2 -2
View File
@@ -96,7 +96,7 @@ include/xen/compile.h: include/xen/compile.h.in
-e 's/@@whoami@@/$(USER)/g' \
-e 's/@@domain@@/$(shell ([ -x /bin/dnsdomainname ] && /bin/dnsdomainname) || ([ -x /bin/domainname ] && /bin/domainname || echo [unknown]))/g' \
-e 's/@@hostname@@/$(shell hostname)/g' \
-e 's|@@compiler@@|$(shell $(CC) $(CFLAGS) -v 2>&1 | tail -n 1 | sed -e "s;|;/;")|g' \
-e 's!@@compiler@@!$(shell $(CC) $(CFLAGS) -v 2>&1 | grep -i "gcc.*version")!g' \
-e 's/@@version@@/$(XEN_VERSION)/g' \
-e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \
-e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \
@@ -154,7 +154,7 @@ _cscope:
.PHONY: MAP
MAP:
$(NM) $(TARGET) | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map
$(NM) -n $(TARGET) | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' > System.map
.PHONY: FORCE
FORCE:
+1 -2
View File
@@ -46,8 +46,7 @@ obj-$(crash_debug) += gdbstub.o
$(TARGET): $(TARGET)-syms boot/mkelf32
./boot/mkelf32 $(TARGET)-syms $(TARGET) 0x100000 \
`$(NM) $(TARGET)-syms | sort | tail -n 1 | \
sed -e 's/^\([^ ]*\).*/0x\1/'`
`$(NM) -nr $(TARGET)-syms | head -n 1 | sed -e 's/^\([^ ]*\).*/0x\1/'`
$(TARGET)-syms: boot/$(TARGET_SUBARCH).o $(ALL_OBJS) xen.lds
$(MAKE) -f $(BASEDIR)/Rules.mk $(BASEDIR)/common/symbols-dummy.o
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.