summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/manual/adding-packages-hooks.txt7
-rw-r--r--package/pkg-generic.mk2
2 files changed, 9 insertions, 0 deletions
diff --git a/docs/manual/adding-packages-hooks.txt b/docs/manual/adding-packages-hooks.txt
index 5b5bf6a80a..d25092ac25 100644
--- a/docs/manual/adding-packages-hooks.txt
+++ b/docs/manual/adding-packages-hooks.txt
@@ -77,3 +77,10 @@ others, use the following variables:
* +$(SRCDIR)+: the path to the overridden source directory
* +$(@D)+: the path to the build directory
+
+==== Target-finalize hook
+
+Packages may also register hooks in +LIBFOO_TARGET_FINALIZE_HOOKS+.
+These hooks are run after all packages are built, but before the
+filesystem images are generated. They are seldom used, and your
+package probably do not need them.
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