[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] acpi: Makefile should better tolerate interrupts
commit 837b5eefa709ad174bf4dad95c15e8043066d9ad Author: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx> AuthorDate: Fri Sep 23 18:23:47 2016 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Fri Sep 23 18:23:47 2016 +0200 acpi: Makefile should better tolerate interrupts Intermediate stages of building a target should be made with temporary files that are copied to final target in the end. Signed-off-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx> Acked-by: Jan Beulich <jbeulich@xxxxxxxx> --- tools/firmware/hvmloader/acpi/Makefile | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/tools/firmware/hvmloader/acpi/Makefile b/tools/firmware/hvmloader/acpi/Makefile index d3e882a..45de14a 100644 --- a/tools/firmware/hvmloader/acpi/Makefile +++ b/tools/firmware/hvmloader/acpi/Makefile @@ -22,6 +22,9 @@ OBJS = $(patsubst %.c,%.o,$(C_SRC)) CFLAGS += $(CFLAGS_xeninclude) +# Suffix for temporary files. +TMP_SUFFIX = tmp + vpath iasl $(PATH) all: acpi.a @@ -34,18 +37,21 @@ mk_dsdt: mk_dsdt.c $(HOSTCC) $(HOSTCFLAGS) $(CFLAGS_xeninclude) -o $@ mk_dsdt.c dsdt_anycpu_qemu_xen.asl: dsdt.asl mk_dsdt - awk 'NR > 1 {print s} {s=$$0}' $< > $@ - ./mk_dsdt --debug=$(debug) --dm-version qemu-xen >> $@ + awk 'NR > 1 {print s} {s=$$0}' $< > $@.$(TMP_SUFFIX) + ./mk_dsdt --debug=$(debug) --dm-version qemu-xen >> $@.$(TMP_SUFFIX) + mv -f $@.$(TMP_SUFFIX) $@ # NB. awk invocation is a portable alternative to 'head -n -1' dsdt_%cpu.asl: dsdt.asl mk_dsdt - awk 'NR > 1 {print s} {s=$$0}' $< > $@ - ./mk_dsdt --debug=$(debug) --maxcpu $* >> $@ + awk 'NR > 1 {print s} {s=$$0}' $< > $@.$(TMP_SUFFIX) + ./mk_dsdt --debug=$(debug) --maxcpu $* >> $@.$(TMP_SUFFIX) + mv -f $@.$(TMP_SUFFIX) $@ $(filter dsdt_%.c,$(C_SRC)): %.c: iasl %.asl iasl -vs -p $* -tc $*.asl - sed -e 's/AmlCode/$*/g' $*.hex >$@ - echo "int $*_len=sizeof($*);" >>$@ + sed -e 's/AmlCode/$*/g' $*.hex >$@.$(TMP_SUFFIX) + echo "int $*_len=sizeof($*);" >>$@.$(TMP_SUFFIX) + mv -f $@.$(TMP_SUFFIX) $@ rm -f $*.aml $*.hex iasl: @@ -63,7 +69,7 @@ acpi.a: $(OBJS) clean: rm -rf *.a *.o $(IASL_VER) $(IASL_VER).tar.gz $(DEPS) - rm -rf ssdt_*.h dsdt*.c *~ *.aml *.hex mk_dsdt dsdt_*.asl + rm -rf ssdt_*.h dsdt*.c *~ *.aml *.hex mk_dsdt dsdt_*.asl *.$(TMP_SUFFIX) distclean: clean -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |