All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 10/10] infra: introduce top-level, global show-info
Date: Sun,  7 Apr 2019 13:51:25 +0200	[thread overview]
Message-ID: <9e4d027c3a353fadde428fbba702dcc9dac15d75.1554637858.git.yann.morin.1998@free.fr> (raw)
In-Reply-To: <cover.1554637858.git.yann.morin.1998@free.fr>

Now that packages and filesystems can report their recursive info, use
that to dump the whole info as a valid JSOn array.

As it is rather complex to ensure soemthing is run before every rules
(to display the eldin opening '[' so as to have a valid JSON array),
re-enter the Makefile and mangle the output with a sed expression, that:

  - 0,/^/s//[\n/;   inserts a '[' before the first line,
  - $!s/$/,/;       appends a ',' at the end of every lines but the last,
  - $s/$/\n]/       appends a ']' after the last line.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
---
 Makefile | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Makefile b/Makefile
index 60bf7d7d08..13c4390ae4 100644
--- a/Makefile
+++ b/Makefile
@@ -876,6 +876,12 @@ graph-depends-requirements:
 	@dot -? >/dev/null 2>&1 || \
 		{ echo "ERROR: The 'dot' program from Graphviz is needed for graph-depends" >&2; exit 1; }
 
+.PHONY: show-info _show-info-private
+show-info:
+	@$(MAKE) -C $(CONFIG_DIR) _show-info-private |sed -r -e '0,/^/s//[\n/; $$!s/$$/,/; $$s/$$/\n]/'
+_show-info-private: $(patsubst %,%-show-recursive-info,$(PACKAGES) $(TARGETS_ROOTFS))
+	@:
+
 .PHONY: show-dependency-tree
 show-dependency-tree: $(patsubst %,%-show-dependency-tree,$(PACKAGES) $(TARGETS_ROOTFS))
 	@:
-- 
2.14.1

  parent reply	other threads:[~2019-04-07 11:51 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-07 11:51 [Buildroot] [PATCH 00/10] infra: add solution to dump metadata from packages (branch yem/misc) Yann E. MORIN
2019-04-07 11:51 ` [Buildroot] [PATCH 01/10] infra/pkg-download: return just a list of URIs Yann E. MORIN
2019-04-07 12:20   ` Thomas Petazzoni
2019-04-07 12:42     ` Yann E. MORIN
2019-04-07 11:51 ` [Buildroot] [PATCH 02/10] infra/pkg-download: make the URI list a callable macro Yann E. MORIN
2019-04-10  8:33   ` Thomas De Schampheleire
2019-04-07 11:51 ` [Buildroot] [PATCH 03/10] infra/pkg-download: get rid of the FLOCK variable Yann E. MORIN
2019-04-07 11:51 ` [Buildroot] [PATCH 04/10] infra/pkg-download: make the DOWNLOAD macro fully parameterised Yann E. MORIN
2019-04-07 12:46   ` Yann E. MORIN
2019-04-07 11:51 ` [Buildroot] [PATCH 05/10] infra/utils: add helper to generate comma-separated lists Yann E. MORIN
2019-04-10  9:03   ` Thomas De Schampheleire
2019-04-07 11:51 ` [Buildroot] [PATCH 06/10] infra/pkg-generic: introduce foo-show-info Yann E. MORIN
2019-04-10  9:16   ` Thomas De Schampheleire
2019-04-11 20:49     ` Yann E. MORIN
2019-04-11 17:33   ` Thomas Petazzoni
2019-04-13  8:58   ` Arnout Vandecappelle
2019-04-13 17:17     ` Yann E. MORIN
2019-04-13 19:07       ` Arnout Vandecappelle
2019-04-07 11:51 ` [Buildroot] [PATCH 07/10] infra/pkg-generic: introduce foo-show-recursive-info Yann E. MORIN
2019-04-10  9:20   ` Thomas De Schampheleire
2019-04-07 11:51 ` [Buildroot] [PATCH 08/10] infra/fs: introduce rootfs-foo-show-info Yann E. MORIN
2019-04-10  9:19   ` Thomas De Schampheleire
2019-04-07 11:51 ` [Buildroot] [PATCH 09/10] infar/fs: introduce rootfs-foo-show-recursive-info Yann E. MORIN
2019-04-10  9:19   ` Thomas De Schampheleire
2019-04-07 11:51 ` Yann E. MORIN [this message]
2019-04-10  9:28   ` [Buildroot] [PATCH 10/10] infra: introduce top-level, global show-info Thomas De Schampheleire
2019-04-11 21:06     ` Yann E. MORIN
2019-04-13  9:08   ` Arnout Vandecappelle
2019-04-10 12:47 ` [Buildroot] [PATCH 00/10] infra: add solution to dump metadata from packages (branch yem/misc) Thomas De Schampheleire
2019-04-11 17:26 ` Thomas Petazzoni
2019-04-11 21:20   ` Yann E. MORIN
2019-04-13  8:00     ` Arnout Vandecappelle
2019-04-13 17:19       ` Yann E. MORIN

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=9e4d027c3a353fadde428fbba702dcc9dac15d75.1554637858.git.yann.morin.1998@free.fr \
    --to=yann.morin.1998@free.fr \
    --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.