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] makefile fix for tail portability

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] makefile fix for tail portability
From: John Levon <levon@xxxxxxxxxxxxxxxxx>
Date: Wed, 18 Oct 2006 01:10:08 +0100
Delivery-date: Tue, 17 Oct 2006 17:10:24 -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 1161130141 25200
# Node ID 10b7da0b79bc1ad886f3237fc7f9d1a9815a7c44
# Parent  ddfd15fa79a7fee131ffc3e228daa85519e58095
Solaris's default tail cannot handle the standards-compliant -n option to tail.

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

diff --git a/config/Linux.mk b/config/Linux.mk
--- a/config/Linux.mk
+++ b/config/Linux.mk
@@ -11,6 +11,7 @@ OBJCOPY    = $(CROSS_COMPILE)objcopy
 OBJCOPY    = $(CROSS_COMPILE)objcopy
 OBJDUMP    = $(CROSS_COMPILE)objdump
 
+TAIL       = tail
 GREP       = grep
 
 INSTALL      = install
diff --git a/config/SunOS.mk b/config/SunOS.mk
--- a/config/SunOS.mk
+++ b/config/SunOS.mk
@@ -11,6 +11,7 @@ OBJCOPY    = $(CROSS_COMPILE)gobjcopy
 OBJCOPY    = $(CROSS_COMPILE)gobjcopy
 OBJDUMP    = $(CROSS_COMPILE)gobjdump
 
+TAIL       = /usr/xpg4/bin/tail
 GREP       = ggrep
 SHELL      = bash
 
diff --git a/xen/Makefile b/xen/Makefile
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -96,7 +96,7 @@ include/xen/compile.h: include/xen/compi
            -e 's/@@whoami@@/$(shell whoami)/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 | $(TAIL) -n 1 | 
sed -e "s;|;/;")|g' \
            -e 's/@@version@@/$(XEN_VERSION)/g' \
            -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \
            -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \
diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
--- a/xen/arch/x86/Makefile
+++ b/xen/arch/x86/Makefile
@@ -46,7 +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 | \
+       `$(NM) $(TARGET)-syms | sort | $(TAIL) -n 1 | \
         sed -e 's/^\([^ ]*\).*/0x\1/'`
 
 $(TARGET)-syms: boot/$(TARGET_SUBARCH).o $(ALL_OBJS) xen.lds

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] makefile fix for tail portability, John Levon <=