diff options
author | Yann E. MORIN <yann.morin.1998@free.fr> | 2014-06-08 16:15:15 +0200 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2014-06-08 17:10:32 +0200 |
commit | fe696d7c658ee498ab07f1490588417e102e47f4 (patch) | |
tree | 45f9b26765f6ff8b1c0b4ceed7a1d543330db79c /docs/manual | |
parent | b2c75ecc5d904bfc8ad63aa5ad1d0a300d17188b (diff) | |
download | buildroot-fe696d7c658ee498ab07f1490588417e102e47f4.tar.gz buildroot-fe696d7c658ee498ab07f1490588417e102e47f4.zip |
support/scripts: introduce a symbol formatter to generate package lists
Currently, we can generate two different tables of packages:
- a single-column table with the symbols' prompts,
- a two-column table with the symbols' prompts and locations in the
menuconfig.
For virtual packages, this is not enough, since we will have to display
more columns, with different content:
- the virtual package name (but such symbols do not have a prompt)
- the symbol name
- the providers for the virtual package
So, instead of having a single function that knows how to generate any
table, introduce a formatter function that is passed as argument to,
and called by format_asciidoc_table(). Such formatter functions are
responsible for providing:
- the layout of the table (number of columns, column arrangement),
- the formatted header line,
- a formatted line for a symbol.
What the formatter should ouput depends on its arguments:
- if none are passed, the layout is returned,
- if the header label is passed, it returns the formatted header line,
- otherwise, it returns the formatted line for a symbol.
Two formatter functions are introduced in this changeset, to replace the
current 'sub_menu' feature:
- _format_symbol_prompt() to display a one-column table with only the
symbols' prompts,
- _format_symbol_prompt_location() to display a two-column table with
the symbols' prompts and locations.
This will help us to later introduce a new formatter to generate a table
for virtual packages.
[Thanks to Samuel for his pythonistic help!]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'docs/manual')
0 files changed, 0 insertions, 0 deletions