[eog] build: Create msgfmt command before loop



commit 9e2073b1563f9153f5409b88f642f818147d8be7
Author: Iñigo Martínez <inigomartinez gmail com>
Date:   Fri Feb 23 13:41:32 2018 +0100

    build: Create msgfmt command before loop
    
    A custom command is used for merging translations with `msgfmt` in
    loop that iterates over the available plugins.
    
    The command is used without any modifications on each loop iteration
    so it can be created before entering the loop to avoid creating it
    every iteration.

 plugins/meson.build |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/plugins/meson.build b/plugins/meson.build
index bf49ba0..73cffb6 100644
--- a/plugins/meson.build
+++ b/plugins/meson.build
@@ -1,4 +1,12 @@
-msgfmt = find_program('msgfmt')
+msgfmt_plugin_cmd = [
+  find_program('msgfmt'),
+  '--desktop',
+  '--keyword=Name',
+  '--keyword=Description',
+  '--template=@INPUT@',
+  '-d', po_dir,
+  '--output=@OUTPUT@'
+]
 
 plugins = [
   'fullscreen',
@@ -27,7 +35,7 @@ foreach plugin: plugins
     plugin_data,
     input: '@0@/@1  desktop in'.format(plugin, plugin_data),
     output: plugin_data,
-    command: [msgfmt, '--desktop', '--keyword=Name', '--keyword=Description', '--template', '@INPUT@', '-d', 
po_dir, '-o', '@OUTPUT@'],
+    command: msgfmt_plugin_cmd,
     install: true,
     install_dir: eog_pluginsdir
   )


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