[vlc-devel] [PATCH 1/3] contrib: add a make expand target

Steve Lhomme robux4 at videolabs.io
Mon Jun 12 10:18:50 CEST 2017


---
 contrib/src/help.txt |  1 +
 contrib/src/main.mak | 10 +++++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/contrib/src/help.txt b/contrib/src/help.txt
index d64ca8ef2c..50b5fb1047 100644
--- a/contrib/src/help.txt
+++ b/contrib/src/help.txt
@@ -6,6 +6,7 @@ Other targets:
  * make list         list packages
  * make fetch        fetch required source tarballs
  * make fetch-all    fetch all source tarballs
+ * make expand       fetch and uncompress required source tarballs
  * make distclean    clean everything and undo bootstrap
  * make mostlyclean  clean everything except source tarballs
  * make clean        clean everything
diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index 9f49f266ed..7bbf853f1f 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -386,6 +386,7 @@ PKGS := $(sort $(PKGS_MANUAL) $(PKGS_DEPS))
 
 fetch: $(PKGS:%=.sum-%)
 fetch-all: $(PKGS_ALL:%=.sum-%)
+expand: $(PKGS:%=.expand-%)
 install: $(PKGS:%=.%)
 
 mostlyclean:
@@ -448,7 +449,7 @@ list:
 help:
 	@cat $(SRC)/help.txt
 
-.PHONY: all fetch fetch-all install mostlyclean clean distclean package list help prebuilt
+.PHONY: all fetch fetch-all expand install mostlyclean clean distclean package list help prebuilt
 
 # CMake toolchain
 toolchain.cmake:
@@ -498,6 +499,13 @@ endif
 	$(CHECK_SHA512)
 	touch $@
 
+.expand-%:
+	@if test ! -z $(EXPANDS_$(subst .expand-,,$@)); \
+    then ${MAKE} $(EXPANDS_$(subst .expand-,,$@));\
+    else ${MAKE} $(MODULE);\
+    fi
+	touch $@
+
 .sum-%:
 	$(error Download and check target not defined for $*)
 
-- 
2.12.1



More information about the vlc-devel mailing list