]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Makefile: static libs - improve rules
authorJaroslav Kysela <perex@perex.cz>
Tue, 2 Oct 2018 16:37:43 +0000 (18:37 +0200)
committerJaroslav Kysela <perex@perex.cz>
Tue, 2 Oct 2018 16:37:48 +0000 (18:37 +0200)
Makefile
Makefile.ffmpeg
Makefile.hdhomerun
Makefile.static

index 6c45be427a02ac0e2581daf12aa1416f053e1b19..5a8f6cf40764ff6a0c1970642cc3c39062c4bcdd 100644 (file)
--- 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:
index ae2175dc27746446ec28fa46fdfc9a7c22623bf0..fa9ad5909187a031c87b9737c1668396b3629cf1 100644 (file)
@@ -146,6 +146,7 @@ include $(DIR)/Makefile.static
 
 .PHONY: build $(PHONY)
 build: $(LIB_ROOT)/$(FFMPEG)/.tvh_build
+       $(call LIBCACHEGET_TIMESTAMP)
 
 
 # ##############################################################################
index 3b473019e58a134d917a3f852be183038920b576..47ac98afcc2d13fded56d55da5921e0c15c60e4c 100644 (file)
@@ -53,6 +53,7 @@ include $(DIR)/Makefile.static
 
 .PHONY: build
 build: $(LIB_ROOT)/$(LIBHDHR)/.tvh_build
+       $(call LIBCACHEGET_TIMESTAMP)
 
 # ###########################################################################
 # Build Rules
index 5ec22aa8dacd3b125c48262c074140f5200548c3..803216c85c1a350f24a318ac0a13ac1225e7c330 100644 (file)
@@ -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