From: Jaroslav Kysela Date: Tue, 2 Oct 2018 16:37:43 +0000 (+0200) Subject: Makefile: static libs - improve rules X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b11a6eb662552fea829fcf6b28ecd82d53c278fd;p=thirdparty%2Ftvheadend.git Makefile: static libs - improve rules --- diff --git a/Makefile b/Makefile index 6c45be427..5a8f6cf40 100644 --- a/Makefile +++ b/Makefile @@ -847,7 +847,7 @@ ${BUILDDIR}/ffmpeg/build/ffmpeg/lib/libavcodec.a: Makefile.ffmpeg ifeq ($(CONFIG_PCLOUD_CACHE),yes) $(MAKE) -f Makefile.ffmpeg libcacheget endif - $(MAKE) -f Makefile.ffmpeg + $(MAKE) -f Makefile.ffmpeg build # Static HDHOMERUN library @@ -862,7 +862,7 @@ ${BUILDDIR}/hdhomerun/libhdhomerun/libhdhomerun.a: Makefile.hdhomerun ifeq ($(CONFIG_PCLOUD_CACHE),yes) $(MAKE) -f Makefile.hdhomerun libcacheget endif - $(MAKE) -f Makefile.hdhomerun + $(MAKE) -f Makefile.hdhomerun build .PHONY: ffmpeg_rebuild ffmpeg_rebuild: diff --git a/Makefile.ffmpeg b/Makefile.ffmpeg index ae2175dc2..fa9ad5909 100644 --- a/Makefile.ffmpeg +++ b/Makefile.ffmpeg @@ -146,6 +146,7 @@ include $(DIR)/Makefile.static .PHONY: build $(PHONY) build: $(LIB_ROOT)/$(FFMPEG)/.tvh_build + $(call LIBCACHEGET_TIMESTAMP) # ############################################################################## diff --git a/Makefile.hdhomerun b/Makefile.hdhomerun index 3b473019e..47ac98afc 100644 --- a/Makefile.hdhomerun +++ b/Makefile.hdhomerun @@ -53,6 +53,7 @@ include $(DIR)/Makefile.static .PHONY: build build: $(LIB_ROOT)/$(LIBHDHR)/.tvh_build + $(call LIBCACHEGET_TIMESTAMP) # ########################################################################### # Build Rules diff --git a/Makefile.static b/Makefile.static index 5ec22aa8d..803216c85 100644 --- a/Makefile.static +++ b/Makefile.static @@ -61,13 +61,19 @@ export PCLOUD_HASHDIR LIB_STATIC_STAMP := $(BUILDDIR)/$(LIB_NAME)_static_stamp +define LIBCACHEGET_TIMESTAMP + @touch $(LIB_STATIC_STAMP) +endef + # Download cache .PHONY: libcacheget libcacheget: ifeq ($(PCLOUD_CACHE),yes) - @( $(ROOTDIR)/support/lib.sh download $(LIB_NAME) &&\ - $(ROOTDIR)/support/lib.sh unpack $(LIB_NAME) ) || true - @touch $(BUILDDIR)/$(LIB_NAME)_static_stamp + @if ! test -f $(LIB_STATIC_STAMP); then\ + ( $(ROOTDIR)/support/lib.sh download $(LIB_NAME) &&\ + $(ROOTDIR)/support/lib.sh unpack $(LIB_NAME) ) || true;\ + touch $(LIB_STATIC_STAMP);\ + fi endif # Download and Upload on demand