From patchwork Mon Oct 7 13:15:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas De Schampheleire X-Patchwork-Id: 281126 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 3C7E32C00A9 for ; Tue, 8 Oct 2013 02:00:36 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 33FF68A6CF; Mon, 7 Oct 2013 15:00:35 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xARMygLJrgWa; Mon, 7 Oct 2013 15:00:32 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 2031B8BEB8; Mon, 7 Oct 2013 15:00:15 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 0A04F1CE6F2 for ; Mon, 7 Oct 2013 15:00:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 01FD38BE5C for ; Mon, 7 Oct 2013 15:00:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7CToTztAMPaH for ; Mon, 7 Oct 2013 15:00:10 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wg0-f49.google.com (mail-wg0-f49.google.com [74.125.82.49]) by whitealder.osuosl.org (Postfix) with ESMTPS id BFB478A833 for ; Mon, 7 Oct 2013 15:00:08 +0000 (UTC) Received: by mail-wg0-f49.google.com with SMTP id l18so7198072wgh.4 for ; Mon, 07 Oct 2013 08:00:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:content-transfer-encoding:subject :message-id:in-reply-to:references:user-agent:date:from:to:cc; bh=TvkCPlC0gW9LlI2Axsp4weuUqc8AEEfOwAApJb48sHo=; b=TuEf1MPZC7oheVFBU+BKTJOUAExVYhLH+2uuwi6ZwN0ZfFMaQONmTt8IQ4emIfG8+V iJxkD+L0k9eMBjKlm9E2kbL6jOzfhY3rZf2V8Mx08FFofqg8baKQfwOn8DGnL1ZvaFvg sDz2lwpNIkMnxc1SuLhXZpoPHGJHd5+tVjbPeMJJpAiBkubetBfHyuOjjPyE9KNOcaNC 867x8Yf03ynEbxvawNMxywfQy2L1Cq00UKlf20uZr6/BMlyH2Fil34AV3m0bbwk9oJjc FIrJvayYwq0eZ6WXR5DQ8MNy3Z+CE+zGalgsxc/fCAPpmBJASTULln/GGAgeZ7phtZjp NHyA== X-Received: by 10.194.201.202 with SMTP id kc10mr25000100wjc.1.1381158007389; Mon, 07 Oct 2013 08:00:07 -0700 (PDT) Received: from [127.0.1.1] (alc112.alcatel.be. [195.207.101.112]) by mx.google.com with ESMTPSA id mw9sm10036510wib.0.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 07 Oct 2013 08:00:06 -0700 (PDT) MIME-Version: 1.0 X-Mercurial-Node: fc6f4142c82c8e05e09f945694b5e4c2e052bf1d Message-Id: In-Reply-To: References: User-Agent: Mercurial-patchbomb/2.2.2 Date: Mon, 07 Oct 2013 15:15:12 +0200 From: Thomas De Schampheleire To: buildroot@busybox.net Cc: luca@lucaceresoli.net, thomas.petazzoni@free-electrons.com, jacmet@uclibc.org Subject: [Buildroot] [PATCH 5 of 6 v2] legal info: cleanup utility functions X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net 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 Acked-by: Luca Ceresoli --- 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 @@ -91,20 +91,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)) && \