debuggers.hg

changeset 21011:2e7dc3421a52

hvmloader: Replace unportable usage of GNU head with portable awk.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Feb 22 18:42:50 2010 +0000 (2010-02-22)
parents 94e009ef5a58
children 50f7b55b69fc
files tools/firmware/hvmloader/acpi/Makefile
line diff
     1.1 --- a/tools/firmware/hvmloader/acpi/Makefile	Mon Feb 22 10:08:10 2010 +0000
     1.2 +++ b/tools/firmware/hvmloader/acpi/Makefile	Mon Feb 22 18:42:50 2010 +0000
     1.3 @@ -31,9 +31,10 @@ ssdt_pm.h ssdt_tpm.h: %.h: %.asl iasl
     1.4  	sed -e 's/AmlCode/$*/g' $*.hex >$@
     1.5  	rm -f $*.hex $*.aml
     1.6  
     1.7 +# NB. awk invocation is a portable alternative to 'head -n -1'
     1.8  dsdt_15cpu.c dsdt_anycpu.c: %.c: dsdt.asl mk_dsdt.c iasl
     1.9  	$(HOSTCC) $(HOSTCFLAGS) $(CFLAGS_include) -o mk_$* mk_dsdt.c
    1.10 -	head -n -1 $< >$*.asl
    1.11 +	awk 'NR > 1 {print s} {s=$$0}' $< >$*.asl
    1.12  	./mk_$* >>$*.asl
    1.13  	iasl -p $* -tc $*.asl
    1.14  	sed -e 's/AmlCode/$*/g' $*.hex >$@