mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-09 07:51:59 -09:00
package/pkg-download: symplify calling parameters
The DOWNLOAD macro is always called in package context, so the PKG variable is always set, and thus we do not need to pass the package as a parameter. Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
This commit is contained in:
committed by
Arnout Vandecappelle
parent
5836b79762
commit
d2dd96f0ee
@@ -103,32 +103,31 @@ endif
|
||||
# source from the list returned by DOWNLOAD_URIS.
|
||||
#
|
||||
# Argument 1 is the source location
|
||||
# Argument 2 is the upper-case package name
|
||||
# Argument 3 is a space-separated list of optional arguments
|
||||
# Argument 2 is a space-separated list of optional arguments
|
||||
#
|
||||
################################################################################
|
||||
|
||||
define DOWNLOAD
|
||||
$(Q)mkdir -p $($(2)_DL_DIR)
|
||||
$(Q)mkdir -p $($(PKG)_DL_DIR)
|
||||
$(Q)$(EXTRA_ENV) \
|
||||
$($(2)_DL_ENV) \
|
||||
$($(PKG)_DL_ENV) \
|
||||
TAR="$(TAR)" \
|
||||
BR_NO_CHECK_HASH_FOR="$(if $(BR2_DOWNLOAD_FORCE_CHECK_HASHES),,$(BR_NO_CHECK_HASH_FOR))" \
|
||||
flock $($(2)_DL_DIR)/.lock $(DL_WRAPPER) \
|
||||
-c '$($(2)_DL_VERSION)' \
|
||||
-d '$($(2)_DL_DIR)' \
|
||||
flock $($(PKG)_DL_DIR)/.lock $(DL_WRAPPER) \
|
||||
-c '$($(PKG)_DL_VERSION)' \
|
||||
-d '$($(PKG)_DL_DIR)' \
|
||||
-D '$(DL_DIR)' \
|
||||
-f '$(notdir $(1))' \
|
||||
$(foreach f,$($(2)_HASH_FILES),-H '$(f)') \
|
||||
-n '$($(2)_DL_SUBDIR)-$($(2)_VERSION)' \
|
||||
-N '$($(2)_RAWNAME)' \
|
||||
-o '$($(2)_DL_DIR)/$(notdir $(1))' \
|
||||
$(if $(filter YES,$($(2)_SVN_EXTERNALS)),-r) \
|
||||
$(if $($(2)_GIT_SUBMODULES),-r) \
|
||||
$(if $($(2)_GIT_LFS),-l) \
|
||||
$(foreach uri,$(call DOWNLOAD_URIS,$(1),$(2)),-u $(uri)) \
|
||||
$(3) \
|
||||
$(foreach f,$($(PKG)_HASH_FILES),-H '$(f)') \
|
||||
-n '$($(PKG)_DL_SUBDIR)-$($(PKG)_VERSION)' \
|
||||
-N '$($(PKG)_RAWNAME)' \
|
||||
-o '$($(PKG)_DL_DIR)/$(notdir $(1))' \
|
||||
$(if $(filter YES,$($(PKG)_SVN_EXTERNALS)),-r) \
|
||||
$(if $($(PKG)_GIT_SUBMODULES),-r) \
|
||||
$(if $($(PKG)_GIT_LFS),-l) \
|
||||
$(foreach uri,$(call DOWNLOAD_URIS,$(1),$(PKG)),-u $(uri)) \
|
||||
$(2) \
|
||||
$(QUIET) \
|
||||
-- \
|
||||
$($(2)_DL_OPTS)
|
||||
$($(PKG)_DL_OPTS)
|
||||
endef
|
||||
|
||||
@@ -182,8 +182,8 @@ $(BUILD_DIR)/%/.stamp_downloaded:
|
||||
break ; \
|
||||
fi ; \
|
||||
done
|
||||
$(if $($(PKG)_MAIN_DOWNLOAD),$(call DOWNLOAD,$($(PKG)_MAIN_DOWNLOAD),$(PKG),$(patsubst %,-p '%',$($(PKG)_DOWNLOAD_POST_PROCESS))))
|
||||
$(foreach p,$($(PKG)_ADDITIONAL_DOWNLOADS),$(call DOWNLOAD,$(p),$(PKG))$(sep))
|
||||
$(if $($(PKG)_MAIN_DOWNLOAD),$(call DOWNLOAD,$($(PKG)_MAIN_DOWNLOAD),$(patsubst %,-p '%',$($(PKG)_DOWNLOAD_POST_PROCESS))))
|
||||
$(foreach p,$($(PKG)_ADDITIONAL_DOWNLOADS),$(call DOWNLOAD,$(p))$(sep))
|
||||
$(foreach hook,$($(PKG)_POST_DOWNLOAD_HOOKS),$(call $(hook))$(sep))
|
||||
$(Q)mkdir -p $(@D)
|
||||
@$(call step_end,download)
|
||||
@@ -192,7 +192,7 @@ $(BUILD_DIR)/%/.stamp_downloaded:
|
||||
# Retrieve actual source archive, e.g. for prebuilt external toolchains
|
||||
$(BUILD_DIR)/%/.stamp_actual_downloaded:
|
||||
@$(call step_start,actual-download)
|
||||
$(call DOWNLOAD,$($(PKG)_ACTUAL_SOURCE_SITE)/$($(PKG)_ACTUAL_SOURCE_TARBALL),$(PKG))
|
||||
$(call DOWNLOAD,$($(PKG)_ACTUAL_SOURCE_SITE)/$($(PKG)_ACTUAL_SOURCE_TARBALL))
|
||||
$(Q)mkdir -p $(@D)
|
||||
@$(call step_end,actual-download)
|
||||
$(Q)touch $@
|
||||
|
||||
Reference in New Issue
Block a user