mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
meson: add docs, docs_pdf options
Detect and report if the tools necessary to build documentation are available during configure. This is represented as two new options 'docs' and 'docs_pdf', both defaulting to 'auto'. This should also fix a meson error about the installdocs target, when none of the doc tools are found. Reviewed-by: Justin Pryzby <pryzby@telsasoft.com> Discussion: https://postgr.es/m/20230325201414.sh7c6xlut2fpunnv@awork3.anarazel.de Discussion: https://postgr.es/m/ZB8331v5IhUA/pNu@telsasoft.com
This commit is contained in:
37
meson.build
37
meson.build
@ -341,6 +341,8 @@ program_zstd = find_program(get_option('ZSTD'), native: true, required: false)
|
||||
dtrace = find_program(get_option('DTRACE'), native: true, required: get_option('dtrace'))
|
||||
missing = find_program('config/missing', native: true)
|
||||
cp = find_program('cp', required: false, native: true)
|
||||
xmllint_bin = find_program(get_option('XMLLINT'), native: true, required: false)
|
||||
xsltproc_bin = find_program(get_option('XSLTPROC'), native: true, required: false)
|
||||
|
||||
bison_flags = []
|
||||
if bison.found()
|
||||
@ -567,6 +569,39 @@ endif
|
||||
|
||||
|
||||
|
||||
###############################################################
|
||||
# Option: docs in HTML and man page format
|
||||
###############################################################
|
||||
|
||||
docs_opt = get_option('docs')
|
||||
docs_dep = not_found_dep
|
||||
if not docs_opt.disabled()
|
||||
if xmllint_bin.found() and xsltproc_bin.found()
|
||||
docs_dep = declare_dependency()
|
||||
elif docs_opt.enabled()
|
||||
error('missing required tools for docs in HTML / man page format')
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
|
||||
###############################################################
|
||||
# Option: docs in PDF format
|
||||
###############################################################
|
||||
|
||||
docs_pdf_opt = get_option('docs_pdf')
|
||||
docs_pdf_dep = not_found_dep
|
||||
if not docs_pdf_opt.disabled()
|
||||
fop = find_program(get_option('FOP'), native: true, required: docs_pdf_opt)
|
||||
if xmllint_bin.found() and xsltproc_bin.found() and fop.found()
|
||||
docs_pdf_dep = declare_dependency()
|
||||
elif docs_pdf_opt.enabled()
|
||||
error('missing required tools for docs in PDF format')
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
|
||||
###############################################################
|
||||
# Library: GSSAPI
|
||||
###############################################################
|
||||
@ -3323,6 +3358,8 @@ if meson.version().version_compare('>=0.57')
|
||||
{
|
||||
'bonjour': bonjour,
|
||||
'bsd_auth': bsd_auth,
|
||||
'docs': docs_dep,
|
||||
'docs_pdf': docs_pdf_dep,
|
||||
'gss': gssapi,
|
||||
'icu': icu,
|
||||
'ldap': ldap,
|
||||
|
Reference in New Issue
Block a user