[gimp/meson: 17/128] Add xml for data/tips. Add etc dir.



commit fdaceae7f5313f5c97d17bea02f5134d96beb49b
Author: Félix Piédallu <felix piedallu me>
Date:   Thu Nov 16 11:14:11 2017 +0100

    Add xml for data/tips. Add etc dir.

 data/tags/meson.build |   14 ++++-----
 data/tips/meson.build |   72 ++++++++++++++++++++++++++++++------------------
 etc/meson.build       |   12 ++++++++
 meson.build           |    1 +
 4 files changed, 64 insertions(+), 35 deletions(-)
---
diff --git a/data/tags/meson.build b/data/tags/meson.build
index 0b86aac..66cb848 100644
--- a/data/tags/meson.build
+++ b/data/tags/meson.build
@@ -1,17 +1,15 @@
 
-intltool_merge = find_program('intltool-merge')
-
 xmlfilename = 'gimp-tags-default.xml'
 
 gimp_tags_default = custom_target(xmlfilename,
-  input : xmlfilename+'.in',
-  output: xmlfilename,
+  input : [ xmlfilename+'.in', ],
+  output: [ xmlfilename, ],
 
   command: [
     intltool_merge,
     '--xml-style',
     '--utf8',
-    '--cache=intltool-merge-cache',
+    '--cache='+join_paths('@OUTDIR@', 'intltool-merge-cache'),
     potags_dir,
     '@INPUT@',
     '@OUTPUT@',
@@ -21,9 +19,9 @@ gimp_tags_default = custom_target(xmlfilename,
 )
 
 
-custom_target('validate',
-  input : gimp_tags_default,
-  output: [ 'validate' ],
+custom_target('validate-tags',
+  input : [ gimp_tags_default, ],
+  output: [ 'validate-tags' ],
   command: [
     xmllint,
     '--noout',
diff --git a/data/tips/meson.build b/data/tips/meson.build
index 7d1ab64..168a503 100644
--- a/data/tips/meson.build
+++ b/data/tips/meson.build
@@ -1,30 +1,48 @@
 
-xmlfile = 'gimp-tips.xml'
+xmlfilename = 'gimp-tips.xml'
 
-# i18n.merge_file(xmlfile,
-#   input : xmlfile + '.in',
-#   output: xmlfile,
-#
-#   po_dir: join_paths(meson.source_root(), 'po-tips'),
-#
-#   install: true,
-#   install_dir: join_paths(datadir, 'tips'),
-# )
-#
-#
-# if xsltproc.found()
-#   custom_target('fortunes',
-#     input : [ xmlfile, 'fortunes.xsl', ],
-#     output: 'fortunes',
-#     command: [
-#       xsltproc.path(),
-#       '--stringparam',
-#       'lang', 'en',
-#       '-o', '@OUTPUT@',
-#       '@INPUT1@',
-#     ],
-#     build_by_default: false,
-#   )
-# endif
+gimp_tips = custom_target(xmlfilename,
+  input : [ xmlfilename+'.in', ],
+  output: [ xmlfilename, ],
 
-# TODO
\ No newline at end of file
+  command: [
+    intltool_merge,
+    '--xml-style',
+    '--utf8',
+    '--cache='+join_paths('@OUTDIR@', 'intltool-merge-cache'),
+    potags_dir,
+    '@INPUT@',
+    '@OUTPUT@',
+  ],
+  install: true,
+  install_dir: join_paths(datadir, 'tips'),
+)
+
+
+custom_target('validate-tips',
+  input : [ gimp_tips, ],
+  output: [ 'validate-tips' ],
+  command: [
+    xmllint,
+    '--noout',
+    '--path', join_paths(meson.source_root(), meson.current_source_dir()),
+    '--valid', '@INPUT@',
+  ],
+  build_always: true,
+  build_by_default: false,
+)
+
+custom_target('fortunes-tips',
+  input : [ gimp_tips, 'fortunes.xsl', ],
+  output: [ 'fortunes-tips' ],
+  command: [
+    xsltproc,
+    '--stringparam', 'lang', 'en',
+    '--path', join_paths(meson.source_root(), meson.current_source_dir()),
+    '--output', '@OUTPUT@',
+    '@INPUT1@',
+    '@INPUT0@',
+  ],
+  build_always: true,
+  build_by_default: false,
+)
diff --git a/etc/meson.build b/etc/meson.build
new file mode 100644
index 0000000..4581431
--- /dev/null
+++ b/etc/meson.build
@@ -0,0 +1,12 @@
+install_data(
+  [
+    'controllerrc',
+    'gimprc',
+    'gtkrc',
+    'menurc',
+    'sessionrc',
+    'templaterc',
+    'unitrc',
+  ],
+  install_dir: sysconfdir
+)
diff --git a/meson.build b/meson.build
index 9d05765..d90e33b 100644
--- a/meson.build
+++ b/meson.build
@@ -575,6 +575,7 @@ endif
 # Check for XML tools
 xmllint = find_program('xmllint', required: false)
 xsltproc= find_program('xsltproc',required: false)
+intltool_merge = find_program('intltool-merge')
 
 
 # Check for vector icons


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]