]> git.sesse.net Git - vlc/commitdiff
contrib: check that dependencies are actually checksummed
authorRémi Denis-Courmont <remi@remlab.net>
Fri, 30 Sep 2011 06:42:53 +0000 (09:42 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 1 Oct 2011 07:51:17 +0000 (10:51 +0300)
This should force a build failure when the checksum file is not in
sync with the list of required sources.

contrib/src/main.mak

index 8c83173eb96aa1914e0ed894e4aa4104b464d255..a8f7c16e93e1fa77d688eeaebb3ba95159a2836d 100644 (file)
@@ -182,8 +182,12 @@ download_git = \
        (cd $(dir $@) && \
         tar cvJ $(notdir $(@:.tar.xz=))) > $@ && \
        rm -Rf $(@:.tar.xz=)
-checksum = (cd $(TARBALLS) && $(1) --check /dev/stdin) < \
-               $(SRC)/$(patsubst .sum-%,%,$@)/$(2)SUMS
+checksum = \
+       $(foreach f,$(filter $(TARBALLS)/%,$^), \
+               grep -- " $(f:$(TARBALLS)/%=%)$$" \
+                       "$(SRC)/$(patsubst .sum-%,%,$@)/$(2)SUMS" &&) \
+       (cd $(TARBALLS) && $(1) --check /dev/stdin) < \
+               "$(SRC)/$(patsubst .sum-%,%,$@)/$(2)SUMS"
 CHECK_SHA512 = $(call checksum,$(SHA512SUM),SHA512)
 UNPACK = $(RM) -R $@ \
        $(foreach f,$(filter %.tar.gz %.tgz,$^), && tar xvzf $(f)) \