The symlinks should be created in the build directory in two cases: when
configuration specifies -Dhtml=true, or when ninja html target is built.
Normally install : {true,false} is used to decide if a target should be built,
but in this case, we cannot use install : true, because, as described in
488477d101, that results in the target file being copied into the
installation directory instead of a symlink. So we need a work-around. To
achieve the first end, the commands to create the symlinks are added as
dependencies of the command to create the html page. To the second end, they
are added as dependencies of the html target.
Follow-up for
488477d101 and
064d9ef0d7.
install_dir : mandirn)
man_pages += [p1]
install_dir : mandirn)
man_pages += [p1]
- p2 = custom_target(
- html,
- input : xml,
- output : html,
- command : xslt_cmd + [custom_html_xsl, '@INPUT@'],
- depend_files : custom_entities_ent,
- install : want_html,
- install_dir : join_paths(docdir, 'html'))
- html_pages += [p2]
-
foreach htmlalias : htmlaliases
foreach htmlalias : htmlaliases
htmlalias,
input : p2,
output : htmlalias,
htmlalias,
input : p2,
output : htmlalias,
dst = join_paths(docdir, 'html', htmlalias)
cmd = 'ln -fs @0@ $DESTDIR@1@'.format(html, dst)
meson.add_install_script('sh', '-c', cmd)
dst = join_paths(docdir, 'html', htmlalias)
cmd = 'ln -fs @0@ $DESTDIR@1@'.format(html, dst)
meson.add_install_script('sh', '-c', cmd)
+ p3 = custom_target(
+ html,
+ input : xml,
+ output : html,
+ command : xslt_cmd + [custom_html_xsl, '@INPUT@'],
+ depend_files : custom_entities_ent,
+ depends : p2,
+ install : want_html,
+ install_dir : join_paths(docdir, 'html'))
+ html_pages += [p3]
+
source_xml_files += files(tuple[0] + '.xml')
else
message('Skipping @0@.@1@ because @2@ is false'.format(stem, section, condition))
source_xml_files += files(tuple[0] + '.xml')
else
message('Skipping @0@.@1@ because @2@ is false'.format(stem, section, condition))
install_dir : mandirn)
man_pages += [p1]
install_dir : mandirn)
man_pages += [p1]
- p2 = custom_target(
- html,
- input : xml,
- output : html,
- command : xslt_cmd + [custom_html_xsl, '@INPUT@'],
- install : want_html and have_lxml,
- install_dir : join_paths(docdir, 'html'))
- html_pages += [p2]
-
if html == 'systemd.index.html'
htmlalias = 'index.html'
if html == 'systemd.index.html'
htmlalias = 'index.html'
htmlalias,
input : p2,
output : htmlalias,
htmlalias,
input : p2,
output : htmlalias,
dst = join_paths(docdir, 'html', htmlalias)
cmd = 'ln -fs @0@ $DESTDIR@1@'.format(html, dst)
meson.add_install_script('sh', '-c', cmd)
dst = join_paths(docdir, 'html', htmlalias)
cmd = 'ln -fs @0@ $DESTDIR@1@'.format(html, dst)
meson.add_install_script('sh', '-c', cmd)
+
+ p3 = custom_target(
+ html,
+ input : xml,
+ output : html,
+ command : xslt_cmd + [custom_html_xsl, '@INPUT@'],
+ depend_files : custom_entities_ent,
+ depends : p2,
+ install : want_html and have_lxml,
+ install_dir : join_paths(docdir, 'html'))
+ html_pages += [p3]
endforeach
# cannot use run_target until https://github.com/mesonbuild/meson/issues/1644 is resolved
endforeach
# cannot use run_target until https://github.com/mesonbuild/meson/issues/1644 is resolved