From c07a2b209d44273098e2d435ebdca82f158c0373 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 22 Nov 2012 10:08:53 +1030 Subject: [PATCH] Makefile: generate config.h more carefully Don't risk reading partially-constructed files. Signed-off-by: Rusty Russell --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0101fe06..b36aca6b 100644 --- a/Makefile +++ b/Makefile @@ -129,7 +129,7 @@ FORCE: # Ensure we don't end up with empty file if configurator fails! config.h: tools/configurator/configurator Makefile Makefile-ccan - tools/configurator/configurator $(CC) $(CCAN_CFLAGS) > $@ || rm -f $@ + tools/configurator/configurator $(CC) $(CCAN_CFLAGS) > $@.tmp && mv $@.tmp $@ include tools/Makefile -include inter-depends -- 2.39.2