meson: consolidate langs lists
authorEric Engestrom <eric.engestrom@intel.com>
Tue, 28 Aug 2018 16:16:48 +0000 (17:16 +0100)
committerEric Engestrom <eric.engestrom@intel.com>
Thu, 6 Sep 2018 14:22:24 +0000 (15:22 +0100)
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
src/util/xmlpool/meson.build

index 3d2de0cdc3a5fc45d1e4fa15446692e4c31ea2f8..8bdabcb825b776d06182f72e805a1fd87644a153 100644 (file)
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 # SOFTWARE.
 
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 # SOFTWARE.
 
+_langs = ['ca', 'es', 'de', 'nl', 'sv', 'fr']
+
+_langs_po_files = []
+foreach lang : _langs
+  _langs_po_files += files(lang + '.po')
+endforeach
+
 xmlpool_options_h = custom_target(
   'xmlpool_options.h',
   input : ['gen_xmlpool.py', 't_options.h'],
   output : 'options.h',
   command : [
 xmlpool_options_h = custom_target(
   'xmlpool_options.h',
   input : ['gen_xmlpool.py', 't_options.h'],
   output : 'options.h',
   command : [
-    prog_python, '@INPUT@', meson.current_source_dir(),
-    'ca', 'es', 'de', 'nl', 'sv', 'fr',
+    prog_python, '@INPUT@', meson.current_source_dir(), _langs,
   ],
   capture : true,
   ],
   capture : true,
-  depend_files : files('ca.po', 'es.po', 'de.po', 'nl.po', 'sv.po', 'fr.po'),
+  depend_files : _langs_po_files,
 )
 )