From: Thomas De Schampheleire <patrickdepinguin@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 5 of 6 v3] legal info: cleanup utility functions
Date: Tue, 12 Nov 2013 09:48:00 +0100 [thread overview]
Message-ID: <b5883388fc28c12013ea.1384246080@argentina> (raw)
In-Reply-To: <patchbomb.1384246075@argentina>
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.
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
---
v3: no changes
v2:
- add whitespace between functions
- replace 'type' with {HOST|TARGET} (comment Luca)
package/pkg-utils.mk | 25 +++++++++++++++++++------
1 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
--- a/package/pkg-utils.mk
+++ b/package/pkg-utils.mk
@@ -99,20 +99,33 @@ 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, {HOST|TARGET}
+ echo '"$(1)","$(2)","$(3)","$(4)","$(5)"' >>$(LEGAL_MANIFEST_CSV_$(6))
+endef
+
+define legal-license-header # pkg, license-file, {HOST|TARGET}
echo -e "$(LEGAL_INFO_SEPARATOR)\n\t$(1):" \
"$(2)\n$(LEGAL_INFO_SEPARATOR)\n\n" >>$(LEGAL_LICENSES_TXT_$(3))
endef
-define legal-license-nofiles
+
+define legal-license-nofiles # pkg, {HOST|TARGET}
$(call legal-license-header,$(1),unknown license file(s),$(2))
endef
-define legal-license-file # pkg, filename, file-fullpath, type
+
+define legal-license-file # pkg, filename, file-fullpath, {HOST|TARGET}
$(call legal-license-header,$(1),$(2) file,$(4)) && \
cat $(3) >>$(LEGAL_LICENSES_TXT_$(4)) && \
echo >>$(LEGAL_LICENSES_TXT_$(4)) && \
next prev parent reply other threads:[~2013-11-12 8:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-12 8:47 [Buildroot] [PATCH 0 of 6 v3] legal info: split host and package output Thomas De Schampheleire
2013-11-12 8:47 ` [Buildroot] [PATCH 1 of 6 v3] legal info: fix saving of host package licenses Thomas De Schampheleire
2013-11-12 11:23 ` Luca Ceresoli
2013-11-12 22:21 ` Peter Korsgaard
2013-11-12 8:47 ` [Buildroot] [PATCH 2 of 6 v3] legal info: split manifest for host and target Thomas De Schampheleire
2013-11-17 8:17 ` Peter Korsgaard
2013-11-12 8:47 ` [Buildroot] [PATCH 3 of 6 v3] legal info: split license texts " Thomas De Schampheleire
2013-11-12 8:47 ` [Buildroot] [PATCH 4 of 6 v3] legal info: split sources " Thomas De Schampheleire
2013-11-12 8:48 ` Thomas De Schampheleire [this message]
2013-11-12 8:48 ` [Buildroot] [PATCH 6 of 6 v3] legal info: update documentation with split target/host output Thomas De Schampheleire
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b5883388fc28c12013ea.1384246080@argentina \
--to=patrickdepinguin@gmail.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox