$(BUILD_DIR)/%/.stamp_downloaded:
$(foreach hook,$($(PKG)_PRE_DOWNLOAD_HOOKS),$(call $(hook))$(sep))
# Only show the download message if it isn't already downloaded
- $(Q)for p in $($(PKG)_SOURCE) $($(PKG)_PATCH) $($(PKG)_EXTRA_DOWNLOADS) ; do \
+ $(Q)for p in $($(PKG)_ALL_DOWNLOADS); do \
if test ! -e $(DL_DIR)/`basename $$p` ; then \
$(call MESSAGE,"Downloading") ; \
break ; \
fi ; \
done
- $(if $($(PKG)_SOURCE),$(call DOWNLOAD,$($(PKG)_SITE:/=)/$($(PKG)_SOURCE)))
- $(foreach p,$($(PKG)_EXTRA_DOWNLOADS),\
- $(if $(findstring ://,$(p)),\
- $(call DOWNLOAD,$(p)),\
- $(call DOWNLOAD,$($(PKG)_SITE:/=)/$(p))\
- )\
- $(sep))
- $(foreach p,$($(PKG)_PATCH),\
- $(if $(findstring ://,$(p)),\
- $(call DOWNLOAD,$(p)),\
- $(call DOWNLOAD,$($(PKG)_SITE:/=)/$(p))\
- )\
- $(sep))
+ $(foreach p,$($(PKG)_ALL_DOWNLOADS),$(call DOWNLOAD,$(p))$(sep))
$(foreach hook,$($(PKG)_POST_DOWNLOAD_HOOKS),$(call $(hook))$(sep))
$(Q)mkdir -p $(@D)
$(Q)touch $@
endif
endif
+$(2)_ALL_DOWNLOADS = \
+ $$(foreach p,$$($(2)_SOURCE) $$($(2)_PATCH) $$($(2)_EXTRA_DOWNLOADS),\
+ $$(if $$(findstring ://,$$(p)),$$(p),\
+ $$($(2)_SITE:/=)/$$(p)))
+
ifndef $(2)_SITE
ifdef $(3)_SITE
$(2)_SITE = $$($(3)_SITE)
$(1)-source: $$($(2)_TARGET_SOURCE)
$(1)-source-check:
- $$(foreach p,$$($(2)_SOURCE) $$($(2)_EXTRA_DOWNLOADS) $$($(2)_PATCH),\
- $$(if $$(findstring ://,$$(p)),\
- $$(call SOURCE_CHECK,$$(p)),\
- $$(call SOURCE_CHECK,$$($(2)_SITE:/=)/$$(p)))$$(sep))
+ $$(foreach p,$$($(2)_ALL_DOWNLOADS),$$(call SOURCE_CHECK,$$(p))$$(sep))
$(1)-external-deps:
@for p in $$($(2)_SOURCE) $$($(2)_PATCH) $$($(2)_EXTRA_DOWNLOADS) ; do \