@@ -97,26 +97,32 @@ docs += postgres_full_xml
9797alldocs += postgres_full_xml
9898
9999
100- #
101- # Full documentation as html, text
102- #
103100if xsltproc_bin.found()
104101 xsltproc_flags = [
105102 ' --nonet' ,
106103 ' --stringparam' , ' pg.version' , pg_version,
107- ' --param ' , ' website.stylesheet ' , ' 1 '
104+ ' --path ' , ' @OUTDIR@ ' ,
108105 ]
109106
110107 xsltproc = xmltools_wrapper + [
111108 ' --tool' , xsltproc_bin, ' --' ,
112109 ]
113110
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()
114121 html = custom_target (' html' ,
115122 input : [' stylesheet.xsl' , postgres_full_xml],
116123 output : ' html' ,
117124 depfile : ' html.d' ,
118- depends : doc_generated,
119- command : [xsltproc, ' -o' , ' @OUTDIR@/' , xsltproc_flags, ' @INPUT@' ],
125+ command : [xsltproc, ' -o' , ' @OUTDIR@/' , xsltproc_html_flags, ' @INPUT@' ],
120126 build_by_default : false ,
121127 )
122128 alldocs += html
@@ -140,8 +146,7 @@ if xsltproc_bin.found()
140146 input : [' stylesheet-html-nochunk.xsl' , postgres_full_xml],
141147 output : ' postgres.html' ,
142148 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@' ],
145150 build_by_default : false ,
146151 )
147152 alldocs += postgres_html
@@ -151,7 +156,6 @@ if xsltproc_bin.found()
151156 postgres_txt = custom_target (' postgres.txt' ,
152157 input : [postgres_html],
153158 output : ' postgres.txt' ,
154- depends : doc_generated,
155159 command : [pandoc, ' -t' , ' plain' , ' -o' , ' @OUTPUT@' , ' @INPUT@' ],
156160 build_by_default : false ,
157161 )
@@ -164,19 +168,21 @@ endif
164168# INSTALL in html, text
165169#
166170if 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.
167173 install_xml = custom_target (' INSTALL.xml' ,
168174 input : [' standalone-profile.xsl' , ' standalone-install.xml' ],
169175 output : ' INSTALL.xml' ,
170176 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@' ],
173179 build_by_default : false ,
174180 )
175181 install_html = custom_target (' INSTALL.html' ,
176182 input : [' stylesheet-text.xsl' , install_xml],
177183 output : ' INSTALL.html' ,
178184 depfile : ' INSTALL.html.d' ,
179- command : [xsltproc, ' --path ' , ' @OUTDIR@ ' , ' - o' , ' @OUTPUT@' , xsltproc_flags , ' @INPUT@' ],
185+ command : [xsltproc, ' -o' , ' @OUTPUT@' , xsltproc_html_flags , ' @INPUT@' ],
180186 build_by_default : false ,
181187 )
182188 alldocs += install_html
@@ -204,8 +210,7 @@ if xsltproc_bin.found()
204210 input : [' stylesheet-man.xsl' , postgres_full_xml],
205211 output : [' man1' , ' man3' , ' man7' ],
206212 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@' ],
209214 build_by_default : false ,
210215 )
211216 alldocs += man
@@ -229,7 +234,9 @@ endif
229234# Full documentation as PDF
230235#
231236if 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+ ]
233240
234241 foreach format, detail : {' A4' : ' A4' , ' US' : ' USletter' }
235242 postgres_x_fo_f = ' postgres-@0@.fo' .format(format)
@@ -239,9 +246,8 @@ if fop.found() and xsltproc_bin.found()
239246 postgres_x_fo = custom_target (postgres_x_fo_f,
240247 input : [' stylesheet-fo.xsl' , postgres_full_xml],
241248 output : postgres_x_fo_f,
242- depends : doc_generated,
243249 depfile : postgres_x_fo_dep,
244- command : [xsltproc, ' --path ' , ' @OUTDIR@/ ' , xsltproc_fo_flags,
250+ command : [xsltproc, xsltproc_fo_flags,
245251 ' --stringparam' , ' paper.type' , detail,
246252 ' -o' , ' @OUTPUT@' , ' @INPUT@' ],
247253 build_by_default : false ,
0 commit comments