[gimp/meson: 55/127] Use custom_target with capture instead of bash cat pipes run_command.



commit ae946e1884c72c7808d96be9b73f6e3efb7228b1
Author: Félix Piédallu <felix piedallu me>
Date:   Thu Jan 4 14:33:15 2018 +0100

    Use custom_target with capture instead of bash cat pipes run_command.

 cursors/meson.build |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/cursors/meson.build b/cursors/meson.build
index d42a3d4..c7de5c4 100644
--- a/cursors/meson.build
+++ b/cursors/meson.build
@@ -93,9 +93,11 @@ endforeach
 cursors_xml_content += '  </gresource>\n'
 cursors_xml_content += '</gresources>\n'
 
-run_command('bash', '-c',
-  'cat <<EOS > '+ join_paths(meson.current_source_dir(), cursors_xml) +'\n'
-  + cursors_xml_content + '\nEOS',
+custom_target(cursors_xml,
+  input : [],
+  output: cursors_xml,
+  command: [ 'echo', cursors_xml_content + '\n' ],
+  capture: true,
 )
 
 
@@ -115,9 +117,11 @@ endforeach
 pickers_xml_content += '  </gresource>\n'
 pickers_xml_content += '</gresources>\n'
 
-run_command('bash', '-c',
-  'cat <<EOS >'+ join_paths(meson.current_source_dir(), pickers_xml) +'\n'
-  + pickers_xml_content + '\nEOS',
+custom_target(pickers_xml,
+  input : [],
+  output: pickers_xml,
+  command: [ 'echo', pickers_xml_content + '\n' ],
+  capture: true,
 )
 
 


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