meson: print configuration summary()

Fixes #249
This commit is contained in:
Tim-Philipp Müller 2020-07-31 15:15:07 +01:00
parent 57a224f51d
commit a5fd5dc471
2 changed files with 22 additions and 0 deletions

View File

@ -1,3 +1,5 @@
doc_targets = []
docbook2man = find_program('docbook2man', required: get_option('doc-man')) docbook2man = find_program('docbook2man', required: get_option('doc-man'))
docbook2txt = find_program('docbook2txt', required: get_option('doc-txt')) docbook2txt = find_program('docbook2txt', required: get_option('doc-txt'))
docbook2pdf = find_program('docbook2pdf', required: get_option('doc-pdf')) docbook2pdf = find_program('docbook2pdf', required: get_option('doc-pdf'))
@ -83,6 +85,8 @@ foreach f : doc_funcs_fncs
endforeach endforeach
if docbook2man.found() if docbook2man.found()
doc_targets += ['man']
custom_target('devel-man', custom_target('devel-man',
input: [fontconfig_devel_sgml, funcs_sgml], input: [fontconfig_devel_sgml, funcs_sgml],
output: man_pages, output: man_pages,
@ -113,6 +117,8 @@ if docbook2man.found()
endif endif
if docbook2pdf.found() if docbook2pdf.found()
doc_targets += ['PDF']
custom_target('devel-pdf', custom_target('devel-pdf',
input: [fontconfig_devel_sgml, funcs_sgml], input: [fontconfig_devel_sgml, funcs_sgml],
output: 'fontconfig-devel.pdf', output: 'fontconfig-devel.pdf',
@ -131,6 +137,8 @@ if docbook2pdf.found()
endif endif
if docbook2txt.found() if docbook2txt.found()
doc_targets += ['Text']
custom_target('devel-txt', custom_target('devel-txt',
input: [fontconfig_devel_sgml, funcs_sgml], input: [fontconfig_devel_sgml, funcs_sgml],
output: 'fontconfig-devel.txt', output: 'fontconfig-devel.txt',
@ -149,6 +157,8 @@ if docbook2txt.found()
endif endif
if docbook2html.found() if docbook2html.found()
doc_targets += ['HTML']
custom_target('devel-html', custom_target('devel-html',
input: [fontconfig_devel_sgml, funcs_sgml], input: [fontconfig_devel_sgml, funcs_sgml],
output: 'fontconfig-devel.html', output: 'fontconfig-devel.html',

View File

@ -360,3 +360,15 @@ fc_headers = [
install_headers(fc_headers, subdir: meson.project_name()) install_headers(fc_headers, subdir: meson.project_name())
meson.add_install_script('install-cache.py', fccache.full_path()) meson.add_install_script('install-cache.py', fccache.full_path())
# Summary
if meson.version() >= '0.53'
doc_targets = get_variable('doc_targets', [])
summary({
'Documentation': (doc_targets.length() > 0 ? doc_targets : false),
'NLS': not get_option('nls').disabled(),
'Tests': not get_option('tests').disabled(),
'Tools': not get_option('tools').disabled(),
}, section: 'General', bool_yn: true, list_sep: ', ')
endif