aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2016-04-07 18:23:46 +0100
committerJussi Pakkanen <jpakkane@gmail.com>2016-04-07 20:23:46 +0300
commit3b5dcdbd42f21bce3f7ca4036d9bd3bb44897b17 (patch)
tree24e0c3fe227db73e8024831364b2182d12d7cefe
parentcab5ce4fc0eeee6024632cfb3815a7b6e3b70885 (diff)
downloadmeson-3b5dcdbd42f21bce3f7ca4036d9bd3bb44897b17.zip
meson-3b5dcdbd42f21bce3f7ca4036d9bd3bb44897b17.tar.gz
meson-3b5dcdbd42f21bce3f7ca4036d9bd3bb44897b17.tar.bz2
gnome: only print warning when gresource-related functionality is used (#510)
It's confusing to print this when using stuff that works just fine.
-rw-r--r--mesonbuild/modules/gnome.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
index f0de363..39a6ff7 100644
--- a/mesonbuild/modules/gnome.py
+++ b/mesonbuild/modules/gnome.py
@@ -23,10 +23,21 @@ from .. import mlog
from .. import mesonlib
girwarning_printed = False
+gresource_warning_printed = False
class GnomeModule:
+ def __print_gresources_warning(self):
+ global gresource_warning_printed
+ if not gresource_warning_printed:
+ mlog.log('Warning, glib compiled dependencies will not work reliably until this upstream issue is fixed:',
+ mlog.bold('https://bugzilla.gnome.org/show_bug.cgi?id=745754'))
+ gresource_warning_printed = True
+ return []
+
def compile_resources(self, state, args, kwargs):
+ self.__print_gresources_warning()
+
cmd = ['glib-compile-resources', '@INPUT@']
source_dirs = kwargs.pop('source_dir', [])
@@ -59,6 +70,8 @@ class GnomeModule:
return [target_c, target_h]
def get_gresource_dependencies(self, state, input_file, source_dirs):
+ self.__print_gresources_warning()
+
cmd = ['glib-compile-resources',
input_file,
'--generate-dependencies']
@@ -314,8 +327,6 @@ class GnomeModule:
return build.CustomTarget(namebase + '-gdbus', state.subdir, custom_kwargs)
def initialize():
- mlog.log('Warning, glib compiled dependencies will not work reliably until this upstream issue is fixed:',
- mlog.bold('https://bugzilla.gnome.org/show_bug.cgi?id=745754'))
return GnomeModule()
class GirTarget(build.CustomTarget):