meson: docs: Preparatory cleanups
These are just minor prerequisite changes for later commits. Kept separate for easier review. Discussion: https://postgr.es/m/3fc3bb9b-f7f8-d442-35c1-ec82280c564a@enterprisedb.com Discussion: https://postgr.es/m/20230329224132.fnymznyxmta5ugrs@awork3.anarazel.de
This commit is contained in:
parent
8df0d3d530
commit
0ba827ecfc
@ -97,26 +97,32 @@ docs += postgres_full_xml
|
|||||||
alldocs += postgres_full_xml
|
alldocs += postgres_full_xml
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# Full documentation as html, text
|
|
||||||
#
|
|
||||||
if xsltproc_bin.found()
|
if xsltproc_bin.found()
|
||||||
xsltproc_flags = [
|
xsltproc_flags = [
|
||||||
'--nonet',
|
'--nonet',
|
||||||
'--stringparam', 'pg.version', pg_version,
|
'--stringparam', 'pg.version', pg_version,
|
||||||
'--param', 'website.stylesheet', '1'
|
'--path', '@OUTDIR@',
|
||||||
]
|
]
|
||||||
|
|
||||||
xsltproc = xmltools_wrapper + [
|
xsltproc = xmltools_wrapper + [
|
||||||
'--tool', xsltproc_bin, '--',
|
'--tool', xsltproc_bin, '--',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
xsltproc_html_flags = xsltproc_flags + [
|
||||||
|
'--param', 'website.stylesheet', '1'
|
||||||
|
]
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Full documentation as html, text
|
||||||
|
#
|
||||||
|
if xsltproc_bin.found()
|
||||||
html = custom_target('html',
|
html = custom_target('html',
|
||||||
input: ['stylesheet.xsl', postgres_full_xml],
|
input: ['stylesheet.xsl', postgres_full_xml],
|
||||||
output: 'html',
|
output: 'html',
|
||||||
depfile: 'html.d',
|
depfile: 'html.d',
|
||||||
depends: doc_generated,
|
command: [xsltproc, '-o', '@OUTDIR@/', xsltproc_html_flags, '@INPUT@'],
|
||||||
command: [xsltproc, '-o', '@OUTDIR@/', xsltproc_flags, '@INPUT@'],
|
|
||||||
build_by_default: false,
|
build_by_default: false,
|
||||||
)
|
)
|
||||||
alldocs += html
|
alldocs += html
|
||||||
@ -140,8 +146,7 @@ if xsltproc_bin.found()
|
|||||||
input: ['stylesheet-html-nochunk.xsl', postgres_full_xml],
|
input: ['stylesheet-html-nochunk.xsl', postgres_full_xml],
|
||||||
output: 'postgres.html',
|
output: 'postgres.html',
|
||||||
depfile: 'postgres.html.d',
|
depfile: 'postgres.html.d',
|
||||||
depends: doc_generated,
|
command: [xsltproc, '-o', '@OUTPUT@', xsltproc_html_flags, '@INPUT@'],
|
||||||
command: [xsltproc, '--path', '@OUTDIR@', '-o', '@OUTPUT@', xsltproc_flags, '@INPUT@'],
|
|
||||||
build_by_default: false,
|
build_by_default: false,
|
||||||
)
|
)
|
||||||
alldocs += postgres_html
|
alldocs += postgres_html
|
||||||
@ -151,7 +156,6 @@ if xsltproc_bin.found()
|
|||||||
postgres_txt = custom_target('postgres.txt',
|
postgres_txt = custom_target('postgres.txt',
|
||||||
input: [postgres_html],
|
input: [postgres_html],
|
||||||
output: 'postgres.txt',
|
output: 'postgres.txt',
|
||||||
depends: doc_generated,
|
|
||||||
command: [pandoc, '-t', 'plain', '-o', '@OUTPUT@', '@INPUT@'],
|
command: [pandoc, '-t', 'plain', '-o', '@OUTPUT@', '@INPUT@'],
|
||||||
build_by_default: false,
|
build_by_default: false,
|
||||||
)
|
)
|
||||||
@ -164,19 +168,21 @@ endif
|
|||||||
# INSTALL in html, text
|
# INSTALL in html, text
|
||||||
#
|
#
|
||||||
if xsltproc_bin.found()
|
if xsltproc_bin.found()
|
||||||
|
# Depend on postgres_full_xml, so validity errors are raised in one place,
|
||||||
|
# and so dependencies don't need to be re-specified.
|
||||||
install_xml = custom_target('INSTALL.xml',
|
install_xml = custom_target('INSTALL.xml',
|
||||||
input: ['standalone-profile.xsl', 'standalone-install.xml'],
|
input: ['standalone-profile.xsl', 'standalone-install.xml'],
|
||||||
output: 'INSTALL.xml',
|
output: 'INSTALL.xml',
|
||||||
depfile: 'INSTALL.xml.d',
|
depfile: 'INSTALL.xml.d',
|
||||||
depends: doc_generated + [postgres_full_xml],
|
depends: postgres_full_xml,
|
||||||
command: [xsltproc, '--path', '@OUTDIR@', '-o', '@OUTPUT@', xsltproc_flags, '--xinclude', '@INPUT@'],
|
command: [xsltproc, '-o', '@OUTPUT@', xsltproc_flags, '--xinclude', '@INPUT@'],
|
||||||
build_by_default: false,
|
build_by_default: false,
|
||||||
)
|
)
|
||||||
install_html = custom_target('INSTALL.html',
|
install_html = custom_target('INSTALL.html',
|
||||||
input: ['stylesheet-text.xsl', install_xml],
|
input: ['stylesheet-text.xsl', install_xml],
|
||||||
output: 'INSTALL.html',
|
output: 'INSTALL.html',
|
||||||
depfile: 'INSTALL.html.d',
|
depfile: 'INSTALL.html.d',
|
||||||
command: [xsltproc, '--path', '@OUTDIR@', '-o', '@OUTPUT@', xsltproc_flags, '@INPUT@'],
|
command: [xsltproc, '-o', '@OUTPUT@', xsltproc_html_flags, '@INPUT@'],
|
||||||
build_by_default: false,
|
build_by_default: false,
|
||||||
)
|
)
|
||||||
alldocs += install_html
|
alldocs += install_html
|
||||||
@ -204,8 +210,7 @@ if xsltproc_bin.found()
|
|||||||
input: ['stylesheet-man.xsl', postgres_full_xml],
|
input: ['stylesheet-man.xsl', postgres_full_xml],
|
||||||
output: ['man1', 'man3', 'man7'],
|
output: ['man1', 'man3', 'man7'],
|
||||||
depfile: 'man.d',
|
depfile: 'man.d',
|
||||||
depends: doc_generated,
|
command: [xsltproc, '-o', '@OUTDIR@/', xsltproc_html_flags, '@INPUT@'],
|
||||||
command: [xsltproc, '--path', '@OUTDIR@', '-o', '@OUTDIR@/', xsltproc_flags, '@INPUT@'],
|
|
||||||
build_by_default: false,
|
build_by_default: false,
|
||||||
)
|
)
|
||||||
alldocs += man
|
alldocs += man
|
||||||
@ -229,7 +234,9 @@ endif
|
|||||||
# Full documentation as PDF
|
# Full documentation as PDF
|
||||||
#
|
#
|
||||||
if fop.found() and xsltproc_bin.found()
|
if fop.found() and xsltproc_bin.found()
|
||||||
xsltproc_fo_flags = xsltproc_flags + ['--stringparam', 'img.src.path', meson.current_source_dir() + '/']
|
xsltproc_fo_flags = xsltproc_flags + [
|
||||||
|
'--stringparam', 'img.src.path', meson.current_source_dir() + '/'
|
||||||
|
]
|
||||||
|
|
||||||
foreach format, detail: {'A4': 'A4', 'US': 'USletter'}
|
foreach format, detail: {'A4': 'A4', 'US': 'USletter'}
|
||||||
postgres_x_fo_f = 'postgres-@0@.fo'.format(format)
|
postgres_x_fo_f = 'postgres-@0@.fo'.format(format)
|
||||||
@ -239,9 +246,8 @@ if fop.found() and xsltproc_bin.found()
|
|||||||
postgres_x_fo = custom_target(postgres_x_fo_f,
|
postgres_x_fo = custom_target(postgres_x_fo_f,
|
||||||
input: ['stylesheet-fo.xsl', postgres_full_xml],
|
input: ['stylesheet-fo.xsl', postgres_full_xml],
|
||||||
output: postgres_x_fo_f,
|
output: postgres_x_fo_f,
|
||||||
depends: doc_generated,
|
|
||||||
depfile: postgres_x_fo_dep,
|
depfile: postgres_x_fo_dep,
|
||||||
command: [xsltproc, '--path', '@OUTDIR@/', xsltproc_fo_flags,
|
command: [xsltproc, xsltproc_fo_flags,
|
||||||
'--stringparam', 'paper.type', detail,
|
'--stringparam', 'paper.type', detail,
|
||||||
'-o', '@OUTPUT@', '@INPUT@'],
|
'-o', '@OUTPUT@', '@INPUT@'],
|
||||||
build_by_default: false,
|
build_by_default: false,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user