From patchwork Thu Feb 5 21:19:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 436955 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 7C293140281 for ; Fri, 6 Feb 2015 08:20:19 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 48A1094C45; Thu, 5 Feb 2015 21:20:14 +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 X18h8lb3AUHg; Thu, 5 Feb 2015 21:20:13 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 5AD66939ED; Thu, 5 Feb 2015 21:20:13 +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 9CEE21C2369 for ; Thu, 5 Feb 2015 21:20:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 9A3309391A for ; Thu, 5 Feb 2015 21:20:06 +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 aYQKZFCkMA9l for ; Thu, 5 Feb 2015 21:20:05 +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 BCC6293908 for ; Thu, 5 Feb 2015 21:20:05 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 106) id 26BFC3D9; Thu, 5 Feb 2015 22:20:06 +0100 (CET) Received: from localhost (AToulouse-657-1-1124-86.w92-156.abo.wanadoo.fr [92.156.38.86]) by mail.free-electrons.com (Postfix) with ESMTPSA id E4A53300; Thu, 5 Feb 2015 22:20:05 +0100 (CET) From: Thomas Petazzoni To: buildroot@uclibc.org Date: Thu, 5 Feb 2015 22:19:59 +0100 Message-Id: <1423171200-24583-5-git-send-email-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1423171200-24583-1-git-send-email-thomas.petazzoni@free-electrons.com> References: <1423171200-24583-1-git-send-email-thomas.petazzoni@free-electrons.com> Cc: Thomas Petazzoni Subject: [Buildroot] [PATCHv3 4/5] Makefile: implement a size-stats 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 implements a size-stats target that calls the script of the same name to generate the graph and CSV files related to package and file sizes. Signed-off-by: Thomas Petazzoni --- Makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Makefile b/Makefile index 6d4ae38..faa2e38 100644 --- a/Makefile +++ b/Makefile @@ -680,6 +680,17 @@ graph-depends: graph-depends-requirements |tee $(BASE_DIR)/graphs/$(@).dot \ |dot $(BR2_GRAPH_DOT_OPTS) -T$(BR_GRAPH_OUT) -o $(BASE_DIR)/graphs/$(@).$(BR_GRAPH_OUT) +size-stats: + @[ -f $(O)/build/packages-file-list.txt ] || \ + { echo "ERROR: No package size information available, please rebuild with BR2_COLLECT_FILE_SIZE_STATS" ; exit 1; } + @$(INSTALL) -d $(GRAPHS_DIR) + @cd "$(CONFIG_DIR)"; \ + $(TOPDIR)/support/scripts/size-stats --builddir $(BASE_DIR) \ + --graph $(BASE_DIR)/graphs/graph-size.$(BR_GRAPH_OUT) \ + --file-size-csv $(BASE_DIR)/build/file-size-stats.csv \ + --package-size-csv $(BASE_DIR)/build/package-size-stats.csv \ + --skeleton-path $(TARGET_SKELETON) + else # ifeq ($(BR2_HAVE_DOT_CONFIG),y) all: menuconfig @@ -896,6 +907,7 @@ endif @echo ' manual-epub - build manual in ePub' @echo ' graph-build - generate graphs of the build times' @echo ' graph-depends - generate graph of the dependency tree' + @echo ' size-stats - generate stats of the filesystem size' @echo @echo 'Miscellaneous:' @echo ' source - download all sources needed for offline-build'