From patchwork Sun Apr 12 16:37:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 460519 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 268F414027F for ; Mon, 13 Apr 2015 02:38:43 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 7BEDAA1798; Sun, 12 Apr 2015 16:38:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LoWzhPfJ2d3H; Sun, 12 Apr 2015 16:38:35 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 116AFA174C; Sun, 12 Apr 2015 16:38:25 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 8BB131C214E for ; Sun, 12 Apr 2015 16:38:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 87B1A94E72 for ; Sun, 12 Apr 2015 16:38:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id s+l3NIkfVUPI for ; Sun, 12 Apr 2015 16:38:12 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.free-electrons.com (down.free-electrons.com [37.187.137.238]) by hemlock.osuosl.org (Postfix) with ESMTP id 2F5A494E6F for ; Sun, 12 Apr 2015 16:38:12 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 106) id 3C44736A; Sun, 12 Apr 2015 18:38:16 +0200 (CEST) Received: from localhost (AToulouse-657-1-56-186.w82-125.abo.wanadoo.fr [82.125.234.186]) by mail.free-electrons.com (Postfix) with ESMTPSA id 04EDA2C0; Sun, 12 Apr 2015 18:38:15 +0200 (CEST) From: Thomas Petazzoni To: buildroot@uclibc.org Date: Sun, 12 Apr 2015 18:37:50 +0200 Message-Id: <1428856685-4403-7-git-send-email-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1428856685-4403-1-git-send-email-thomas.petazzoni@free-electrons.com> References: <1428856685-4403-1-git-send-email-thomas.petazzoni@free-electrons.com> Cc: Thomas Petazzoni Subject: [Buildroot] [PATCHv2 06/21] Makefile: use -all-legal-info to implement the legal-info target X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This commit changes the implementation of the global 'legal-info' target to use the newly introduced per-package -all-legal-info target. This allows to avoid using the $(TARGET_HOST_DEPS) and $(HOST_DEPS) variables that we are trying to remove. It is worth mentionning that this commit might change the output of 'make legal-info' by making it more correct than it was. With the existing implementations, we could be missing packages if they were host packages, or target packages not properly selected in terms of Config.in dependencies, and with a more than a two-level deep dependency from a target package properly selected at the Config.in level. This is because our previous logic was simply taking all packages in the "TARGETS" (now called "PACKAGES") variable, which are only the target packages explicitly selected in the .config file, and doing a two-level deep recursion in the dependencies. With this commit, we switch legal-info to use proper make-based dependencies, so we no longer have the limitations we used to have. For this reason, the output of 'make legal-info' after this patch may contain *more* entries than before this patch, but it is really because it is now correct. Signed-off-by: Thomas Petazzoni Tested-by: "Yann E. MORIN" Reviewed-by: "Yann E. MORIN" --- Makefile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Makefile b/Makefile index f4deec3..a22d99b 100644 --- a/Makefile +++ b/Makefile @@ -410,9 +410,6 @@ HOST_DEPS = $(sort $(foreach dep,\ $($(dep)))) HOST_SOURCE += $(addsuffix -source,$(sort $(TARGETS_HOST_DEPS) $(HOST_DEPS))) -PACKAGES_LEGAL_INFO := $(patsubst %,%-legal-info,\ - $(PACKAGES) $(TARGETS_HOST_DEPS) $(HOST_DEPS)) - dirs: $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \ $(HOST_DIR) $(BINARIES_DIR) @@ -631,7 +628,7 @@ legal-info-prepare: $(LEGAL_INFO_DIR) @$(call legal-warning,the toolchain has not been saved) @cp $(BR2_CONFIG) $(LEGAL_INFO_DIR)/buildroot.config -legal-info: dirs legal-info-clean legal-info-prepare $(PACKAGES_LEGAL_INFO) \ +legal-info: dirs legal-info-clean legal-info-prepare $(foreach p,$(PACKAGES),$(p)-all-legal-info) \ $(REDIST_SOURCES_DIR_TARGET) $(REDIST_SOURCES_DIR_HOST) @cat support/legal-info/README.header >>$(LEGAL_REPORT) @if [ -r $(LEGAL_WARNINGS) ]; then \