@@ -46,73 +46,59 @@ if build_docs
46
46
meson .source_root() / ' docs/sphinx/qmp_lexer.py' ,
47
47
qapi_gen_depends ]
48
48
49
- configure_file (output : ' index.html' ,
50
- input : files (' index.html.in' ),
51
- configuration : {' VERSION' : meson .project_version()},
52
- install_dir : qemu_docdir)
53
- manuals = [ ' devel' , ' interop' , ' tools' , ' specs' , ' system' , ' user' ]
54
49
man_pages = {
55
- ' interop' : {
56
50
' qemu-ga.8' : (have_tools ? ' man8' : '' ),
57
51
' qemu-ga-ref.7' : ' man7' ,
58
52
' qemu-qmp-ref.7' : ' man7' ,
59
53
' qemu-storage-daemon-qmp-ref.7' : (have_tools ? ' man7' : '' ),
60
- },
61
- ' tools' : {
62
54
' qemu-img.1' : (have_tools ? ' man1' : '' ),
63
55
' qemu-nbd.8' : (have_tools ? ' man8' : '' ),
64
56
' qemu-pr-helper.8' : (have_tools ? ' man8' : '' ),
65
57
' qemu-storage-daemon.1' : (have_tools ? ' man1' : '' ),
66
58
' qemu-trace-stap.1' : (config_host.has_key(' CONFIG_TRACE_SYSTEMTAP' ) ? ' man1' : '' ),
67
59
' virtfs-proxy-helper.1' : (have_virtfs_proxy_helper ? ' man1' : '' ),
68
60
' virtiofsd.1' : (have_virtiofsd ? ' man1' : '' ),
69
- },
70
- ' system' : {
71
61
' qemu.1' : ' man1' ,
72
62
' qemu-block-drivers.7' : ' man7' ,
73
63
' qemu-cpu-models.7' : ' man7'
74
- },
75
64
}
76
65
77
66
sphinxdocs = []
78
67
sphinxmans = []
79
- foreach manual : manuals
80
- private_dir = meson .current_build_dir() / (manual + ' .p' )
81
- output_dir = meson .current_build_dir() / manual
82
- input_dir = meson .current_source_dir() / manual
83
68
84
- this_manual = custom_target (manual + ' manual' ,
69
+ private_dir = meson .current_build_dir() / ' manual.p'
70
+ output_dir = meson .current_build_dir() / ' manual'
71
+ input_dir = meson .current_source_dir()
72
+
73
+ this_manual = custom_target (' QEMU manual' ,
85
74
build_by_default : build_docs,
86
- output : [manual + ' .stamp' ] ,
87
- input : [ files (' conf.py' ), files (manual / ' conf.py ' )] ,
88
- depfile : manual + ' .d' ,
75
+ output : ' docs .stamp' ,
76
+ input : files (' conf.py' ),
77
+ depfile : ' docs .d' ,
89
78
depend_files : sphinx_extn_depends,
90
79
command : [SPHINX_ARGS, ' -Ddepfile=@DEPFILE@' ,
91
80
' -Ddepfile_stamp=@OUTPUT0@' ,
92
81
' -b' , ' html' , ' -d' , private_dir,
93
82
input_dir, output_dir])
94
- sphinxdocs += this_manual
95
- if build_docs and manual != ' devel'
96
- install_subdir (output_dir, install_dir : qemu_docdir)
97
- endif
83
+ sphinxdocs += this_manual
84
+ install_subdir (output_dir, install_dir : qemu_docdir, strip_directory : true )
98
85
99
- these_man_pages = []
100
- install_dirs = []
101
- foreach page, section : man_pages.get(manual, {})
102
- these_man_pages += page
103
- install_dirs += section == '' ? false : get_option (' mandir' ) / section
104
- endforeach
105
- if these_man_pages.length() > 0
106
- sphinxmans += custom_target (manual + ' man pages' ,
107
- build_by_default : build_docs,
108
- output : these_man_pages,
109
- input : this_manual,
110
- install : build_docs,
111
- install_dir : install_dirs,
112
- command : [SPHINX_ARGS, ' -b' , ' man' , ' -d' , private_dir,
113
- input_dir, meson .current_build_dir()])
114
- endif
86
+ these_man_pages = []
87
+ install_dirs = []
88
+ foreach page, section : man_pages
89
+ these_man_pages += page
90
+ install_dirs += section == '' ? false : get_option (' mandir' ) / section
115
91
endforeach
92
+
93
+ sphinxmans += custom_target (' QEMU man pages' ,
94
+ build_by_default : build_docs,
95
+ output : these_man_pages,
96
+ input : this_manual,
97
+ install : build_docs,
98
+ install_dir : install_dirs,
99
+ command : [SPHINX_ARGS, ' -b' , ' man' , ' -d' , private_dir,
100
+ input_dir, meson .current_build_dir()])
101
+
116
102
alias_target (' sphinxdocs' , sphinxdocs)
117
103
alias_target (' html' , sphinxdocs)
118
104
alias_target (' man' , sphinxmans)
0 commit comments