docs: move "nm-settings-docs-{dbus,nmcli}.xml" from "libnm/" to "man/"

"nm-settings-docs-nmcli.xml" will be generated by a tool that depends on
"clients/common/". The file should thus not be in libnm directory, otherwise
there is a circular dependency.

Move the file to "man/" directory.

For consistency, also move "nm-settings-docs-dbus.xml". Note that we
cannot move "nm-settings-docs-gir.xml" to "man/", because that one is
needed for building clients.
This commit is contained in:
Thomas Haller 2020-06-09 18:53:47 +02:00
parent caa70a50d7
commit d2f8d5a4fa
No known key found for this signature in database
GPG Key ID: 29C2366E4DFC5728
6 changed files with 45 additions and 37 deletions

4
.gitignore vendored
View File

@ -151,9 +151,7 @@ test-*.trs
/libnm/nm-property-infos-ifcfg-rh.xml
/libnm/nm-property-infos-keyfile.xml
/libnm/nm-property-infos-nmcli.xml
/libnm/nm-settings-docs-dbus.xml
/libnm/nm-settings-docs-gir.xml
/libnm/nm-settings-docs-nmcli.xml
/libnm/tests/test-libnm
/libnm/tests/test-nm-client
/libnm/tests/test-remote-settings-client
@ -195,6 +193,8 @@ test-*.trs
/man/*.[1785]
/man/nm-settings-dbus.xml
/man/nm-settings-docs-dbus.xml
/man/nm-settings-docs-nmcli.xml
/man/nm-settings-ifcfg-rh.xml
/man/nm-settings-keyfile.xml
/man/nm-settings-nmcli.xml

View File

@ -1563,9 +1563,9 @@ libnm_noinst_data = \
libnm/nm-property-infos-ifcfg-rh.xml \
libnm/nm-property-infos-keyfile.xml \
libnm/nm-property-infos-nmcli.xml \
libnm/nm-settings-docs-dbus.xml \
libnm/nm-settings-docs-gir.xml \
libnm/nm-settings-docs-nmcli.xml \
man/nm-settings-docs-dbus.xml \
man/nm-settings-docs-nmcli.xml \
$(NULL)
noinst_DATA += $(libnm_noinst_data)
@ -1585,7 +1585,7 @@ libnm/nm-settings-docs-gir.xml: libnm/generate-docs-nm-settings-docs-gir.py libn
--gir $(builddir)/libnm/NM-1.0.gir \
--output $@
libnm/nm-settings-docs-%.xml: libnm/nm-property-infos-%.xml libnm/nm-settings-docs-gir.xml libnm/generate-docs-nm-settings-docs-merge.py
man/nm-settings-docs-%.xml: libnm/nm-property-infos-%.xml libnm/nm-settings-docs-gir.xml libnm/generate-docs-nm-settings-docs-merge.py
$(AM_V_GEN) "$(PYTHON)" $(srcdir)/libnm/generate-docs-nm-settings-docs-merge.py $@ $(wordlist 1,2,$^)
EXTRA_DIST += $(libnm_noinst_data)
@ -4975,7 +4975,7 @@ man_nm_settings_xml = \
if HAVE_INTROSPECTION
man/nm-settings-%.xml: man/nm-settings-%.xsl libnm/nm-settings-docs-%.xml man/common.ent
man/nm-settings-%.xml: man/nm-settings-%.xsl man/nm-settings-docs-%.xml man/common.ent
$(AM_V_GEN) $(XSLTPROC) --output $@ $(xsltproc_flags) $< $(word 2,$^)
man/nm-settings-keyfile.xml: man/nm-settings-keyfile.xsl libnm/nm-property-infos-keyfile.xml man/common.ent

View File

@ -34,7 +34,7 @@ settings_docs = 'settings-docs.h'
if enable_introspection
settings_docs_source = custom_target(
settings_docs,
input: nm_settings_docs_xml['gir'],
input: nm_settings_docs_xml_gir,
output: settings_docs,
command: [xsltproc, '--output', '@OUTPUT@', join_paths(meson.current_source_dir(), 'settings-docs.xsl'), '@INPUT@'],
)

View File

@ -7,7 +7,7 @@ GENERATED_FILES =
if BUILD_DOCS
settings-spec.xml: settings-spec.xsl $(top_builddir)/libnm/nm-settings-docs-dbus.xml
settings-spec.xml: settings-spec.xsl $(top_builddir)/man/nm-settings-docs-dbus.xml
$(AM_V_GEN) (! test -f $@ || chmod u+w $@) && xsltproc --output $@ $^
# Top-level SGML file includes (depends on) settings-spec.xml

View File

@ -292,35 +292,6 @@ if enable_introspection
depends: libnm_gir,
)
foreach name: ['dbus', 'nmcli']
t = custom_target(
'nm-settings-docs-' + name + '.xml',
input: [nm_settings_docs_xml_gir, nm_property_infos_xml[name]],
output: 'nm-settings-docs-' + name + '.xml',
command: [
python.path(),
join_paths(meson.current_source_dir(), 'generate-docs-nm-settings-docs-merge.py'),
'@OUTPUT@',
nm_property_infos_xml[name],
nm_settings_docs_xml_gir,
],
depends: libnm_gir,
)
if name == 'dbus'
nm_settings_docs_xml_dbus = t
elif name == 'nmcli'
nm_settings_docs_xml_nmcli = t
else
assert(false)
endif
endforeach
nm_settings_docs_xml = {
'gir': nm_settings_docs_xml_gir,
'dbus': nm_settings_docs_xml_dbus,
'nmcli': nm_settings_docs_xml_nmcli,
}
endif
if enable_tests

View File

@ -56,6 +56,43 @@ foreach man: mans
endforeach
if enable_introspection
name = 'dbus'
nm_settings_docs_xml_dbus = custom_target(
'nm-settings-docs-' + name + '.xml',
input: [nm_settings_docs_xml_gir, nm_property_infos_xml[name]],
output: 'nm-settings-docs-' + name + '.xml',
command: [
python.path(),
join_paths(meson.source_root(), 'libnm', 'generate-docs-nm-settings-docs-merge.py'),
'@OUTPUT@',
nm_property_infos_xml[name],
nm_settings_docs_xml_gir,
],
depends: libnm_gir,
)
name = 'nmcli'
nm_settings_docs_xml_nmcli = custom_target(
'nm-settings-docs-' + name + '.xml',
input: [nm_settings_docs_xml_gir, nm_property_infos_xml[name]],
output: 'nm-settings-docs-' + name + '.xml',
command: [
python.path(),
join_paths(meson.source_root(), 'libnm', 'generate-docs-nm-settings-docs-merge.py'),
'@OUTPUT@',
nm_property_infos_xml[name],
nm_settings_docs_xml_gir,
],
depends: libnm_gir,
)
nm_settings_docs_xml = {
'gir': nm_settings_docs_xml_gir,
'dbus': nm_settings_docs_xml_dbus,
'nmcli': nm_settings_docs_xml_nmcli,
}
mans = [
['nm-settings-keyfile', '5', nm_property_infos_xml['keyfile']],
['nm-settings-dbus', '5', nm_settings_docs_xml['dbus']],