diff options
author | Tony Theodore <tonyt@logyst.com> | 2017-01-21 05:49:18 (GMT) |
---|---|---|
committer | Tony Theodore <tonyt@logyst.com> | 2017-01-21 05:49:18 (GMT) |
commit | 48e792b9e7a681c72bf54a4385638af79cf5b2d6 (patch) | |
tree | b85be22df475492181fe5671cd1f9560e1f6a4c6 | |
parent | 0420370efd0e17c7ae9f5845a4ae478797e8a217 (diff) | |
download | mxe-48e792b9e7a681c72bf54a4385638af79cf5b2d6.zip mxe-48e792b9e7a681c72bf54a4385638af79cf5b2d6.tar.gz mxe-48e792b9e7a681c72bf54a4385638af79cf5b2d6.tar.bz2 |
Makefile: simplify setting default user agent
-rw-r--r-- | Makefile | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -34,8 +34,8 @@ PATCH := $(shell gpatch --help >/dev/null 2>&1 && echo g)patch SED := $(shell gsed --help >/dev/null 2>&1 && echo g)sed SORT := $(shell gsort --help >/dev/null 2>&1 && echo g)sort DEFAULT_UA := $(shell wget --version | $(SED) -n 's,GNU \(Wget\) \([0-9.]*\).*,\1/\2,p') -WGET0 := wget --no-check-certificate -WGET := $(WGET0) --user-agent='$(DEFAULT_UA)' +WGET = wget --no-check-certificate \ + --user-agent='$(or $($(1)_UA),$(DEFAULT_UA))' REQUIREMENTS := autoconf automake autopoint bash bison bzip2 flex \ $(BUILD_CC) $(BUILD_CXX) gperf intltoolize $(LIBTOOL) \ @@ -233,10 +233,10 @@ DOWNLOAD_PKG_ARCHIVE = \ true\ $(else),\ mkdir -p '$(PKG_DIR)' && ( \ - $(WGET0) --user-agent='$(if $($(1)_UA),$($(1)_UA),$(DEFAULT_UA))' -T 30 -t 3 -O- '$($(1)_URL)' \ + $(WGET) -T 30 -t 3 -O- '$($(1)_URL)' \ $(if $($(1)_URL_2), \ || (echo "MXE Warning! Downloading $(1) from second URL." >&2 && \ - $(WGET0) --user-agent='$(if $($(1)_UA),$($(1)_UA),$(DEFAULT_UA))' -T 30 -t 3 -O- '$($(1)_URL_2)')) \ + $(WGET) -T 30 -t 3 -O- '$($(1)_URL_2)')) \ $(if $(MXE_NO_BACKUP_DL),, \ || $(BACKUP_DOWNLOAD)) \ ) \ |