[Buildroot] [PATCH 5 of 5] legal info: cleanup utility functions

Luca Ceresoli luca at lucaceresoli.net
Sat Oct 5 21:19:31 UTC 2013


Hi Thomas,

Thomas De Schampheleire wrote:
> The legal-info utility functions where defined using two ways
> util-foo = command-foo
> and
> define util-bar # parameter description
> 	command-bar
> endef
>
> This commit changes these functions to use the second form for clarity and
> additionally adds parameter descriptions on all functions.

Yeah, never liked what I wrote here...

But, in order to make the code een more readable, I suggest you to add
an empty line between definitions, just like the "define KCONFIG_*" above
in the same file.

Apart from this, and from a little note below,
Acked-by: Luca Ceresoli <luca at lucaceresoli.net>

>
> Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire at gmail.com>
>
> ---
>   package/pkg-utils.mk |  16 +++++++++++-----
>   1 files changed, 11 insertions(+), 5 deletions(-)
>
> diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
> --- a/package/pkg-utils.mk
> +++ b/package/pkg-utils.mk
> @@ -91,17 +91,23 @@ endef
>   # legal-info helper functions
>   #
>   LEGAL_INFO_SEPARATOR="::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::"
> -legal-warning=echo "WARNING: $(1)" >>$(LEGAL_WARNINGS)
> -legal-warning-pkg=echo "WARNING: $(1): $(2)" >>$(LEGAL_WARNINGS)
> +define legal-warning # text
> +	echo "WARNING: $(1)" >>$(LEGAL_WARNINGS)
> +endef
> +define legal-warning-pkg # pkg, text
> +	echo "WARNING: $(1): $(2)" >>$(LEGAL_WARNINGS)
> +endef
>   define legal-warning-pkg-savednothing # pkg, {local|override}
>   	$(call legal-warning-pkg,$(1),sources and license files not saved ($(2) packages not handled))
>   endef
> -legal-manifest=echo '"$(1)","$(2)","$(3)","$(4)","$(5)"' >>$(LEGAL_MANIFEST_CSV_$(6))
> -define legal-license-header
> +define legal-manifest # pkg, version, license, license-files, source, type

"type" is too generic to convey a meaning here. How about "{host|target}"?

-- 
Luca



More information about the buildroot mailing list