[eog: 15/21] build: Use generators placeholders



commit af8d0f8b24c0c193f7d4a7387ae4825485755fdf
Author: Iñigo Martínez <inigomartinez gmail com>
Date:   Fri Jun 28 08:50:42 2019 +0200

    build: Use generators placeholders
    
    Functions derived from generators as `configure_file`,
    `custom_target` and `i18n.merge_file` can use placeholders like
    `@BASENAME@` that removes the extension from the input filename
    string.
    
    The output string has been replaced by this placeholder that
    allows in some cases the use of less variables.

 data/meson.build          | 7 +++----
 doc/reference/meson.build | 6 ++----
 2 files changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/data/meson.build b/data/meson.build
index 16a3d724..44c39ffc 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -18,7 +18,7 @@ desktop = 'eog.desktop'
 
 desktop_in = configure_file(
   input: desktop + '.in.in',
-  output: desktop + '.in',
+  output: '@BASENAME@',
   configuration: {'VERSION': eog_version},
 )
 
@@ -43,11 +43,10 @@ i18n.merge_file(
   install_dir: eog_datadir / 'metainfo',
 )
 
-schema = 'org.gnome.eog.gschema.xml'
 
 configure_file(
-  input: schema + '.in',
-  output: schema,
+  input: 'org.gnome.eog.gschema.xml.in',
+  output: '@BASENAME@',
   configuration: {'GETTEXT_PACKAGE': meson.project_name()},
   install: true,
   install_dir: gio_schemasdir,
diff --git a/doc/reference/meson.build b/doc/reference/meson.build
index 08fc4a7c..f8546421 100644
--- a/doc/reference/meson.build
+++ b/doc/reference/meson.build
@@ -21,11 +21,9 @@ if not enable_libexif
   private_headers += 'eog-exif-util.h'
 endif
 
-version_xml = 'version.xml'
-
 configure_file(
-  input: version_xml + '.in',
-  output: version_xml,
+  input: 'version.xml.in',
+  output: '@BASENAME@',
   configuration: {'VERSION': eog_version},
 )
 


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