All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] libacpi: use temporary files for generated files
@ 2020-10-26 20:41 Olaf Hering
  2020-10-27 10:16 ` Jan Beulich
  0 siblings, 1 reply; 11+ messages in thread
From: Olaf Hering @ 2020-10-26 20:41 UTC (permalink / raw)
  To: xen-devel; +Cc: Olaf Hering, Jan Beulich, Ian Jackson, Wei Liu

Use a temporay file, and move it in place once done.
The same pattern exists already for other dependencies.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
 tools/libacpi/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/libacpi/Makefile b/tools/libacpi/Makefile
index c17f3924cc..2cc4cc585b 100644
--- a/tools/libacpi/Makefile
+++ b/tools/libacpi/Makefile
@@ -43,7 +43,8 @@ all: $(C_SRC) $(H_SRC)
 
 $(H_SRC): $(ACPI_BUILD_DIR)/%.h: %.asl iasl
 	iasl -vs -p $(ACPI_BUILD_DIR)/$*.$(TMP_SUFFIX) -tc $<
-	sed -e 's/AmlCode/$*/g' -e 's/_aml_code//g' $(ACPI_BUILD_DIR)/$*.hex >$@
+	sed -e 's/AmlCode/$*/g' -e 's/_aml_code//g' $(ACPI_BUILD_DIR)/$*.hex >$@.$(TMP_SUFFIX)
+	mv -f $@.$(TMP_SUFFIX) $@
 	rm -f $(addprefix $(ACPI_BUILD_DIR)/, $*.aml $*.hex)
  
 $(MK_DSDT): mk_dsdt.c


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-10-29 12:09 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-26 20:41 [PATCH v1] libacpi: use temporary files for generated files Olaf Hering
2020-10-27 10:16 ` Jan Beulich
2020-10-27 10:27   ` Olaf Hering
2020-10-27 10:37     ` Jan Beulich
2020-10-27 10:57       ` Andrew Cooper
2020-10-27 11:06         ` Jan Beulich
2020-10-28 18:13           ` Anthony PERARD
2020-10-29  8:47             ` Jan Beulich
2020-10-29 10:57               ` Anthony PERARD
2020-10-29 11:07                 ` Olaf Hering
2020-10-29 12:09                 ` Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.