From efa7712b092950c92f994e2ee30c120a64e5451b Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Fri, 18 Mar 2022 14:24:20 +0100 Subject: [PATCH] package/pkg-generic: host variant inherits target download settings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It seems reasonable to expect that the download of the host and target variants should usually be exactly the same and thus reuse the target package values for the host package. This commits add support to inherit host _DL_SUBDIR, _DOWNLOAD_DEPENDENCIES, _DL_ENV and _DOwNLOAD_POST_PROCESS variables from target ones. These variables can still be overriden if necessary for the host package. Signed-off-by: Yann E. MORIN Signed-off-by: Clément Léger Signed-off-by: Yann E. MORIN --- package/pkg-generic.mk | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index b3a7e1d60e..79fcf603d3 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -540,6 +540,30 @@ ifndef $(2)_SUBDIR endif endif +ifndef $(2)_DL_SUBDIR + ifdef $(3)_DL_SUBDIR + $(2)_DL_SUBDIR = $$($(3)_DL_SUBDIR) + endif +endif + +ifndef $(2)_DOWNLOAD_DEPENDENCIES + ifdef $(3)_DOWNLOAD_DEPENDENCIES + $(2)_DOWNLOAD_DEPENDENCIES = $$(filter-out $(1),$$($(3)_DOWNLOAD_DEPENDENCIES)) + endif +endif + +ifndef $(2)_DL_ENV + ifdef $(3)_DL_ENV + $(2)_DL_ENV = $$($(3)_DL_ENV) + endif +endif + +ifndef $(2)_DOWNLOAD_POST_PROCESS + ifdef $(3)_DOWNLOAD_POST_PROCESS + $(2)_DOWNLOAD_POST_PROCESS = $$($(3)_DOWNLOAD_POST_PROCESS) + endif +endif + ifndef $(2)_STRIP_COMPONENTS ifdef $(3)_STRIP_COMPONENTS $(2)_STRIP_COMPONENTS = $$($(3)_STRIP_COMPONENTS)