From patchwork Mon Apr 7 09:56:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Porcedda X-Patchwork-Id: 337438 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 441631400E1 for ; Mon, 7 Apr 2014 19:57:18 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 2256230B4C; Mon, 7 Apr 2014 09:57:17 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hXhW+ItPiuF3; Mon, 7 Apr 2014 09:57:11 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 752C330ADA; Mon, 7 Apr 2014 09:57:03 +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 954521BF9E7 for ; Mon, 7 Apr 2014 09:57:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 9311587BA3 for ; Mon, 7 Apr 2014 09:57:00 +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 HBPDEKTsQg+K for ; Mon, 7 Apr 2014 09:57:00 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pd0-f171.google.com (mail-pd0-f171.google.com [209.85.192.171]) by hemlock.osuosl.org (Postfix) with ESMTPS id 27F4E87BF3 for ; Mon, 7 Apr 2014 09:57:00 +0000 (UTC) Received: by mail-pd0-f171.google.com with SMTP id r10so6322663pdi.2 for ; Mon, 07 Apr 2014 02:56:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:in-reply-to:references; bh=Lex+pJOj+41aFNjZSZT+sfoagNa3y6Qhk2EzLU2M5xo=; b=CEi2nZbtyD/LIbts1SU6pYqbE/3qwEXxUjjSofl6jttgXvmGWJ5wG8N7RVhiFdHHAd yCw0ElWd3yqrvDyq6aUlXdbEoFTiIxC8fgHVBN2eEsQ0x9gqSW0NwR9hHMu/xi8+cUBr iXD20Qo1pYbhR/Uay/Yn0pRA5ZPp0PJTwhvwMeXMkEZo7jgmsnRQC5dKiKdjjMeVxR43 4sumFz7Ha6mo29OX4uL5Wptd3Gua8+lNq2BhZz4gKs2E6i2lWxDYNrriBlI9qXJ5YzsD NWUrc+LLjQtcSxzWN+Nhmk0/ZGJdZK1aHlHQyeyU9sLEU4jh+qouPa+SLPj7MvcOXYwV u81w== X-Received: by 10.66.121.131 with SMTP id lk3mr29796773pab.61.1396864619907; Mon, 07 Apr 2014 02:56:59 -0700 (PDT) Received: from ld2077.tmt.telital.com ([213.205.6.118]) by mx.google.com with ESMTPSA id bc4sm35673499pbb.2.2014.04.07.02.56.58 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 07 Apr 2014 02:56:59 -0700 (PDT) From: Fabio Porcedda To: buildroot@uclibc.org Date: Mon, 7 Apr 2014 11:56:49 +0200 Message-Id: <1396864610-8426-4-git-send-email-fabio.porcedda@gmail.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1396864610-8426-1-git-send-email-fabio.porcedda@gmail.com> References: <1396864610-8426-1-git-send-email-fabio.porcedda@gmail.com> Subject: [Buildroot] [PATCH v4 3/4] Makefile: let show-targets prints also the dependencies 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: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Because the show-targets target print the targets that will be build, print also the dependencies. Also refactor source and legal-info targets in order to cleanup the code by creating a new variable TARGETS_ALL that contains all the targets the will be built. Signed-off-by: Fabio Porcedda --- Makefile | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index e0831b6..f063bef 100644 --- a/Makefile +++ b/Makefile @@ -409,9 +409,6 @@ endif include fs/common.mk -TARGETS_SOURCE := $(patsubst %,%-source,$(TARGETS)) -TARGETS_DIRCLEAN := $(patsubst %,%-dirclean,$(TARGETS)) - # host-* dependencies have to be handled specially, as those aren't # visible in Kconfig and hence not added to a variable like TARGETS. # instead, find all the host-* targets listed in each _DEPENDENCIES @@ -429,10 +426,12 @@ TARGETS_HOST_DEPS = $(sort $(filter host-%,$(foreach dep,\ HOST_DEPS = $(sort $(foreach dep,\ $(addsuffix _DEPENDENCIES,$(call UPPERCASE,$(TARGETS_HOST_DEPS))),\ $($(dep)))) -HOST_SOURCE += $(addsuffix -source,$(sort $(TARGETS_HOST_DEPS) $(HOST_DEPS))) -TARGETS_LEGAL_INFO := $(patsubst %,%-legal-info,\ - $(TARGETS) $(TARGETS_HOST_DEPS) $(HOST_DEPS)))) +TARGETS_ALL := $(sort $(TARGETS) $(TARGETS_HOST_DEPS)) \ + $(HOST_DEPS) $(TARGETS_ROOTFS) +TARGETS_ALL_SOURCES := $(addsuffix -source,$(TARGETS_ALL)) +TARGETS_ALL_LEGAL_INFO := $(addsuffix -legal-info,$(TARGETS_ALL)) +TARGETS_ALL_DIRCLEAN := $(addsuffix -dirclean,$(TARGETS_ALL)) dirs: $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \ $(HOST_DIR) $(BINARIES_DIR) @@ -451,8 +450,8 @@ world: target-post-image .PHONY: all world toolchain dirs clean distclean source outputmakefile \ legal-info legal-info-prepare legal-info-clean printvars \ target-finalize target-post-image \ - $(TARGETS) $(TARGETS_ROOTFS) \ - $(TARGETS_DIRCLEAN) $(TARGETS_SOURCE) $(TARGETS_LEGAL_INFO) \ + $(TARGETS_ALL) $(TARGETS_ALL_SOURCE) \ + $(TARGETS_ALL_LEGAL_INFO) $(TARGETS_ALL_DIRCLEAN) \ $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \ $(HOST_DIR) $(BINARIES_DIR) @@ -626,7 +625,7 @@ target-post-image: $(TARGETS_ROOTFS) target-finalize toolchain-eclipse-register: ./support/scripts/eclipse-register-toolchain `readlink -f $(O)` $(notdir $(TARGET_CROSS)) $(BR2_ARCH) -source: $(TARGETS_SOURCE) $(HOST_SOURCE) +source: $(TARGETS_ALL_SOURCE) external-deps: @$(MAKE1) -Bs DL_MODE=SHOW_EXTERNAL_DEPS $(EXTRAMAKEARGS) source | sort -u @@ -644,7 +643,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 $(TARGETS_LEGAL_INFO) \ +legal-info: dirs legal-info-clean legal-info-prepare $(TARGETS_ALL_LEGAL_INFO) \ $(REDIST_SOURCES_DIR_TARGET) $(REDIST_SOURCES_DIR_HOST) @cat support/legal-info/README.header >>$(LEGAL_REPORT) @if [ -r $(LEGAL_WARNINGS) ]; then \ @@ -655,7 +654,7 @@ legal-info: dirs legal-info-clean legal-info-prepare $(TARGETS_LEGAL_INFO) \ @rm -f $(LEGAL_WARNINGS) show-targets: - @echo $(TARGETS) $(TARGETS_ROOTFS) + @echo $(TARGETS_ALL) graph-build: $(O)/build/build-time.log @install -d $(O)/graphs