[vlc-commits] contrib: touch downloaded file

Rémi Denis-Courmont git at videolan.org
Tue Jun 28 20:14:33 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Jun 28 21:13:13 2011 +0300| [3aec21f211432caed4518dc54ba9a165194320db] | committer: Rémi Denis-Courmont

contrib: touch downloaded file

wget uses the timestamp from the server, which is nice in theory, but
breaks makefile dependency propagation.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3aec21f211432caed4518dc54ba9a165194320db
---

 contrib/src/a52/rules.mak      |    2 +-
 contrib/src/directx/rules.mak  |    2 +-
 contrib/src/dshow/rules.mak    |    6 +++---
 contrib/src/ebml/rules.mak     |    2 +-
 contrib/src/flac/rules.mak     |    2 +-
 contrib/src/live555/rules.mak  |    2 +-
 contrib/src/lua/rules.mak      |    2 +-
 contrib/src/main.mak           |    5 ++++-
 contrib/src/matroska/rules.mak |    2 +-
 contrib/src/ogg/rules.mak      |    2 +-
 contrib/src/shout/rules.mak    |    2 +-
 contrib/src/speex/rules.mak    |    2 +-
 contrib/src/theora/rules.mak   |    2 +-
 contrib/src/vorbis/rules.mak   |    2 +-
 14 files changed, 19 insertions(+), 16 deletions(-)

diff --git a/contrib/src/a52/rules.mak b/contrib/src/a52/rules.mak
index fd3a40d..2151e96 100644
--- a/contrib/src/a52/rules.mak
+++ b/contrib/src/a52/rules.mak
@@ -6,7 +6,7 @@ A52DEC_URL := $(CONTRIB_VIDEOLAN)/a52dec-$(A52DEC_VERSION).tar.gz
 PKGS += a52
 
 $(TARBALLS)/a52dec-$(A52DEC_VERSION).tar.gz:
-	$(DOWNLOAD) $(A52DEC_URL)
+	$(call download,$(A52DEC_URL))
 
 .sum-a52: a52dec-$(A52DEC_VERSION).tar.gz
 
diff --git a/contrib/src/directx/rules.mak b/contrib/src/directx/rules.mak
index f823676..3d6c0df 100644
--- a/contrib/src/directx/rules.mak
+++ b/contrib/src/directx/rules.mak
@@ -7,7 +7,7 @@ PKGS += directx
 endif
 
 $(TARBALLS)/directx-oss.tar.bz2:
-	$(DOWNLOAD) $(DX_HEADERS_URL)
+	$(call download,$(DX_HEADERS_URL))
 
 .sum-directx: directx-oss.tar.bz2
 
diff --git a/contrib/src/dshow/rules.mak b/contrib/src/dshow/rules.mak
index 1d2ad95..c8693cb 100644
--- a/contrib/src/dshow/rules.mak
+++ b/contrib/src/dshow/rules.mak
@@ -11,13 +11,13 @@ PKGS += dshow
 endif
 
 $(TARBALLS)/dshow-headers-oss.tar.bz2:
-	$(DOWNLOAD) $(DSHOW_HEADERS_URL)
+	$(call download,$(DSHOW_HEADERS_URL))
 
 $(TARBALLS)/dxva2api.h:
-	$(DOWNLOAD) $(DXVA2_URL)
+	$(call download,$(DXVA2_URL))
 
 $(TARBALLS)/d2d_headers.tar.gz:
-	$(DOWNLOAD) $(D2D_URL) -O $@
+	$(call download,$(D2D_URL) -O $@)
 
 DSHOW_SOURCES := dshow-headers-oss.tar.bz2 dxva2api.h d2d_headers.tar.gz
 
diff --git a/contrib/src/ebml/rules.mak b/contrib/src/ebml/rules.mak
index 21177af..511861f 100644
--- a/contrib/src/ebml/rules.mak
+++ b/contrib/src/ebml/rules.mak
@@ -5,7 +5,7 @@ EBML_URL := http://dl.matroska.org/downloads/libebml/libebml-$(EBML_VERSION).tar
 #EBML_URL := $(CONTRIB_VIDEOLAN)/libebml-$(EBML_VERSION).tar.bz2
 
 $(TARBALLS)/libebml-$(EBML_VERSION).tar.bz2:
-	$(DOWNLOAD) $(EBML_URL)
+	$(call download,$(EBML_URL))
 
 .sum-ebml: libebml-$(EBML_VERSION).tar.bz2
 
diff --git a/contrib/src/flac/rules.mak b/contrib/src/flac/rules.mak
index 5eb15cc..549cf45 100644
--- a/contrib/src/flac/rules.mak
+++ b/contrib/src/flac/rules.mak
@@ -6,7 +6,7 @@ FLAC_URL := $(SF)/flac/flac-$(FLAC_VERSION).tar.gz
 PKGS += flac
 
 $(TARBALLS)/flac-$(FLAC_VERSION).tar.gz:
-	$(DOWNLOAD) $(FLAC_URL)
+	$(call download,$(FLAC_URL))
 
 .sum-flac: flac-$(FLAC_VERSION).tar.gz
 
diff --git a/contrib/src/live555/rules.mak b/contrib/src/live555/rules.mak
index 843d72f..0007aee 100644
--- a/contrib/src/live555/rules.mak
+++ b/contrib/src/live555/rules.mak
@@ -5,7 +5,7 @@ LIVEDOTCOM_URL := http://live555.com/liveMedia/public/live555-latest.tar.gz
 PKGS += live555
 
 $(TARBALLS)/live555-latest.tar.gz:
-	$(DOWNLOAD) $(LIVEDOTCOM_URL)
+	$(call download,$(LIVEDOTCOM_URL))
 
 .sum-live555: live555-latest.tar.gz
 
diff --git a/contrib/src/lua/rules.mak b/contrib/src/lua/rules.mak
index 2e25820..664f048 100644
--- a/contrib/src/lua/rules.mak
+++ b/contrib/src/lua/rules.mak
@@ -22,7 +22,7 @@ endif
 PKGS += lua
 
 $(TARBALLS)/lua-$(LUA_VERSION).tar.gz:
-	$(DOWNLOAD) $(LUA_URL)
+	$(call download,$(LUA_URL))
 
 .sum-lua: lua-$(LUA_VERSION).tar.gz
 
diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index 4b9b7ff..0da05dd 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -157,7 +157,10 @@ else
 HOSTCONF += --with-pic
 endif
 
-DOWNLOAD = cd $(TARBALLS) && $(WGET) -nc
+download = rm -f $@.tmp && \
+		$(WGET) -p -O $@.tmp $(1) && \
+		touch $@.tmp && \
+		mv $@.tmp $@
 checksum = (cd $(TARBALLS) && $(1)sum -c -) < \
 		$(SRC)/$(patsubst .sum-%,%,$@)/$(2)SUMS
 CHECK_SHA256 = $(call checksum,sha512,SHA512)
diff --git a/contrib/src/matroska/rules.mak b/contrib/src/matroska/rules.mak
index 39a13e3..a77c843 100644
--- a/contrib/src/matroska/rules.mak
+++ b/contrib/src/matroska/rules.mak
@@ -7,7 +7,7 @@ MATROSKA_URL := http://dl.matroska.org/downloads/libmatroska/libmatroska-$(MATRO
 PKGS += matroska
 
 $(TARBALLS)/libmatroska-$(MATROSKA_VERSION).tar.bz2:
-	$(DOWNLOAD) $(MATROSKA_URL)
+	$(call download,$(MATROSKA_URL))
 
 .sum-matroska: libmatroska-$(MATROSKA_VERSION).tar.bz2
 
diff --git a/contrib/src/ogg/rules.mak b/contrib/src/ogg/rules.mak
index dce79d4..d9fc7a0 100644
--- a/contrib/src/ogg/rules.mak
+++ b/contrib/src/ogg/rules.mak
@@ -9,7 +9,7 @@ OGG_CVSROOT := :pserver:anoncvs at xiph.org:/usr/local/cvsroot
 NEED_OGG = $(call need_pkg,"ogg >= 1.0")
 
 $(TARBALLS)/libogg-$(OGG_VERSION).tar.xz:
-	$(DOWNLOAD) $(OGG_URL)
+	$(call download,$(OGG_URL))
 
 .sum-ogg: libogg-$(OGG_VERSION).tar.xz
 
diff --git a/contrib/src/shout/rules.mak b/contrib/src/shout/rules.mak
index 2cf74f4..6f591d2 100644
--- a/contrib/src/shout/rules.mak
+++ b/contrib/src/shout/rules.mak
@@ -6,7 +6,7 @@ SHOUT_URL := http://downloads.us.xiph.org/releases/libshout/libshout-$(SHOUT_VER
 PKGS += shout
 
 $(TARBALLS)/libshout-$(SHOUT_VERSION).tar.gz:
-	$(DOWNLOAD) $(SHOUT_URL)
+	$(call download,$(SHOUT_URL))
 
 .sum-shout: libshout-$(SHOUT_VERSION).tar.gz
 
diff --git a/contrib/src/speex/rules.mak b/contrib/src/speex/rules.mak
index eaf790a..34ba953 100644
--- a/contrib/src/speex/rules.mak
+++ b/contrib/src/speex/rules.mak
@@ -6,7 +6,7 @@ SPEEX_URL := http://downloads.us.xiph.org/releases/speex/speex-$(SPEEX_VERSION).
 PKGS += speex
 
 $(TARBALLS)/speex-$(SPEEX_VERSION).tar.gz:
-	$(DOWNLOAD) $(SPEEX_URL)
+	$(call download,$(SPEEX_URL))
 
 .sum-speex: speex-$(SPEEX_VERSION).tar.gz
 
diff --git a/contrib/src/theora/rules.mak b/contrib/src/theora/rules.mak
index 9da427f..c732bbc 100644
--- a/contrib/src/theora/rules.mak
+++ b/contrib/src/theora/rules.mak
@@ -7,7 +7,7 @@ THEORA_URL := http://downloads.xiph.org/releases/theora/libtheora-$(THEORA_VERSI
 PKGS += theora
 
 $(TARBALLS)/libtheora-$(THEORA_VERSION).tar.xz:
-	$(DOWNLOAD) $(THEORA_URL)
+	$(call download,$(THEORA_URL))
 
 .sum-theora: libtheora-$(THEORA_VERSION).tar.xz
 
diff --git a/contrib/src/vorbis/rules.mak b/contrib/src/vorbis/rules.mak
index cd43f66..13bcbc6 100644
--- a/contrib/src/vorbis/rules.mak
+++ b/contrib/src/vorbis/rules.mak
@@ -12,7 +12,7 @@ PKGS += vorbisenc
 endif
 
 $(TARBALLS)/libvorbis-$(VORBIS_VERSION).tar.xz:
-	$(DOWNLOAD) $(VORBIS_URL)
+	$(call download,$(VORBIS_URL))
 
 .sum-vorbis: libvorbis-$(VORBIS_VERSION).tar.xz
 



More information about the vlc-commits mailing list