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-changelog

[Xen-changelog] [xen-unstable] Fix Makefile portability: head -n -1 isn'

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Fix Makefile portability: head -n -1 isn't portable.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 12 Mar 2009 04:30:38 -0700
Delivery-date: Thu, 12 Mar 2009 04:32:33 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1236857065 0
# Node ID 32cdbebf0cb7d97fa918f84688a8760aa818b67e
# Parent  dc5441bf3ddcfb14045333c9992fd919c5d79a24
Fix Makefile portability: head -n -1 isn't portable.

Signed-off-by: John Levon <john.levon@xxxxxxx>
---
 xen/arch/x86/boot/build32.mk |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

diff -r dc5441bf3ddc -r 32cdbebf0cb7 xen/arch/x86/boot/build32.mk
--- a/xen/arch/x86/boot/build32.mk      Thu Mar 12 11:16:54 2009 +0000
+++ b/xen/arch/x86/boot/build32.mk      Thu Mar 12 11:24:25 2009 +0000
@@ -10,8 +10,9 @@ include $(XEN_ROOT)/Config.mk
 
 CFLAGS += -Werror -fno-builtin -msoft-float
 
+# NB. awk invocation is a portable alternative to 'head -n -1'
 %.S: %.bin
-       (od -v -t x $< | head -n -1 | \
+       (od -v -t x $< | awk 'NR > 1 {print s} {s=$$0}' | \
        sed 's/ /,0x/g' | sed 's/^[0-9]*,/ .long /') >$@
 
 %.bin: %.lnk

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Fix Makefile portability: head -n -1 isn't portable., Xen patchbot-unstable <=