|
1 | 1 | # Copyright (c) 2022-2023, PostgreSQL Global Development Group |
2 | 2 |
|
3 | 3 | docs = [] |
| 4 | +installdocs = [] |
4 | 5 | alldocs = [] |
5 | 6 | doc_generated = [] |
6 | 7 |
|
@@ -120,8 +121,19 @@ if xsltproc_bin.found() |
120 | 121 | ) |
121 | 122 | alldocs += html |
122 | 123 |
|
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 |
124 | 134 | docs += html |
| 135 | + installdocs += install_doc_html |
| 136 | + |
125 | 137 |
|
126 | 138 | htmlhelp = custom_target('htmlhelp', |
127 | 139 | input: ['stylesheet-hh.xsl', postgres_full_xml], |
@@ -208,6 +220,19 @@ if xsltproc_bin.found() |
208 | 220 | build_by_default: false, |
209 | 221 | ) |
210 | 222 | 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 |
211 | 236 | endif |
212 | 237 |
|
213 | 238 |
|
@@ -266,6 +291,7 @@ if docs.length() == 0 |
266 | 291 | run_target('docs', command: [missing, 'xsltproc']) |
267 | 292 | else |
268 | 293 | alias_target('docs', docs) |
| 294 | + alias_target('install-docs', installdocs) |
269 | 295 | endif |
270 | 296 |
|
271 | 297 | if alldocs.length() == 0 |
|
0 commit comments