[dia: 31/105] #19: s/DBMAN/DB2MAN/ and only call xsltproc and dblatex if found.
- From: Zander <zbrown src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia: 31/105] #19: s/DBMAN/DB2MAN/ and only call xsltproc and dblatex if found.
- Date: Mon, 28 Jan 2019 19:21:56 +0000 (UTC)
commit 3cbcd19f40bd30fac38ffd21a9c7a2c4e15d32df
Author: Eduard Nicodei <eddnicodei gmail com>
Date: Tue Dec 25 22:08:33 2018 +0000
#19: s/DBMAN/DB2MAN/ and only call xsltproc and dblatex if found.
- This reduces the number of _required_ dependencies.
doc/en/meson.build | 62 +++++++++++++++++++++++++++++++++++++++++-------------
doc/meson.build | 3 ++-
2 files changed, 49 insertions(+), 16 deletions(-)
---
diff --git a/doc/en/meson.build b/doc/en/meson.build
index bb9f7372..836f3077 100644
--- a/doc/en/meson.build
+++ b/doc/en/meson.build
@@ -1,17 +1,49 @@
-# TODO: we need to generate dependecies for dia.xml.
-doc_pdf = custom_target('dia.pdf',
- output : 'dia.pdf',
- input : 'dia.xml',
- command : [dblatex, '-t', 'pdf', '-q', '-o', '@OUTPUT@', '@INPUT@'],
- install : true,
- install_dir : 'doc'
+docdir = join_paths(
+ get_option('datadir'),
+ 'doc',
+ meson.project_name()
)
-xsltproc = find_program('xsltproc')
-manpage = custom_target('dia.1',
- output : 'dia.1',
- input : 'dia.dbk',
- command : [xsltproc, '--novalid', '--output', '@OUTPUT@', DBMAN, '@INPUT@'],
- install : true,
- install_dir : 'doc'
-)
+dia_xml_deps = [
+ 'authors.xml',
+ 'custom-shapes.xml',
+ 'dia-1.xml',
+ 'dia-cmdline.xml',
+ 'dia.xml',
+ 'entities.xml',
+ 'intro.xml',
+ 'license.xml',
+ 'usage-canvas.xml',
+ 'usage-customization.xml',
+ 'usage-layers.xml',
+ 'usage-loadsave.xml',
+ 'usage-objects-basic.xml',
+ 'usage-objects-selecting.xml',
+ 'usage-objects-special.xml',
+ 'usage-objects.xml',
+ 'usage-quickstart.xml',
+]
+
+if dblatex.found()
+ custom_target('dia.pdf',
+ output : 'dia.pdf',
+ input : 'dia.xml',
+ depend_files : dia_xml_deps,
+ command : [dblatex, '-t', 'pdf', '-q', '-o', '@OUTPUT@', '@INPUT@'],
+ install : true,
+ install_dir : docdir
+ )
+endif
+
+if xsltproc.found()
+ dia_man = custom_target('dia.1',
+ output : 'dia.1',
+ input : 'dia.dbk',
+ command : [xsltproc, '--novalid', '--output', '@OUTPUT@', DB2MAN, '@INPUT@'],
+ install : true,
+ install_dir : join_paths(get_option('mandir'), 'man1')
+ )
+ # XXX: this should fixed in meson: https://github.com/mesonbuild/meson/issues/1550
+ #install_data(dia_man)
+
+endif
diff --git a/doc/meson.build b/doc/meson.build
index d2062cf1..9a701080 100644
--- a/doc/meson.build
+++ b/doc/meson.build
@@ -1,6 +1,7 @@
dblatex = find_program('dblatex')
+xsltproc = find_program('xsltproc')
-DBMAN = 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl'
+DB2MAN = 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl'
subdir('en')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]