From: Jaroslav Kysela Date: Tue, 2 Oct 2018 16:37:43 +0000 (+0200) Subject: Makefile: static libs - improve rules X-Git-Tag: v4.2.7~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eddaf146ea21b63abbb87de21f69a0e2bd9bf737;p=thirdparty%2Ftvheadend.git Makefile: static libs - improve rules --- diff --git a/Makefile b/Makefile index 59172fa99..3774b7a39 100644 --- a/Makefile +++ b/Makefile @@ -780,7 +780,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 @@ -795,7 +795,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 5309e6dec..e582bcac8 100644 --- a/Makefile.ffmpeg +++ b/Makefile.ffmpeg @@ -135,6 +135,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 aaa0385de..dcce37d1b 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 3e2c14072..52bd13586 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