core/pkg-generic: allow packages to declare target-finalize hooks
authorYann E. MORIN <yann.morin.1998@free.fr>
Wed, 22 Jun 2016 19:07:36 +0000 (21:07 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 5 Jul 2016 13:48:48 +0000 (15:48 +0200)
commit624dbec7e1f971519be9a165b09c0b95a8ee282b
tree44f27da762dc116901e8c8b02d1d5a11479ab809
parentaf9bb14f3cc0ec70241b74eec4e317778fdd5307
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>
docs/manual/adding-packages-hooks.txt
package/pkg-generic.mk