Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit f13eb16

Browse files
committed
meson: add install-{docs,doc-html,doc-man} targets
Discussion: https://postgr.es/m/3fc3bb9b-f7f8-d442-35c1-ec82280c564a@enterprisedb.com
1 parent 614c5f5 commit f13eb16

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

doc/src/sgml/meson.build

+27-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Copyright (c) 2022-2023, PostgreSQL Global Development Group
22

33
docs = []
4+
installdocs = []
45
alldocs = []
56
doc_generated = []
67

@@ -120,8 +121,19 @@ if xsltproc_bin.found()
120121
)
121122
alldocs += html
122123

123-
# build multi-page html docs as part of docs target
124+
install_doc_html = custom_target('install-html',
125+
output: 'install-html',
126+
command: [
127+
python, install_files, '--prefix', dir_prefix,
128+
'--install-dir-contents', dir_doc_html, html],
129+
build_always_stale: true, build_by_default: false,
130+
)
131+
alias_target('install-doc-html', install_doc_html)
132+
133+
# build and install multi-page html docs as part of docs target
124134
docs += html
135+
installdocs += install_doc_html
136+
125137

126138
htmlhelp = custom_target('htmlhelp',
127139
input: ['stylesheet-hh.xsl', postgres_full_xml],
@@ -208,6 +220,19 @@ if xsltproc_bin.found()
208220
build_by_default: false,
209221
)
210222
alldocs += man
223+
224+
install_doc_man = custom_target('install-man',
225+
output: 'install-man',
226+
command: [
227+
python, install_files, '--prefix', dir_prefix,
228+
'--install-dirs', dir_man, man],
229+
build_always_stale: true, build_by_default: false,
230+
)
231+
alias_target('install-doc-man', install_doc_man)
232+
233+
# even though we don't want to build man pages as part of 'docs', we do want
234+
# to install them as part of install-docs
235+
installdocs += install_doc_man
211236
endif
212237

213238

@@ -266,6 +291,7 @@ if docs.length() == 0
266291
run_target('docs', command: [missing, 'xsltproc'])
267292
else
268293
alias_target('docs', docs)
294+
alias_target('install-docs', installdocs)
269295
endif
270296

271297
if alldocs.length() == 0

meson.build

+1-1
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ dir_man = get_option('mandir')
504504

505505
# FIXME: These used to be separately configurable - worth adding?
506506
dir_doc = get_option('datadir') / 'doc' / 'postgresql'
507-
dir_doc_html = dir_doc
507+
dir_doc_html = dir_doc / 'html'
508508

509509
dir_locale = get_option('localedir')
510510

0 commit comments

Comments
 (0)