chiark / gitweb /
Drop my copyright headers
[elogind.git] / man / meson.build
index d5e4e90890f333ad65679cf9a7d023a60e9e1d7e..8357f1682df4598a3c53f138193cb61cea99502d 100644 (file)
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: LGPL-2.1+
+
 # This is lame, I know, but meson has no other include mechanism
 subdir('rules')
 
@@ -34,7 +36,7 @@ xslt_cmd = [xsltproc, '-o', '@OUTPUT0@'] + xsltproc_flags
 man_pages = []
 html_pages = []
 source_xml_files = []
-foreach tuple : manpages
+foreach tuple : xsltproc.found() ? manpages : []
         stem = tuple[0]
         section = tuple[1]
         aliases = tuple[2]
@@ -74,7 +76,12 @@ foreach tuple : manpages
                                 output : htmlalias,
                                 command : ['ln', '-fs', html, '@OUTPUT@'])
                         if want_html
-                                dst = join_paths(docdir, 'html', htmlalias)
+#if 0 /// This must be configurable in elogind
+#                                 dst = join_paths(docdir, 'html', htmlalias)
+#else
+                                  dst = get_option('htmldir')
+                                  dst = dst != '' ? dst: join_paths(docdir, 'html', htmlalias)
+#endif // 0
                                 cmd = 'ln -fs @0@ $DESTDIR@1@'.format(html, dst)
                                 meson.add_install_script('sh', '-c', cmd)
                                 p2 += [link]
@@ -121,8 +128,8 @@ elogind_index_xml = custom_target(
         output : 'elogind.index.xml',
         command : [make_man_index_py, '@OUTPUT@'] + nonindex_xml_files)
 
-foreach tuple : [['elogind.directives', '7', elogind_directives_xml],
-                 ['elogind.index',      '7', elogind_index_xml]]
+foreach tuple : want_man or want_html ? [['elogind.directives', '7', elogind_directives_xml],
+                                         ['elogind.index',      '7', elogind_index_xml]] : []
         stem = tuple[0]
         section = tuple[1]
         xml = tuple[2]