[Buildroot] [PATCH 2/4] pkg-infra: introduce pre/post-step hooks

Thomas De Schampheleire patrickdepinguin at gmail.com
Sun Oct 27 21:40:09 UTC 2013


"Yann E. MORIN" <yann.morin.1998 at free.fr> wrote:
>From: "Yann E. MORIN" <yann.morin.1998 at free.fr>
>
>This hooks will let us instrument the build process in many ways:
>  - log current step to see what broke
>  - time each step to see what is worth optimising
>  - sanity-check installed files (rpath, overwritten files...)
>  - call user-provided script
>  - ...
>
>The steps are coarse-grain, and all have a 'start' and a 'end' hooks.
>Here is the list of available steps (8 total):
>  - extract
>  - patch
>  - configure
>  - build
>  - install-host
>  - install-staging
>  - install-image
>  - install-target
>
>The download, clean and uninstall steps are not instrumented on purpose.
>
>Signed-off-by: "Yann E. MORIN" <yann.morin.1998 at free.fr>
>---
> package/pkg-generic.mk | 39 +++++++++++++++++++++++++++++++++++++++
> 1 file changed, 39 insertions(+)
>
>diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
>index 4bba4b5..799555c 100644
>--- a/package/pkg-generic.mk
>+++ b/package/pkg-generic.mk
>@@ -21,6 +21,29 @@
> ################################################################################
> 
> ################################################################################
>+# Helper functions to catch start/end of each steps

each step

>+################################################################################
>+
>+# Those two functions are called by each steps below.

each step

>+# They are responsible for calling all hooks defined in $(STEP_HOOKS)

I personally find the name STEP_HOOKS pretty vague, if you don't know the context you have no clue what it could be. The other hooks POST_EXTRACT etc are clear from their name.
Maybe, GLOBAL_INSTRUMENTATION_HOOKS?

Best regards,
Thomas



More information about the buildroot mailing list