tool/depot: publish missing archives only

The timestamp-based rules of make do not work well for the publish tool
because depot archives are often re-created with the same content but a
different modification time, in particular when creating archives via
'FORCE'. This way, those archives are re-published every time, which
becomes a time-consuming operation since all archives must be signed.

This patch filters the targets based on the content that is already
present in the public/ location. All existing archives are skipped.
This commit is contained in:
Norman Feske 2018-02-01 17:56:57 +01:00
parent cd7e3425ee
commit 7670f048c1
1 changed files with 4 additions and 1 deletions

View File

@ -42,8 +42,11 @@ DEPENDENCIES_CMD := $(GENODE_DIR)/tool/depot/dependencies DEPOT_DIR="$(DEPOT_
DEPENDENCIES_RESULT := $(shell $(DEPENDENCIES_CMD) 2> /dev/null || true)
endif
DEPENDENCIES_MISSING := $(sort $(foreach A, $(DEPENDENCIES_RESULT),\
$(if $(wildcard $(PUBLIC_DIR)/$A.tar.xz.sig),,$A)))
ifeq ($(filter Error:,$(DEPENDENCIES_RESULT)),)
ARCHIVES := $(DEPENDENCIES_RESULT)
ARCHIVES := $(DEPENDENCIES_MISSING)
else
ARCHIVES :=
$(MAKECMDGOALS): dependencies_error