Makefile: do not create empty target file in case of errors

This commit is contained in:
Lars Kruse 2019-07-23 04:44:44 +02:00
parent 6dcd179e56
commit e4ef4eccea

View file

@ -22,8 +22,9 @@ $(TARGET_FILE): plugins/* $(CONFIGURATION_FILE)
s/\@\@CONF\@\@/$$ENV{"CONF"}/; \
s/\@\@PLUGINS\@\@/$$ENV{"PLUGINS"}/; \
s/\@\@PLSTR\@\@/$$ENV{"PLSTR"}/;' \
munin-node.in >"$(TARGET_FILE)"
@chmod +x "$(TARGET_FILE)"
munin-node.in >"$(TARGET_FILE).tmp"
@chmod +x "$(TARGET_FILE).tmp"
@mv "$(TARGET_FILE).tmp" "$(TARGET_FILE)"
all: $(TARGET_FILE)