[vlc-commits] contrib: fix curl usage and prefer curl over wget

Rémi Denis-Courmont git at videolan.org
Wed Jul 6 17:54:26 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Jul  6 10:42:11 2011 +0300| [f91afbcc27435bc98f4a80c7312984c64622330c] | committer: Rémi Denis-Courmont

contrib: fix curl usage and prefer curl over wget

curl fits Makefile dependencies better, and supports FTP through HTTP
proxies.

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

 contrib/src/main.mak |   21 ++++++++-------------
 1 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index c1c65e2..66ba274 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -122,17 +122,16 @@ endif
 endif
 SVN ?= $(error subversion client (svn) not found!)
 
-ifndef WGET
-ifeq ($(shell wget --version >/dev/null 2>&1 || echo FAIL),)
-WGET = wget --passive -c
-endif
-endif
-ifndef WGET
 ifeq ($(shell curl --version >/dev/null 2>&1 || echo FAIL),)
-WGET = curl -L -O
-endif
+download = curl -f -L -- "$(1)" > "$@"
+else ifeq ($(shell wget --version >/dev/null 2>&1 || echo FAIL),)
+download = rm -f $@.tmp && \
+	wget --passive -c -p -O $@.tmp $(1) && \
+	touch $@.tmp && \
+	mv $@.tmp $@
+else
+download = $(error Neither curl nor wget found!)
 endif
-WGET ?= $(error Neither wget not curl found!)
 
 #
 # Common helpers
@@ -160,10 +159,6 @@ else
 HOSTCONF += --with-pic
 endif
 
-download = rm -f $@.tmp && \
-		$(WGET) -p -O $@.tmp $(1) && \
-		touch $@.tmp && \
-		mv $@.tmp $@
 download_git = \
 	rm -Rf $(@:.tar.xz=) && \
 	$(GIT) clone $(2:%=--branch %) $(1) $(@:.tar.xz=) && \



More information about the vlc-commits mailing list