From: John Levon Subject: Re: [PATCH] Fix Makefile portability Date: Wed, 11 Mar 2009 22:49:55 -0400 Message-ID: <20090312024955.GB29962@movementarian.org> References: <5c365f6d394e67d0ea5b.1236822509@girltalk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <5c365f6d394e67d0ea5b.1236822509@girltalk> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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 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