Skip to content

Commit

Permalink
package/pkg-generic: host variant inherits target download settings
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Clément Léger <[email protected]>
Signed-off-by: Yann E. MORIN <[email protected]>
  • Loading branch information
yann-morin-1998 committed Mar 18, 2022
1 parent c7520b7 commit efa7712
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions package/pkg-generic.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit efa7712

Please sign in to comment.