[gnome-usage] build: Make string concatenation in names



commit 473052562cd6086369f6ffb3747e814624ca6ecb
Author: Iñigo Martínez <inigomartinez gmail com>
Date:   Wed Dec 20 13:44:12 2017 +0100

    build: Make string concatenation in names
    
    Some files has their name duplicated because the final name of
    their names after some process if a slight variation.
    
    This has been changed for a variable which allows avoiding any
    duplication of their names which makes it less error prone.
    
    This also allows to have target names equal to their final file
    names.

 data/meson.build | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)
---
diff --git a/data/meson.build b/data/meson.build
index e9e505a..b8fa0c6 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -12,29 +12,35 @@ resource_data = files(
   'ui/swap-speedometer.ui'
 )
 
+gresource = 'org.gnome.Usage'
+
 resources = gnome.compile_resources(
-  'org.gnome.Usage',
-  'org.gnome.Usage.gresource.xml',
+  gresource,
+  gresource + '.gresource.xml',
   c_name: 'resources',
   dependencies: resource_data
 )
 
 install_data('org.gnome.Usage.gschema.xml', install_dir : get_option('datadir') + '/glib-2.0/schemas/')
 
+desktop = 'org.gnome.Usage.desktop'
+
 i18n.merge_file(
-  'desktop-file',
+  desktop,
   type: 'desktop',
-  input: 'org.gnome.Usage.desktop.in',
-  output: 'org.gnome.Usage.desktop',
+  input: desktop + '.in',
+  output: desktop,
   po_dir: po_dir,
   install: true,
   install_dir: join_paths(get_option('datadir'), 'applications')
 )
 
+appdata = 'org.gnome.Usage.appdata.xml'
+
 i18n.merge_file(
-  'appdata-file',
-  input: 'org.gnome.Usage.appdata.xml.in',
-  output: 'org.gnome.Usage.appdata.xml',
+  appdata,
+  input: appdata + '.in',
+  output: appdata,
   po_dir: po_dir,
   install: true,
   install_dir: join_paths(get_option('datadir'), 'metainfo')


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