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

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



# 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


 


Rackspace

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