[Buildroot] [PATCH 09/12 v2] core: introduce new global show-info

Yann E. MORIN yann.morin.1998 at free.fr
Mon Apr 15 18:51:50 UTC 2019


Arnout, All,

On 2019-04-15 19:51 +0200, Arnout Vandecappelle spake thusly:
> On 15/04/2019 19:34, Yann E. MORIN wrote:
> [snip]
> >>> +	"$($(1)_NAME)": {
> >>> +		"type": "$($(1)_TYPE)",
> >>
> >>  I may be exaggerating here, but I am getting a bit confused between commas that
> >> are intrepreted by make and the JSON commas. Maybe we should consistently use
> >> $(comma) for the commas that go into the output, even if it is not needed like here?
> > 
> > This is a macro definition, not a macro call, so commas are not
> > interpreted.
> 
>  I know, of course. My point is that it is not immediately apparent. My mind is
> jumbling the JSON separators and the macro call separators together. My thought
> was: if we use $(comma) everywhere to mark the JSON separators, things might
> become more readable.
> 
>  In fact, in the part you snipped, one line lower there is a macro-separator:
> 
> 		"type": "$($(1)_TYPE)",
> 		$(if $(filter rootfs,$($(1)_TYPE)),
> 
>  You see where I'm coming from?

Yeah, I see now.

>  Now, I can imagine that sprinkling this code with $(comma)s is not going to
> help readability one bit. But I thought I'd just float the idea.

To be honest, I tried to use $(comma) in place of actual commas. But
seriously, that is totally unreadable... :-(

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'


More information about the buildroot mailing list