[Buildroot] [PATCH] system: move system.mk recipes inside the "target-finalize" rule

Fabio Porcedda fabio.porcedda at gmail.com
Thu Jun 19 10:06:57 UTC 2014


On Thu, Jun 12, 2014 at 2:54 PM, Arnout Vandecappelle <arnout at mind.be> wrote:
> On 06/12/14 10:23, Thomas Petazzoni wrote:
>> Dear Fabio Porcedda,
>>
>> On Thu, 12 Jun 2014 10:05:41 +0200, Fabio Porcedda wrote:
>>
>>>> I think one of the concern with the hook thing was that the hooks would
>>>> be spread all over the Buildroot tree. To mitigate this concern, maybe
>>>> we could have a naming convention for those hooks that they should all
>>>> start with TARGET_FINALIZE_<something>, like
>>>> TARGET_FINALIZE_PURGE_LOCALES ?
>>>
>>> Ok fine, i like it, maybe using TARGET_FINALIZE_HOOK_PURGE_LOCALES is
>>> too verbose?
>>
>> If anything, the "HOOK" should be at the end. Not sure it's needed
>> though if we have all variables prefixed by TARGET_FINALIZE_<something>.
>>
>> That being said, now that I can think of it, we can anyway always grep
>> all the hooks by grepping for "TARGET_FINALIZE_HOOKS", which will
>> return all files doing:
>>
>> TARGET_FINALIZE_HOOKS += <something>
>>
>> So in the end, the name of make function being registered doesn't
>> matter much, but still for consistency, I think it's good to have a
>> common prefix for all of them.
>
>  Well, the main reason to use the hooks approach is to be able to spread it out
> over different makefiles, and in particular to be able to do package-specific
> target-finalize things. Therefore, the hooks themselves should be named
> <PKGNAME>_FOO_BAR.
>
>  Also, for the hooks that are currently in use, we don't usually include HOOK in
> the name.

Following what we usually done for hooks, i'm going to call it:

PURGE_LOCALES

SYSTEM_GENERIC_SECURETTY
SYSTEM_GENERIC_HOSTNAME
...

BTW: Wouldn't better to change the usual name we use for hooks, maybe
adding "_HOOK" at the end of name?
I've found only four hooks that have "HOOK" in the name.

Best regards
-- 
Fabio Porcedda


More information about the buildroot mailing list