summaryrefslogtreecommitdiff
path: root/include/scan.mk
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2016-10-02 11:40:06 +0200
committerFelix Fietkau <nbd@nbd.name>2016-10-04 16:01:41 +0200
commit934901fb3e544e3c3ef66f6695bcf41293843bf3 (patch)
treed4f1424f97928768899ae1f3c03bb3729fb728ec /include/scan.mk
parentd2f4479870030d2ca25baeb93bbd8881d6296547 (diff)
downloadmtk-20170518-934901fb3e544e3c3ef66f6695bcf41293843bf3.zip
mtk-20170518-934901fb3e544e3c3ef66f6695bcf41293843bf3.tar.gz
mtk-20170518-934901fb3e544e3c3ef66f6695bcf41293843bf3.tar.bz2
build: leaving behind incomplete metadata files on cancelled builds
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'include/scan.mk')
-rw-r--r--include/scan.mk6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/scan.mk b/include/scan.mk
index 5af0359..5bb263d 100644
--- a/include/scan.mk
+++ b/include/scan.mk
@@ -40,7 +40,8 @@ define PackageDir
rm -f $$@; \
}; \
echo; \
- } > $$@ || true
+ } > $$@.tmp
+ mv $$@.tmp $$@
endef
$(OVERRIDELIST):
@@ -76,7 +77,8 @@ $(TMP_DIR)/info/.files-$(SCAN_TARGET).mk: $(FILELIST)
print "$$(eval $$(call PackageDir," info "," dir "," pkg "))"; \
} ' < $<; \
true; \
- ) > $@
+ ) > $@.tmp
+ mv $@.tmp $@
-include $(TMP_DIR)/info/.files-$(SCAN_TARGET).mk