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

Re: [Xen-devel] [PATCH] Fix Makefile portability



On Wed, Mar 11, 2009 at 06:48:29PM -0700, John Levon wrote:

>  %.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 /') >$@

Let me try again:


Fix Makefile portability

head -n -1 sadly isn't portable.

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

diff --git a/xen/arch/x86/boot/build32.mk b/xen/arch/x86/boot/build32.mk
--- a/xen/arch/x86/boot/build32.mk
+++ b/xen/arch/x86/boot/build32.mk
@@ -11,7 +11,7 @@ CFLAGS += -Werror -fno-builtin -msoft-fl
 CFLAGS += -Werror -fno-builtin -msoft-float
 
 %.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-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®.