summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris Nagaev <bnagaev@gmail.com>2016-07-04 07:13:08 (GMT)
committerGitHub <noreply@github.com>2016-07-04 07:13:08 (GMT)
commit2e12efbfea92f3e72253fdfbeab5148a103fa54f (patch)
tree085764016c4a99dd78eaf4bb45939d506177e1d0
parentf82fe5859a567fe5ce6457a96a62092d8f3573e3 (diff)
parent85de732ad49a3b4827d02b8c46c98a59f41ef6c6 (diff)
downloadmxe-2e12efbfea92f3e72253fdfbeab5148a103fa54f.zip
mxe-2e12efbfea92f3e72253fdfbeab5148a103fa54f.tar.gz
mxe-2e12efbfea92f3e72253fdfbeab5148a103fa54f.tar.bz2
Merge pull request #1416 from tonytheodore/download-file
fix multiple downloads of same file
-rw-r--r--Makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index cd45f8c..17f844e 100644
--- a/Makefile
+++ b/Makefile
@@ -426,7 +426,12 @@ define PKG_RULE
download-$(1): $(addprefix download-,$($(1)_DEPS)) download-only-$(1)
.PHONY: download-only-$(1)
-download-only-$(1):
+# Packages can share a source archive to build different sets of features
+# or dependencies (see bfd/binutils openscenegraph/openthreads qwt/qwt_qt4).
+# Use a double-colon rule to allow multiple definitions:
+# https://www.gnu.org/software/make/manual/html_node/Double_002dColon.html
+download-only-$(1): download-only-$($(1)_FILE)
+download-only-$($(1)_FILE)::
$(and $($(1)_URL),
@[ -d '$(LOG_DIR)/$(TIMESTAMP)' ] || mkdir -p '$(LOG_DIR)/$(TIMESTAMP)'
@if ! $(call CHECK_PKG_ARCHIVE,$(1)); then \