[damned-lies] Ignore if/endif sections in meson files
- From: Claude Paroz <claudep src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [damned-lies] Ignore if/endif sections in meson files
- Date: Sat, 27 Jan 2018 14:26:05 +0000 (UTC)
commit 99bc30d9adc46da2d9bd75566c91e172bf6b0503
Author: Claude Paroz <claude 2xlibre net>
Date: Sat Jan 27 15:25:22 2018 +0100
Ignore if/endif sections in meson files
stats/tests/meson-ui.build | 4 ++++
stats/utils.py | 2 ++
2 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/stats/tests/meson-ui.build b/stats/tests/meson-ui.build
index f65ee27..0e920d0 100644
--- a/stats/tests/meson-ui.build
+++ b/stats/tests/meson-ui.build
@@ -1,4 +1,8 @@
i18n = import('i18n')
+if get_option('plugin_uefi_labels')
+meson.add_install_script('make-images.sh')
+endif
+
i18n.gettext(gnomebt_gettext_package + meson.project_name(), preset : 'glib')
install_data('Makefile.in.in')
diff --git a/stats/utils.py b/stats/utils.py
index 8066c1a..5c48e17 100644
--- a/stats/utils.py
+++ b/stats/utils.py
@@ -171,6 +171,8 @@ class MesonfileWrapper(MakefileWrapper):
r'\1=',
content
)
+ # ignore if/endif sections
+ content = re.sub(r"^if .*endif$", '', content, flags=re.M | re.S)
content = content.replace('true', 'True').replace('false', 'False').replace("i18n = import('i18n')",
'')
return content
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]