$(BUILD_DIR)/%/.stamp_downloaded:
ifeq ($(DL_MODE),DOWNLOAD)
# Only show the download message if it isn't already downloaded
- $(Q)(test -e $(DL_DIR)/$($(PKG)_SOURCE) && \
- (test -z $($(PKG)_PATCH) || test -e $(DL_DIR)$($(PKG)_PATCH))) || \
- $(call MESSAGE,"Downloading")
+ $(Q)if test ! -e $(DL_DIR)/$($(PKG)_SOURCE); then \
+ $(call MESSAGE,"Downloading") ; \
+ else \
+ for p in $($(PKG)_PATCH) ; do \
+ if test ! -e $(DL_DIR)/$$p ; then \
+ $(call MESSAGE,"Downloading") ; \
+ break ; \
+ fi ; \
+ done ; \
+ fi
endif
$(if $($(PKG)_SOURCE),$(call DOWNLOAD,$($(PKG)_SITE)/$($(PKG)_SOURCE)))
- $(if $($(PKG)_PATCH),$(call DOWNLOAD,$($(PKG)_SITE)/$($(PKG)_PATCH)))
+ $(foreach p,$($(PKG)_PATCH),$(call DOWNLOAD,$($(PKG)_SITE)/$(p))$(sep))
$(foreach hook,$($(PKG)_POST_DOWNLOAD_HOOKS),$(call $(hook))$(sep))
ifeq ($(DL_MODE),DOWNLOAD)
$(Q)mkdir -p $(@D)
$(BUILD_DIR)/%/.stamp_patched:
@$(call MESSAGE,"Patching $($(PKG)_DIR_PREFIX)/$(RAWNAME)")
$(foreach hook,$($(PKG)_PRE_PATCH_HOOKS),$(call $(hook))$(sep))
- $(if $($(PKG)_PATCH),support/scripts/apply-patches.sh $(@D) $(DL_DIR) $($(PKG)_PATCH))
+ $(foreach p,$($(PKG)_PATCH),support/scripts/apply-patches.sh $(@D) $(DL_DIR) $(p)$(sep))
$(Q)( \
if test -d $($(PKG)_DIR_PREFIX)/$(RAWNAME); then \
if test "$(wildcard $($(PKG)_DIR_PREFIX)/$(RAWNAME)/$(NAMEVER)*.patch*)"; then \