[gimp/meson: 799/805] Remove most run_command calls (and bash calls). Helps having a better ninja dependencies tree.
- From: Félix Piédallu <fpiedallu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/meson: 799/805] Remove most run_command calls (and bash calls). Helps having a better ninja dependencies tree.
- Date: Fri, 2 Feb 2018 15:25:18 +0000 (UTC)
commit d93b1e91bf3d0669a40e9087af4f5072820888d4
Author: Félix Piédallu <felix piedallu me>
Date: Fri Feb 2 10:58:31 2018 +0100
Remove most run_command calls (and bash calls).
Helps having a better ninja dependencies tree.
cursors/meson.build | 21 +++++++++++----------
icons/Color/meson.build | 22 ++++++++++++----------
icons/Legacy/meson.build | 22 ++++++++++++----------
icons/Symbolic-Inverted/meson.build | 22 ++++++++++++----------
icons/Symbolic/meson.build | 22 ++++++++++++----------
plug-ins/pagecurl/meson.build | 12 +++++++-----
6 files changed, 66 insertions(+), 55 deletions(-)
---
diff --git a/cursors/meson.build b/cursors/meson.build
index d42a3d4..d563f1b 100644
--- a/cursors/meson.build
+++ b/cursors/meson.build
@@ -77,13 +77,14 @@ tool_cursors = [
'tool-zoom.png',
]
-color_picker_cursors = [ 'cursor-color-picker.png', ]
+color_picker_cursors = [
+ 'cursor-color-picker.png',
+]
# Build xml files, in source dir, at Meson-runtime
# TODO : versionning, or write in build dir
cursors_resourcename = 'gimp-tool-cursors'
-cursors_xml = cursors_resourcename + '.gresource.xml'
cursors_xml_content = '<?xml version="1.0" encoding="UTF-8"?>\n'
cursors_xml_content += '<gresources>\n'
cursors_xml_content += ' <gresource prefix="/org/gimp/tool-cursors">\n'
@@ -93,14 +94,14 @@ 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',
+cursors_xml = configure_file(
+ output: cursors_resourcename + '.gresource.xml',
+ command: [ 'echo', cursors_xml_content ],
+ capture: true,
)
pickers_resourcename = 'gimp-color-picker-cursors'
-pickers_xml = pickers_resourcename + '.gresource.xml'
pickers_xml_content = '<?xml version="1.0" encoding="UTF-8"?>\n'
pickers_xml_content += '<gresources>\n'
pickers_xml_content += ' <gresource prefix="/org/gimp/color-picker-cursors">\n'
@@ -115,12 +116,12 @@ 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',
+pickers_xml = configure_file(
+ output: pickers_resourcename + '.gresource.xml',
+ command: [ 'echo', pickers_xml_content ],
+ capture: true,
)
-
cursors_sources = gnome.compile_resources(
cursors_resourcename,
cursors_xml,
diff --git a/icons/Color/meson.build b/icons/Color/meson.build
index a2bd971..c11d083 100644
--- a/icons/Color/meson.build
+++ b/icons/Color/meson.build
@@ -16,7 +16,6 @@ icons_core = [ '64/gimp-question.png', ]
icons_imgs = [ '64/gimp-wilber-eek.png', ]
resourcename = 'gimp-core-pixbufs'
-xml_filename = resourcename + '.gresource.xml'
xml_content = '<?xml version="1.0" encoding="UTF-8"?>\n'
xml_content += '<gresources>\n'
xml_content += ' <gresource prefix="/org/gimp/icons">\n'
@@ -25,19 +24,20 @@ foreach file : icons_core
endforeach
xml_content += ' </gresource>\n'
xml_content += '</gresources>\n'
-run_command('bash', '-c',
- 'cat <<EOS > '+ join_paths(meson.current_source_dir(), xml_filename) +'\n'
- + xml_content + '\nEOS',
+
+xml_file = configure_file(
+ output: resourcename + '.gresource.xml',
+ command: [ 'echo', xml_content ],
+ capture: true,
)
icons_core_sources = gnome.compile_resources(
resourcename,
- xml_filename,
+ xml_file,
c_name: resourcename.underscorify(),
)
resourcename = 'gimp-icon-pixbufs'
-xml_filename = resourcename + '.gresource.xml'
xml_content = '<?xml version="1.0" encoding="UTF-8"?>\n'
xml_content += '<gresources>\n'
xml_content += ' <gresource prefix="/org/gimp/icons">\n'
@@ -46,12 +46,14 @@ foreach file : icons_imgs
endforeach
xml_content += ' </gresource>\n'
xml_content += '</gresources>\n'
-run_command('bash', '-c',
- 'cat <<EOS > '+ join_paths(meson.current_source_dir(), xml_filename) +'\n'
- + xml_content + '\nEOS',
+
+xml_file = configure_file(
+ output: resourcename + '.gresource.xml',
+ command: [ 'echo', xml_content ],
+ capture: true,
)
icons_imgs_sources = gnome.compile_resources(
resourcename,
- xml_filename,
+ xml_file,
c_name: resourcename.underscorify(),
)
diff --git a/icons/Legacy/meson.build b/icons/Legacy/meson.build
index 56d9644..43afa81 100644
--- a/icons/Legacy/meson.build
+++ b/icons/Legacy/meson.build
@@ -513,7 +513,6 @@ icons_core = [ '64/gimp-question.png', ]
icons_imgs = [ '64/gimp-wilber-eek.png', ]
resourcename = 'gimp-core-pixbufs'
-xml_filename = resourcename + '.gresource.xml'
xml_content = '<?xml version="1.0" encoding="UTF-8"?>\n'
xml_content += '<gresources>\n'
xml_content += ' <gresource prefix="/org/gimp/icons">\n'
@@ -522,19 +521,20 @@ foreach file : icons_core
endforeach
xml_content += ' </gresource>\n'
xml_content += '</gresources>\n'
-run_command('bash', '-c',
- 'cat <<EOS > '+ join_paths(meson.current_source_dir(), xml_filename) +'\n'
- + xml_content + '\nEOS',
+
+xml_file = configure_file(
+ output: resourcename + '.gresource.xml',
+ command: [ 'echo', xml_content ],
+ capture: true,
)
# icons_core_sources = gnome.compile_resources(
# resourcename,
-# xml_filename,
+# xml_file,
# c_name: resourcename.underscorify(),
# )
resourcename = 'gimp-icon-pixbufs'
-xml_filename = resourcename + '.gresource.xml'
xml_content = '<?xml version="1.0" encoding="UTF-8"?>\n'
xml_content += '<gresources>\n'
xml_content += ' <gresource prefix="/org/gimp/icons">\n'
@@ -543,12 +543,14 @@ foreach file : icons_imgs
endforeach
xml_content += ' </gresource>\n'
xml_content += '</gresources>\n'
-run_command('bash', '-c',
- 'cat <<EOS > '+ join_paths(meson.current_source_dir(), xml_filename) +'\n'
- + xml_content + '\nEOS',
+
+xml_file = configure_file(
+ output: resourcename + '.gresource.xml',
+ command: [ 'echo', xml_content ],
+ capture: true,
)
# icons_imgs_sources = gnome.compile_resources(
# resourcename,
-# xml_filename,
+# xml_file,
# c_name: resourcename.underscorify(),
# )
diff --git a/icons/Symbolic-Inverted/meson.build b/icons/Symbolic-Inverted/meson.build
index 35d9fb1..660075f 100644
--- a/icons/Symbolic-Inverted/meson.build
+++ b/icons/Symbolic-Inverted/meson.build
@@ -27,7 +27,6 @@ icons_core = [ '64/gimp-question.png', ]
icons_imgs = [ '64/gimp-wilber-eek.png', ]
resourcename = 'gimp-core-pixbufs'
-xml_filename = resourcename + '.gresource.xml'
xml_content = '<?xml version="1.0" encoding="UTF-8"?>\n'
xml_content += '<gresources>\n'
xml_content += ' <gresource prefix="/org/gimp/icons">\n'
@@ -36,19 +35,20 @@ foreach file : icons_core
endforeach
xml_content += ' </gresource>\n'
xml_content += '</gresources>\n'
-run_command('bash', '-c',
- 'cat <<EOS > '+ join_paths(meson.current_source_dir(), xml_filename) +'\n'
- + xml_content + '\nEOS',
+
+xml_file = configure_file(
+ output: resourcename + '.gresource.xml',
+ command: [ 'echo', xml_content ],
+ capture: true,
)
# icons_core_sources = gnome.compile_resources(
# resourcename,
-# xml_filename,
+# xml_file,
# c_name: resourcename.underscorify(),
# )
resourcename = 'gimp-icon-pixbufs'
-xml_filename = resourcename + '.gresource.xml'
xml_content = '<?xml version="1.0" encoding="UTF-8"?>\n'
xml_content += '<gresources>\n'
xml_content += ' <gresource prefix="/org/gimp/icons">\n'
@@ -57,12 +57,14 @@ foreach file : icons_imgs
endforeach
xml_content += ' </gresource>\n'
xml_content += '</gresources>\n'
-run_command('bash', '-c',
- 'cat <<EOS > '+ join_paths(meson.current_source_dir(), xml_filename) +'\n'
- + xml_content + '\nEOS',
+
+xml_file = configure_file(
+ output: resourcename + '.gresource.xml',
+ command: [ 'echo', xml_content ],
+ capture: true,
)
# icons_imgs_sources = gnome.compile_resources(
# resourcename,
-# xml_filename,
+# xml_file,
# c_name: resourcename.underscorify(),
# )
diff --git a/icons/Symbolic/meson.build b/icons/Symbolic/meson.build
index 823780d..826126b 100644
--- a/icons/Symbolic/meson.build
+++ b/icons/Symbolic/meson.build
@@ -16,7 +16,6 @@ icons_core = [ '64/gimp-question.png', ]
icons_imgs = [ '64/gimp-wilber-eek.png', ]
resourcename = 'gimp-core-pixbufs'
-xml_filename = resourcename + '.gresource.xml'
xml_content = '<?xml version="1.0" encoding="UTF-8"?>\n'
xml_content += '<gresources>\n'
xml_content += ' <gresource prefix="/org/gimp/icons">\n'
@@ -25,19 +24,20 @@ foreach file : icons_core
endforeach
xml_content += ' </gresource>\n'
xml_content += '</gresources>\n'
-run_command('bash', '-c',
- 'cat <<EOS > '+ join_paths(meson.current_source_dir(), xml_filename) +'\n'
- + xml_content + '\nEOS',
+
+xml_file = configure_file(
+ output: resourcename + '.gresource.xml',
+ command: [ 'echo', xml_content ],
+ capture: true,
)
# icons_core_sources = gnome.compile_resources(
# resourcename,
-# xml_filename,
+# xml_file,
# c_name: resourcename.underscorify(),
# )
resourcename = 'gimp-icon-pixbufs'
-xml_filename = resourcename + '.gresource.xml'
xml_content = '<?xml version="1.0" encoding="UTF-8"?>\n'
xml_content += '<gresources>\n'
xml_content += ' <gresource prefix="/org/gimp/icons">\n'
@@ -46,12 +46,14 @@ foreach file : icons_imgs
endforeach
xml_content += ' </gresource>\n'
xml_content += '</gresources>\n'
-run_command('bash', '-c',
- 'cat <<EOS > '+ join_paths(meson.current_source_dir(), xml_filename) +'\n'
- + xml_content + '\nEOS',
+
+xml_file = configure_file(
+ output: resourcename + '.gresource.xml',
+ command: [ 'echo', xml_content ],
+ capture: true,
)
# icons_imgs_sources = gnome.compile_resources(
# resourcename,
-# xml_filename,
+# xml_file,
# c_name: resourcename.underscorify(),
# )
diff --git a/plug-ins/pagecurl/meson.build b/plug-ins/pagecurl/meson.build
index 261235f..cb76005 100644
--- a/plug-ins/pagecurl/meson.build
+++ b/plug-ins/pagecurl/meson.build
@@ -9,7 +9,6 @@ pagecurl_icons_images = [
'curl7.png',
]
resourcename = 'pagecurl-icons'
-xml_filename = resourcename + '.gresource.xml'
xml_content = '<?xml version="1.0" encoding="UTF-8"?>\n'
xml_content += '<gresources>\n'
xml_content += ' <gresource prefix="/org/gimp/icons">\n'
@@ -18,13 +17,16 @@ foreach file : pagecurl_icons_images
endforeach
xml_content += ' </gresource>\n'
xml_content += '</gresources>\n'
-run_command('bash', '-c',
- 'cat <<EOS > '+ join_paths(meson.current_source_dir(), xml_filename) +'\n'
- + xml_content + '\nEOS',
+
+xml_file = configure_file(
+ output: resourcename + '.gresource.xml',
+ command: [ 'echo', xml_content ],
+ capture: true,
)
+
pagecurl_icons_sources = gnome.compile_resources(
resourcename,
- xml_filename,
+ xml_file,
c_name: resourcename.underscorify(),
)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]