meson: docs: add texinfo target

This commit is contained in:
Andres Freund 2023-03-23 23:08:06 -07:00
parent 36f40ce2dc
commit 069ef254f1
1 changed files with 33 additions and 0 deletions

View File

@ -287,6 +287,39 @@ if pandoc.found() and xsltproc_bin.found()
alldocs += postgres_epub
endif
##
## Experimental Texinfo targets
##
db2x_xsltproc = find_program('db2x_xsltproc', native: true, required: false)
db2x_texixml = find_program('db2x_texixml', native: true, required: false)
makeinfo = find_program('makeinfo', native: true, required: false)
if db2x_texixml.found() and db2x_xsltproc.found() and makeinfo.found()
postgres_texixml = custom_target('postgres.texixml',
output: 'postgres.texixml',
command: [db2x_xsltproc, '-s', 'texi',
'-g', 'output-file=postgres',
postgres_full_xml, '-o', '@OUTPUT@'],
build_by_default: false,
)
postgres_texi = custom_target('postgres.texi',
output: 'postgres.texi',
command: [db2x_texixml, '--encoding=utf-8', postgres_texixml,
'--output-dir=@OUTDIR@'],
build_by_default: false,
)
postgres_info = custom_target('postgres.info',
output: 'postgres.info',
command: [makeinfo, '--enable-encoding', '--no-split', '--no-validate',
postgres_texi, '-o', '@OUTPUT0@'],
build_by_default: false,
)
alldocs += postgres_info
endif
if docs.length() == 0
run_target('docs', command: [missing, 'xsltproc'])
else