diff --git a/doc/manpage.dox.in b/doc/manpage.dox.in new file mode 100644 index 000000000..9e6df7893 --- /dev/null +++ b/doc/manpage.dox.in @@ -0,0 +1,5 @@ +/** \page @pagename@ @title@ + +\verbinclude @filename@ + +*/ diff --git a/doc/meson.build b/doc/meson.build index 0e6d7f8e3..7e876bce5 100644 --- a/doc/meson.build +++ b/doc/meson.build @@ -26,7 +26,6 @@ extra_docs = [ 'pipewire-daemon.dox', 'pipewire-library.dox', 'pipewire-modules.dox', - 'pipewire-tools.dox', 'pipewire-session-manager.dox', 'pipewire-objects-design.dox', 'pipewire-audio.dox', @@ -115,6 +114,30 @@ examples_dox = configure_file(input: 'examples.dox.in', input_dirs += [ 'doc/examples.dox' ] +man_doxygen = [] +man_subpages = [] +foreach m : manpages + manconf = configuration_data() + pagename = 'page_man_' + m.split('.rst.in').get(0).replace('.', '_').replace('-', '_') + filename = m.split('.rst.in').get(0) + '.dox' + manconf.set('pagename', pagename) + manconf.set('title', m.split('.rst.in').get(0).replace('.1','').replace('.5','')) + manconf.set('filename', meson.project_source_root() / 'man' / m) + manfile = configure_file(input: 'manpage.dox.in', + output: filename, + configuration: manconf) + man_doxygen += [manfile] + man_subpages += ['- \subpage ' + pagename] + input_dirs += [ 'doc/' + filename ] +endforeach + +pw_tools_dox_conf = configuration_data() +pw_tools_dox_conf.set('man_subpages', '\n'.join(man_subpages)) +pw_tools_dox = configure_file(input: 'pipewire-tools.dox.in', + output: 'pipewire-tools.dox', + configuration: pw_tools_dox_conf) +input_dirs += [ 'doc/pipewire-tools.dox' ] + doxyfile_conf.set('inputs', ' '.join(inputs + input_dirs)) doxyfile_conf.set('cssfiles', ' '.join(cssfiles)) doxyfile_conf.set('path_prefixes', ' '.join(path_prefixes)) @@ -131,7 +154,7 @@ if docdir == '' endif html_target = custom_target('pipewire-docs', - input: [ doxyfile, examples_dox ] + inputs + cssfiles, + input: [ doxyfile, examples_dox, pw_tools_dox ] + inputs + cssfiles + man_doxygen, output: [ 'html' ], command: [ doxygen, doxyfile ], install: true, diff --git a/doc/pipewire-tools.dox b/doc/pipewire-tools.dox.in similarity index 57% rename from doc/pipewire-tools.dox rename to doc/pipewire-tools.dox.in index 6c311caba..e0bf11680 100644 --- a/doc/pipewire-tools.dox +++ b/doc/pipewire-tools.dox.in @@ -1,4 +1,7 @@ /** \page page_tools PipeWire Tools -*/ +Manual pages: +@man_subpages@ + +*/ diff --git a/man/meson.build b/man/meson.build index 2dfd18ecd..8e6e7dbe4 100644 --- a/man/meson.build +++ b/man/meson.build @@ -23,6 +23,10 @@ if not get_option('pipewire-jack').disabled() manpages += 'pw-jack.1.rst.in' endif +if not generate_manpages + subdir_done() +endif + foreach m : manpages file = m.split('.rst.in').get(0) rst = configure_file(input : m, diff --git a/man/pipewire-pulse.1.rst.in b/man/pipewire-pulse.1.rst.in index d942093c4..eed994bc7 100644 --- a/man/pipewire-pulse.1.rst.in +++ b/man/pipewire-pulse.1.rst.in @@ -1,5 +1,3 @@ -.. This file is part of PipeWire. - pipewire-pulse ############## diff --git a/man/pipewire.1.rst.in b/man/pipewire.1.rst.in index 229b75ec1..fd0701705 100644 --- a/man/pipewire.1.rst.in +++ b/man/pipewire.1.rst.in @@ -1,5 +1,3 @@ -.. This file is part of PipeWire. - pipewire ######## diff --git a/man/pipewire.conf.5.rst.in b/man/pipewire.conf.5.rst.in index 5becbbfa5..afa4dc854 100644 --- a/man/pipewire.conf.5.rst.in +++ b/man/pipewire.conf.5.rst.in @@ -1,5 +1,3 @@ -.. This file is part of PipeWire. - pipewire.conf ############# diff --git a/man/pw-cat.1.rst.in b/man/pw-cat.1.rst.in index 9de60e0f5..edaaeeb83 100644 --- a/man/pw-cat.1.rst.in +++ b/man/pw-cat.1.rst.in @@ -1,5 +1,3 @@ -.. This file is part of PipeWire. - pw-cat ###### @@ -44,13 +42,16 @@ OPTIONS a connection is made to the default PipeWire instance. -p | --playback - Playback mode. Read data from the specified file, and play it back. If the tool is called under the name **pw-play** or **pw-midiplay** this is the default. + Playback mode. Read data from the specified file, and play it back. If the tool + is called under the name **pw-play** or **pw-midiplay** this is the default. -r | --record - Recording mode. Capture data and write it to the specified file. If the tool is called under the name **pw-record** or **pw-midirecord** this is the default. + Recording mode. Capture data and write it to the specified file. If the tool is + called under the name **pw-record** or **pw-midirecord** this is the default. -m | --midi - MIDI mode. *FILE* is a MIDI file. If the tool is called under the name **pw-midiplay** or **pw-midirecord** this is the default. + MIDI mode. *FILE* is a MIDI file. If the tool is called under the name + **pw-midiplay** or **pw-midirecord** this is the default. --media-type=VALUE Set the media type property (default Audio/Midi depending on mode). diff --git a/man/pw-cli.1.rst.in b/man/pw-cli.1.rst.in index 3922f365e..98c5174c7 100644 --- a/man/pw-cli.1.rst.in +++ b/man/pw-cli.1.rst.in @@ -1,5 +1,3 @@ -.. This file is part of PipeWire. - pw-cli ###### @@ -45,7 +43,8 @@ quit MODULE MANAGEMENT ================= -| Modules are loaded and unloaded in the local instance and can add functionality or objects to the local instance. +| Modules are loaded and unloaded in the local instance and can add +| functionality or objects to the local instance. load-module *name* [*arguments...*] Load a module specified by its name and arguments. For most diff --git a/man/pw-dot.1.rst.in b/man/pw-dot.1.rst.in index faf4597b7..459953982 100644 --- a/man/pw-dot.1.rst.in +++ b/man/pw-dot.1.rst.in @@ -1,5 +1,3 @@ -.. This file is part of PipeWire. - pw-dot ###### diff --git a/man/pw-jack.1.rst.in b/man/pw-jack.1.rst.in index 00c5e799d..0781b3d7b 100644 --- a/man/pw-jack.1.rst.in +++ b/man/pw-jack.1.rst.in @@ -1,5 +1,3 @@ -.. This file is part of PipeWire. - pw-jack ####### diff --git a/man/pw-metadata.1.rst.in b/man/pw-metadata.1.rst.in index 84cdfe22a..f83618b27 100644 --- a/man/pw-metadata.1.rst.in +++ b/man/pw-metadata.1.rst.in @@ -1,5 +1,3 @@ -.. This file is part of PipeWire. - pw-metadata ########### diff --git a/man/pw-mididump.1.rst.in b/man/pw-mididump.1.rst.in index f11f13c2b..bb56ec673 100644 --- a/man/pw-mididump.1.rst.in +++ b/man/pw-mididump.1.rst.in @@ -1,5 +1,3 @@ -.. This file is part of PipeWire. - pw-mididump ########### diff --git a/man/pw-mon.1.rst.in b/man/pw-mon.1.rst.in index 1d220eca5..775de0a4e 100644 --- a/man/pw-mon.1.rst.in +++ b/man/pw-mon.1.rst.in @@ -1,5 +1,3 @@ -.. This file is part of PipeWire. - pw-mon ###### diff --git a/man/pw-profiler.1.rst.in b/man/pw-profiler.1.rst.in index cb006293b..119d8ceea 100644 --- a/man/pw-profiler.1.rst.in +++ b/man/pw-profiler.1.rst.in @@ -1,5 +1,3 @@ -.. This file is part of PipeWire. - pw-profiler ########### diff --git a/meson.build b/meson.build index 174f49664..5852af1c4 100644 --- a/meson.build +++ b/meson.build @@ -479,22 +479,25 @@ if alsa_dep.found() subdir('pipewire-alsa/tests') endif -doxygen = find_program('doxygen', required : get_option('docs')) -if doxygen.found() - subdir('doc') -endif - +generate_manpages = false if not get_option('man').disabled() rst2man = find_program('rst2man', required: false) if not rst2man.found() rst2man = find_program('rst2man.py', required: get_option('man')) endif - summary({'Manpage generation': rst2man.found()}, bool_yn: true) if rst2man.found() - subdir('man') + generate_manpages = true endif endif +summary({'Manpage generation': generate_manpages}, bool_yn: true) +subdir('man') + +doxygen = find_program('doxygen', required : get_option('docs')) +if doxygen.found() + subdir('doc') +endif + setenv = find_program('pw-uninstalled.sh') run_target('pw-uninstalled', command : [setenv,