Don't risk reading partially-constructed files.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
# Ensure we don't end up with empty file if configurator fails!
config.h: tools/configurator/configurator Makefile Makefile-ccan
# 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
include tools/Makefile
-include inter-depends