From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCHv3 4/5] Makefile: implement a size-stats target
Date: Mon, 06 Apr 2015 16:09:23 +0200 [thread overview]
Message-ID: <55229393.5040808@mind.be> (raw)
In-Reply-To: <1423171200-24583-5-git-send-email-thomas.petazzoni@free-electrons.com>
On 05/02/15 22:19, Thomas Petazzoni wrote:
> 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 <thomas.petazzoni@free-electrons.com>
> ---
> 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; }
BR2_COLLECT_FILE_SIZE_STATS=y
Also the line is too long. And perhaps instead of "rebuild" it should say "do a
clean build", otherwise stupid people will just do another make with the option
enabled but nothing will actually be done.
> + @$(INSTALL) -d $(GRAPHS_DIR)
graph-depends is the only one that uses install -d, all the others use mkdir
-p. So let's stick to that.
> + @cd "$(CONFIG_DIR)"; \
Why is this needed? In fact, it's wrong, because TARGET_SKELETON will be
relative to TOPDIR if it's given as a relative path. All the other paths are
absolute paths, so there's no reason to cd AFAICS.
Also, I'd prefer $(Q) instead of @.
Regards,
Arnout
> + $(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'
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
next prev parent reply other threads:[~2015-04-06 14:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-05 21:19 [Buildroot] [PATCHv3 0/5] Graph about installed size per package Thomas Petazzoni
2015-02-05 21:19 ` [Buildroot] [PATCHv3 1/5] Makefile: remove the graphs/ dir on 'make clean' Thomas Petazzoni
2015-02-15 16:08 ` Yann E. MORIN
2015-04-03 12:21 ` Thomas Petazzoni
2015-02-05 21:19 ` [Buildroot] [PATCHv3 2/5] pkg-generic: add step_pkg_size global instrumentation hook Thomas Petazzoni
2015-02-15 16:59 ` Yann E. MORIN
2015-02-05 21:19 ` [Buildroot] [PATCHv3 3/5] support/scripts: add size-stats script Thomas Petazzoni
2015-04-06 14:02 ` Arnout Vandecappelle
2015-02-05 21:19 ` [Buildroot] [PATCHv3 4/5] Makefile: implement a size-stats target Thomas Petazzoni
2015-04-06 14:09 ` Arnout Vandecappelle [this message]
2015-02-05 21:37 ` [Buildroot] [PATCHv3 0/5] Graph about installed size per package Thomas Petazzoni
2015-02-07 14:37 ` Romain Naour
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55229393.5040808@mind.be \
--to=arnout@mind.be \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.