summaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorYann E. MORIN <yann.morin.1998@free.fr>2016-06-22 21:07:36 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-07-05 15:48:48 +0200
commit624dbec7e1f971519be9a165b09c0b95a8ee282b (patch)
tree44f27da762dc116901e8c8b02d1d5a11479ab809 /package
parentaf9bb14f3cc0ec70241b74eec4e317778fdd5307 (diff)
downloadbuildroot-624dbec7e1f971519be9a165b09c0b95a8ee282b.tar.gz
buildroot-624dbec7e1f971519be9a165b09c0b95a8ee282b.zip
core/pkg-generic: allow packages to declare target-finalize hooks
Currently, packages using target finalize hooks must remember that they need to register their hook in TARGET_FINALIZE_HOOKS conditionally (otherwise their hook will be triggered even if the package is disabled). In order to avoid this potential mistake, this commit introduces a per-package target-finalize hook variable, in which packages can register their target-finalize hooks, with the guarantee that they will only be triggered if the package is enabled. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by: Romain Naour <romain.naour@gmail.com> [Thomas: rework commit log.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package')
-rw-r--r--package/pkg-generic.mk2
1 files changed, 2 insertions, 0 deletions
diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 0c9c7ab744..68ead3d1bb 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -572,6 +572,7 @@ $(2)_PRE_INSTALL_IMAGES_HOOKS ?=
$(2)_POST_INSTALL_IMAGES_HOOKS ?=
$(2)_PRE_LEGAL_INFO_HOOKS ?=
$(2)_POST_LEGAL_INFO_HOOKS ?=
+$(2)_TARGET_FINALIZE_HOOKS ?=
# human-friendly targets and target sequencing
$(1): $(1)-install
@@ -882,6 +883,7 @@ endif
ifneq ($$($(2)_USERS),)
PACKAGES_USERS += $$($(2)_USERS)$$(sep)
endif
+TARGET_FINALIZE_HOOKS += $$($(2)_TARGET_FINALIZE_HOOKS)
ifeq ($$($(2)_SITE_METHOD),svn)
DL_TOOLS_DEPENDENCIES += svn
OpenPOWER on IntegriCloud