]> xenbits.xensource.com Git - xen.git/commitdiff
Fix Makefile portability: head -n -1 isn't portable.
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 12 Mar 2009 11:24:25 +0000 (11:24 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 12 Mar 2009 11:24:25 +0000 (11:24 +0000)
Signed-off-by: John Levon <john.levon@sun.com>
xen/arch/x86/boot/build32.mk

index 3223bcf4f977a3b7a18e9047d7a5a8de8f5bdff7..a570d425242430f93981613e1efc8760e078dcff 100644 (file)
@@ -10,8 +10,9 @@ $(call cc-option-add,CFLAGS,CC,-fno-stack-protector-all)
 
 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