]> xenbits.xensource.com Git - xen.git/commitdiff
hvmloader: Replace unportable usage of GNU head with portable awk.
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 22 Feb 2010 18:42:50 +0000 (18:42 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 22 Feb 2010 18:42:50 +0000 (18:42 +0000)
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
tools/firmware/hvmloader/acpi/Makefile

index 7d82c63cbd6046649bc085efda4f11b19542c3ff..3fdb7c27e158213abfcb96a7ef43f23532af39b5 100644 (file)
@@ -31,9 +31,10 @@ ssdt_pm.h ssdt_tpm.h: %.h: %.asl iasl
        sed -e 's/AmlCode/$*/g' $*.hex >$@
        rm -f $*.hex $*.aml
 
+# NB. awk invocation is a portable alternative to 'head -n -1'
 dsdt_15cpu.c dsdt_anycpu.c: %.c: dsdt.asl mk_dsdt.c iasl
        $(HOSTCC) $(HOSTCFLAGS) $(CFLAGS_include) -o mk_$* mk_dsdt.c
-       head -n -1 $< >$*.asl
+       awk 'NR > 1 {print s} {s=$$0}' $< >$*.asl
        ./mk_$* >>$*.asl
        iasl -p $* -tc $*.asl
        sed -e 's/AmlCode/$*/g' $*.hex >$@