]> git.ozlabs.org Git - ccan/blobdiff - Makefile
Makefile: generate config.h more carefully
[ccan] / Makefile
index 0101fe0653b5601bb9c30888a99b57f1718fa799..b36aca6b2a5b020bd483737fb551a74740523f3c 100644 (file)
--- 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