@@ -97,26 +97,32 @@ docs += postgres_full_xml
97
97
alldocs += postgres_full_xml
98
98
99
99
100
- #
101
- # Full documentation as html, text
102
- #
103
100
if xsltproc_bin.found()
104
101
xsltproc_flags = [
105
102
' --nonet' ,
106
103
' --stringparam' , ' pg.version' , pg_version,
107
- ' --param ' , ' website.stylesheet ' , ' 1 '
104
+ ' --path ' , ' @OUTDIR@ ' ,
108
105
]
109
106
110
107
xsltproc = xmltools_wrapper + [
111
108
' --tool' , xsltproc_bin, ' --' ,
112
109
]
113
110
111
+ xsltproc_html_flags = xsltproc_flags + [
112
+ ' --param' , ' website.stylesheet' , ' 1'
113
+ ]
114
+ endif
115
+
116
+
117
+ #
118
+ # Full documentation as html, text
119
+ #
120
+ if xsltproc_bin.found()
114
121
html = custom_target (' html' ,
115
122
input : [' stylesheet.xsl' , postgres_full_xml],
116
123
output : ' html' ,
117
124
depfile : ' html.d' ,
118
- depends : doc_generated,
119
- command : [xsltproc, ' -o' , ' @OUTDIR@/' , xsltproc_flags, ' @INPUT@' ],
125
+ command : [xsltproc, ' -o' , ' @OUTDIR@/' , xsltproc_html_flags, ' @INPUT@' ],
120
126
build_by_default : false ,
121
127
)
122
128
alldocs += html
@@ -140,8 +146,7 @@ if xsltproc_bin.found()
140
146
input : [' stylesheet-html-nochunk.xsl' , postgres_full_xml],
141
147
output : ' postgres.html' ,
142
148
depfile : ' postgres.html.d' ,
143
- depends : doc_generated,
144
- command : [xsltproc, ' --path' , ' @OUTDIR@' , ' -o' , ' @OUTPUT@' , xsltproc_flags, ' @INPUT@' ],
149
+ command : [xsltproc, ' -o' , ' @OUTPUT@' , xsltproc_html_flags, ' @INPUT@' ],
145
150
build_by_default : false ,
146
151
)
147
152
alldocs += postgres_html
@@ -151,7 +156,6 @@ if xsltproc_bin.found()
151
156
postgres_txt = custom_target (' postgres.txt' ,
152
157
input : [postgres_html],
153
158
output : ' postgres.txt' ,
154
- depends : doc_generated,
155
159
command : [pandoc, ' -t' , ' plain' , ' -o' , ' @OUTPUT@' , ' @INPUT@' ],
156
160
build_by_default : false ,
157
161
)
@@ -164,19 +168,21 @@ endif
164
168
# INSTALL in html, text
165
169
#
166
170
if xsltproc_bin.found()
171
+ # Depend on postgres_full_xml, so validity errors are raised in one place,
172
+ # and so dependencies don't need to be re-specified.
167
173
install_xml = custom_target (' INSTALL.xml' ,
168
174
input : [' standalone-profile.xsl' , ' standalone-install.xml' ],
169
175
output : ' INSTALL.xml' ,
170
176
depfile : ' INSTALL.xml.d' ,
171
- depends : doc_generated + [ postgres_full_xml] ,
172
- command : [xsltproc, ' --path ' , ' @OUTDIR@ ' , ' - o' , ' @OUTPUT@' , xsltproc_flags, ' --xinclude' , ' @INPUT@' ],
177
+ depends : postgres_full_xml,
178
+ command : [xsltproc, ' -o' , ' @OUTPUT@' , xsltproc_flags, ' --xinclude' , ' @INPUT@' ],
173
179
build_by_default : false ,
174
180
)
175
181
install_html = custom_target (' INSTALL.html' ,
176
182
input : [' stylesheet-text.xsl' , install_xml],
177
183
output : ' INSTALL.html' ,
178
184
depfile : ' INSTALL.html.d' ,
179
- command : [xsltproc, ' --path ' , ' @OUTDIR@ ' , ' - o' , ' @OUTPUT@' , xsltproc_flags , ' @INPUT@' ],
185
+ command : [xsltproc, ' -o' , ' @OUTPUT@' , xsltproc_html_flags , ' @INPUT@' ],
180
186
build_by_default : false ,
181
187
)
182
188
alldocs += install_html
@@ -204,8 +210,7 @@ if xsltproc_bin.found()
204
210
input : [' stylesheet-man.xsl' , postgres_full_xml],
205
211
output : [' man1' , ' man3' , ' man7' ],
206
212
depfile : ' man.d' ,
207
- depends : doc_generated,
208
- command : [xsltproc, ' --path' , ' @OUTDIR@' , ' -o' , ' @OUTDIR@/' , xsltproc_flags, ' @INPUT@' ],
213
+ command : [xsltproc, ' -o' , ' @OUTDIR@/' , xsltproc_html_flags, ' @INPUT@' ],
209
214
build_by_default : false ,
210
215
)
211
216
alldocs += man
@@ -229,7 +234,9 @@ endif
229
234
# Full documentation as PDF
230
235
#
231
236
if fop.found() and xsltproc_bin.found()
232
- xsltproc_fo_flags = xsltproc_flags + [' --stringparam' , ' img.src.path' , meson .current_source_dir() + ' /' ]
237
+ xsltproc_fo_flags = xsltproc_flags + [
238
+ ' --stringparam' , ' img.src.path' , meson .current_source_dir() + ' /'
239
+ ]
233
240
234
241
foreach format, detail : {' A4' : ' A4' , ' US' : ' USletter' }
235
242
postgres_x_fo_f = ' postgres-@0@.fo' .format(format)
@@ -239,9 +246,8 @@ if fop.found() and xsltproc_bin.found()
239
246
postgres_x_fo = custom_target (postgres_x_fo_f,
240
247
input : [' stylesheet-fo.xsl' , postgres_full_xml],
241
248
output : postgres_x_fo_f,
242
- depends : doc_generated,
243
249
depfile : postgres_x_fo_dep,
244
- command : [xsltproc, ' --path ' , ' @OUTDIR@/ ' , xsltproc_fo_flags,
250
+ command : [xsltproc, xsltproc_fo_flags,
245
251
' --stringparam' , ' paper.type' , detail,
246
252
' -o' , ' @OUTPUT@' , ' @INPUT@' ],
247
253
build_by_default : false ,
0 commit comments