From patchwork Fri Jun 13 17:06:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Porcedda X-Patchwork-Id: 359578 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 07DA41400AA for ; Sat, 14 Jun 2014 03:06:59 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 521E4920A9; Fri, 13 Jun 2014 17:06:59 +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 FSRHzqGdRTUf; Fri, 13 Jun 2014 17:06:58 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id C0B31920A8; Fri, 13 Jun 2014 17:06:58 +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 C7B971BF97D for ; Fri, 13 Jun 2014 17:06:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id C3F51920A5 for ; Fri, 13 Jun 2014 17:06:55 +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 HfXMnufkuAwU for ; Fri, 13 Jun 2014 17:06:54 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f174.google.com (mail-wi0-f174.google.com [209.85.212.174]) by hemlock.osuosl.org (Postfix) with ESMTPS id 7256A920A8 for ; Fri, 13 Jun 2014 17:06:54 +0000 (UTC) Received: by mail-wi0-f174.google.com with SMTP id bs8so1257816wib.13 for ; Fri, 13 Jun 2014 10:06:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=G80tRl4tYl1qHL655WXOaSDdXFqJFqYvim6jIR2qxQQ=; b=Lo2FxBUIEn9XupcA8M3tUhqyUM9YVYggJPzqnp2qYqbNLCeVHIHsOAENjIC3YMHjDk uGgGkbmghaYDbidfCFkC2D9bLdP7PGYmNFItDlXHyhs2m+3ck9F5X7UvtGdrRMLqiUvW Qb7Y4q1BwJ2Evb8DGJKbwHZQpd1Ji7BGg3bALk64+BDeiGXV1HArZi9sEDM0Ju30eQkn gQmWWukomblTCpIoF5FNpExghEJtZcF/lJGrme7DzyPVUiVx5TbkWzlqgr4tKpH1U7dp /VITIfcacitIvu/rvaVy7KEQUHRuw1Qaw5fGHUflu9UDCBskXNpq04zoh0TgWmecKz4o q/aA== X-Received: by 10.194.92.148 with SMTP id cm20mr6051503wjb.57.1402679212922; Fri, 13 Jun 2014 10:06:52 -0700 (PDT) Received: from ld2077.tmt.telital.com ([213.205.6.118]) by mx.google.com with ESMTPSA id 8sm13033753eea.10.2014.06.13.10.06.51 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Jun 2014 10:06:52 -0700 (PDT) From: Fabio Porcedda To: buildroot@uclibc.org Date: Fri, 13 Jun 2014 19:06:48 +0200 Message-Id: <1402679208-8304-2-git-send-email-fabio.porcedda@gmail.com> X-Mailer: git-send-email 2.0.0 In-Reply-To: <1402679208-8304-1-git-send-email-fabio.porcedda@gmail.com> References: <1402679208-8304-1-git-send-email-fabio.porcedda@gmail.com> Cc: Thomas Petazzoni , "Yann E. MORIN" Subject: [Buildroot] [PATCH 2/2] Makefile: test if "dot" exists in graph-build and -graph-depends 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 "dot" command availability was checked only for the "graph-depends" target so move the check to the "graph-prerequisites" target to be able to check the "dot" command availability for all the graph generation targets. Signed-off-by: Fabio Porcedda Cc: Thomas Petazzoni Cc: Yann E. MORIN --- Makefile | 8 ++++++-- package/pkg-generic.mk | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 86acbbf..3e395b5 100644 --- a/Makefile +++ b/Makefile @@ -658,7 +658,11 @@ legal-info: dirs legal-info-clean legal-info-prepare $(TARGETS_LEGAL_INFO) \ show-targets: @echo $(HOST_DEPS) $(TARGETS_HOST_DEPS) $(TARGETS) $(TARGETS_ROOTFS) -graph-build: $(O)/build/build-time.log +graph-prerequisites: + @dot -? >/dev/null 2>&1 || \ + (echo "ERROR: The 'dot' program from Graphviz is needed for graph-depends" >&2; exit 1) + +graph-build: $(O)/build/build-time.log graph-prerequisites @install -d $(O)/graphs $(foreach o,name build duration,./support/scripts/graph-build-time \ --type=histogram --order=$(o) --input=$(<) \ @@ -669,7 +673,7 @@ graph-build: $(O)/build/build-time.log --output=$(O)/graphs/build.pie-$(t).$(BR_GRAPH_OUT) \ $(if $(BR2_GRAPH_ALT),--alternate-colors)$(sep)) -graph-depends: +graph-depends: graph-prerequisites @dot -? >/dev/null 2>&1 || \ (echo "ERROR: The 'dot' program from Graphviz is needed for graph-depends" >&2; exit 1) @$(INSTALL) -d $(O)/graphs diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index ccd7f3b..752392d 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -531,7 +531,7 @@ endif $(1)-show-depends: @echo $$($(2)_FINAL_DEPENDENCIES) -$(1)-graph-depends: +$(1)-graph-depends: graph-prerequisites @$(INSTALL) -d $(O)/graphs @cd "$(CONFIG_DIR)"; \ $(TOPDIR)/support/scripts/graph-depends -p $(1) $(BR2_GRAPH_DEPS_OPTS) \