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

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

Subject: Re: [Xen-devel] [PATCH] Fix Makefile portability
From: John Levon <levon@xxxxxxxxxxxxxxxxx>
Date: Wed, 11 Mar 2009 22:49:55 -0400
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 11 Mar 2009 19:50:20 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <5c365f6d394e67d0ea5b.1236822509@girltalk>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <5c365f6d394e67d0ea5b.1236822509@girltalk>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
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

<Prev in Thread] Current Thread [Next in Thread>