@@ -61,18 +61,9 @@ foreach tuple : manpages
6161 install_dir : mandirn)
6262 man_pages += [p1]
6363
64- p2 = custom_target (
65- html,
66- input : xml,
67- output : html,
68- command : xslt_cmd + [custom_html_xsl, ' @INPUT@' ],
69- depend_files : custom_entities_ent,
70- install : want_html,
71- install_dir : join_paths (docdir, ' html' ))
72- html_pages += [p2]
73-
64+ p2 = []
7465 foreach htmlalias : htmlaliases
75- p3 = custom_target (
66+ link = custom_target (
7667 htmlalias,
7768 input : p2,
7869 output : htmlalias,
@@ -81,10 +72,22 @@ foreach tuple : manpages
8172 dst = join_paths (docdir, ' html' , htmlalias)
8273 cmd = ' ln -fs @0@ $DESTDIR@1@' .format(html, dst)
8374 meson .add_install_script(' sh' , ' -c' , cmd)
75+ p2 += [link]
8476 endif
85- html_pages += [p3 ]
77+ html_pages += [link ]
8678 endforeach
8779
80+ p3 = custom_target (
81+ html,
82+ input : xml,
83+ output : html,
84+ command : xslt_cmd + [custom_html_xsl, ' @INPUT@' ],
85+ depend_files : custom_entities_ent,
86+ depends : p2,
87+ install : want_html,
88+ install_dir : join_paths (docdir, ' html' ))
89+ html_pages += [p3]
90+
8891 source_xml_files += files (tuple[0 ] + ' .xml' )
8992 else
9093 message (' Skipping @0@.@1@ because @2@ is false' .format(stem, section, condition))
@@ -131,18 +134,10 @@ foreach tuple : [['systemd.directives', '7', systemd_directives_xml],
131134 install_dir : mandirn)
132135 man_pages += [p1]
133136
134- p2 = custom_target (
135- html,
136- input : xml,
137- output : html,
138- command : xslt_cmd + [custom_html_xsl, ' @INPUT@' ],
139- install : want_html and have_lxml,
140- install_dir : join_paths (docdir, ' html' ))
141- html_pages += [p2]
142-
137+ p2 = []
143138 if html == ' systemd.index.html'
144139 htmlalias = ' index.html'
145- p3 = custom_target (
140+ link = custom_target (
146141 htmlalias,
147142 input : p2,
148143 output : htmlalias,
@@ -151,9 +146,21 @@ foreach tuple : [['systemd.directives', '7', systemd_directives_xml],
151146 dst = join_paths (docdir, ' html' , htmlalias)
152147 cmd = ' ln -fs @0@ $DESTDIR@1@' .format(html, dst)
153148 meson .add_install_script(' sh' , ' -c' , cmd)
149+ p2 += [link]
154150 endif
155- html_pages += [p3 ]
151+ html_pages += [link ]
156152 endif
153+
154+ p3 = custom_target (
155+ html,
156+ input : xml,
157+ output : html,
158+ command : xslt_cmd + [custom_html_xsl, ' @INPUT@' ],
159+ depend_files : custom_entities_ent,
160+ depends : p2,
161+ install : want_html and have_lxml,
162+ install_dir : join_paths (docdir, ' html' ))
163+ html_pages += [p3]
157164endforeach
158165
159166# cannot use run_target until https://github.com/mesonbuild/meson/issues/1644 is resolved
0 commit comments