]> 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>
Wed, 3 Oct 2018 07:47:31 +0000 (09:47 +0200)
Makefile
Makefile.ffmpeg
Makefile.hdhomerun
Makefile.static

index 59172fa99c68c1353c8825a94deef02067f593d9..3774b7a396e975c3155f840ffdff90cb789d33a3 100644 (file)
--- 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:
index 5309e6dec26eb844b02bd22e8d73a4a8b0fdbfc7..e582bcac880a5e8bc607d3242506c92bbaa166f5 100644 (file)
@@ -135,6 +135,7 @@ include $(DIR)/Makefile.static
 
 .PHONY: build $(PHONY)
 build: $(LIB_ROOT)/$(FFMPEG)/.tvh_build
+       $(call LIBCACHEGET_TIMESTAMP)
 
 
 # ##############################################################################
index aaa0385de52a4d6060de1ccf7d54f001f3e885eb..dcce37d1bbec09f7db27592026280c589a085a9e 100644 (file)
@@ -53,6 +53,7 @@ include $(DIR)/Makefile.static
 
 .PHONY: build
 build: $(LIB_ROOT)/$(LIBHDHR)/.tvh_build
+       $(call LIBCACHEGET_TIMESTAMP)
 
 # ###########################################################################
 # Build Rules
index 3e2c140729fd8ff10468faed597a08aea8964d71..52bd135867994d5e6eff048da01528d81afa7219 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