Merge pull request #27846 from keszybz/link-mode-generation

Autogenerate list of link modes
This commit is contained in:
Lennart Poettering
2023-06-13 23:03:51 +02:00
committed by GitHub
8 changed files with 99 additions and 143 deletions
+10 -6
View File
@@ -20,7 +20,9 @@ xsltproc_flags = [
'--stringparam', 'man.copyright.section.enabled', '0',
'--stringparam', 'systemd.version', '@0@'.format(meson.project_version()),
'--path',
'@0@:@1@'.format(meson.current_build_dir(), meson.current_source_dir())]
'@0@:@1@:@2@'.format(meson.current_build_dir(),
meson.current_source_dir(),
libshared_build_dir)]
custom_man_xsl = files('custom-man.xsl')
custom_html_xsl = files('custom-html.xsl')
@@ -32,6 +34,8 @@ custom_entities_ent = custom_target(
output : 'custom-entities.ent',
command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'])
man_page_depends += custom_entities_ent
man_pages = []
html_pages = []
source_xml_files = []
@@ -68,7 +72,7 @@ foreach tuple : manpages
input : xml,
output : [man] + manaliases,
command : xslt_cmd + [custom_man_xsl, '@INPUT@'],
depends : custom_entities_ent,
depends : man_page_depends,
install : want_man,
install_dir : mandirn)
man_pages += p1
@@ -93,7 +97,7 @@ foreach tuple : manpages
input : xml,
output : html,
command : xslt_cmd + [custom_html_xsl, '@INPUT@'],
depends : [custom_entities_ent, p2],
depends : [man_page_depends, p2],
install : want_html,
install_dir : docdir / 'html')
html_pages += p3
@@ -114,7 +118,7 @@ systemd_directives_xml = custom_target(
'systemd.directives.xml',
input : ['directives-template.xml', source_xml_files],
output : 'systemd.directives.xml',
depends : custom_entities_ent,
depends : man_page_depends,
command : [make_directive_index_py, '@OUTPUT@', '@INPUT@'])
nonindex_xml_files = source_xml_files + [systemd_directives_xml]
@@ -166,7 +170,7 @@ foreach tuple : xsltproc.found() ? [['systemd.directives', '7', systemd_directiv
input : xml,
output : html,
command : xslt_cmd + [custom_html_xsl, '@INPUT@'],
depends : [custom_entities_ent, p2],
depends : [man_page_depends, p2],
install : want_html and have_lxml,
install_dir : docdir / 'html')
html_pages += p3
@@ -237,4 +241,4 @@ update_man_rules = custom_target(
command : [update_man_rules_py,
'@0@/man/*.xml'.format(project_source_root),
'@0@/rules/meson.build'.format(meson.current_source_dir())],
depends : custom_entities_ent)
depends : man_page_depends)
+3 -44
View File
@@ -3,7 +3,8 @@
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
<refentry id="systemd.link">
<refentry id="systemd.link"
xmlns:xi="http://www.w3.org/2001/XInclude">
<refentryinfo>
<title>systemd.link</title>
<productname>systemd</productname>
@@ -709,49 +710,7 @@
<entry>Speed (Mbps)</entry>
<entry>Duplex Mode</entry>
</row></thead>
<tbody>
<row><entry><option>10baset-half</option></entry>
<entry>10</entry><entry>half</entry></row>
<row><entry><option>10baset-full</option></entry>
<entry>10</entry><entry>full</entry></row>
<row><entry><option>100baset-half</option></entry>
<entry>100</entry><entry>half</entry></row>
<row><entry><option>100baset-full</option></entry>
<entry>100</entry><entry>full</entry></row>
<row><entry><option>1000baset-half</option></entry>
<entry>1000</entry><entry>half</entry></row>
<row><entry><option>1000baset-full</option></entry>
<entry>1000</entry><entry>full</entry></row>
<row><entry><option>10000baset-full</option></entry>
<entry>10000</entry><entry>full</entry></row>
<row><entry><option>2500basex-full</option></entry>
<entry>2500</entry><entry>full</entry></row>
<row><entry><option>1000basekx-full</option></entry>
<entry>1000</entry><entry>full</entry></row>
<row><entry><option>10000basekx4-full</option></entry>
<entry>10000</entry><entry>full</entry></row>
<row><entry><option>10000basekr-full</option></entry>
<entry>10000</entry><entry>full</entry></row>
<row><entry><option>10000baser-fec</option></entry>
<entry>10000</entry><entry>full</entry></row>
<row><entry><option>20000basemld2-full</option></entry>
<entry>20000</entry><entry>full</entry></row>
<row><entry><option>20000basekr2-full</option></entry>
<entry>20000</entry><entry>full</entry></row>
</tbody>
<xi:include href="ethtool-link-mode.xml" />
</tgroup>
</table>