aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael James Gratton <mike@vee.net>2017-12-12 17:51:31 +1100
committerJussi Pakkanen <jpakkane@gmail.com>2017-12-13 21:31:32 +0200
commit93c988b45384cb141b592995eebeba954bd36cb6 (patch)
tree2e0db10b055cd396796245cc00570395d819cfb1
parentd946b03496a41ebd878a6c40fa3fca1c74a1e654 (diff)
downloadmeson-93c988b45384cb141b592995eebeba954bd36cb6.zip
meson-93c988b45384cb141b592995eebeba954bd36cb6.tar.gz
meson-93c988b45384cb141b592995eebeba954bd36cb6.tar.bz2
Enable re-compilation of GNOME gschema files if they have changed.
* mesonbuild/modules/gnome.py (GnomeModule.compile_schemas): Allow the depend_files kwarg. * docs/markdown/Gnome-module.md: Add docs for new kwarg (and the only other one that is permitted).
-rw-r--r--docs/markdown/Gnome-module.md7
-rw-r--r--mesonbuild/modules/gnome.py2
2 files changed, 8 insertions, 1 deletions
diff --git a/docs/markdown/Gnome-module.md b/docs/markdown/Gnome-module.md
index 738e2a9..b33009d 100644
--- a/docs/markdown/Gnome-module.md
+++ b/docs/markdown/Gnome-module.md
@@ -196,6 +196,13 @@ When called, this method will compile the gschemas in the current
directory. Note that this is not for installing schemas and is only
useful when running the application locally for example during tests.
+* `build_by_default`: causes, when set to true, to have this target be
+ built by default, that is, when invoking plain `ninja`, the default
+ value is true for all built target types
+* `depend_files`: files ([`string`](#string-object),
+ [`files()`](#files), or [`configure_file()`](#configure_file)) of
+ schema source XML files that should trigger a re-compile if changed.
+
### gnome.gdbus_codegen()
Compiles the given XML schema into gdbus source code. Takes two
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
index 56765a5..7a01abc 100644
--- a/mesonbuild/modules/gnome.py
+++ b/mesonbuild/modules/gnome.py
@@ -626,7 +626,7 @@ class GnomeModule(ExtensionModule):
rv = [scan_target, typelib_target]
return ModuleReturnValue(rv, rv)
- @permittedKwargs({'build_by_default'})
+ @permittedKwargs({'build_by_default', 'depend_files'})
def compile_schemas(self, state, args, kwargs):
if args:
raise MesonException('Compile_schemas does not take positional arguments.')