From patchwork Mon Dec 1 21:41:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 416580 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 CDE1E140213 for ; Tue, 2 Dec 2014 08:42:03 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 7BF3095BC2; Mon, 1 Dec 2014 21:42: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 MtEW3GWl3d-e; Mon, 1 Dec 2014 21:42:00 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id CB66C95C07; Mon, 1 Dec 2014 21:41:59 +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 AE29C1C1E77 for ; Mon, 1 Dec 2014 21:41:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id AAC8491D95 for ; Mon, 1 Dec 2014 21:41:54 +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 XcSehcqTYd+o for ; Mon, 1 Dec 2014 21:41:54 +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 whitealder.osuosl.org (Postfix) with ESMTP id 4168191CCC for ; Mon, 1 Dec 2014 21:41:54 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 106) id CA967750; Mon, 1 Dec 2014 22:42:01 +0100 (CET) Received: from localhost (AToulouse-657-1-1136-181.w92-156.abo.wanadoo.fr [92.156.162.181]) by mail.free-electrons.com (Postfix) with ESMTPSA id 853FD1EC; Mon, 1 Dec 2014 22:42:01 +0100 (CET) From: Thomas Petazzoni To: buildroot@uclibc.org Date: Mon, 1 Dec 2014 22:41:40 +0100 Message-Id: <1417470100-32657-5-git-send-email-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1417470100-32657-1-git-send-email-thomas.petazzoni@free-electrons.com> References: <1417470100-32657-1-git-send-email-thomas.petazzoni@free-electrons.com> Cc: Thomas Petazzoni Subject: [Buildroot] [PATCHv2 4/4] 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 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Makefile b/Makefile index ad018c8..56b2b93 100644 --- a/Makefile +++ b/Makefile @@ -677,6 +677,16 @@ 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 $(O)/graphs + @cd "$(CONFIG_DIR)"; \ + $(TOPDIR)/support/scripts/graph-size --builddir $(O) \ + --graph $(O)/graphs/graph-size.$(BR_GRAPH_OUT) \ + --file-size-csv $(O)/build/file-size-stats.csv \ + --package-size-csv $(O)/build/package-size-stats.csv + else # ifeq ($(BR2_HAVE_DOT_CONFIG),y) all: menuconfig @@ -889,6 +899,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'