diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2021-10-28 10:53:26 -0700 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2021-10-29 11:31:58 +0530 |
commit | 5066751b57f6999b6996e29e242d6b1614598bb7 (patch) | |
tree | a2eebd803176a314ffdd444140ac976a389789fb | |
parent | c9adc066997eb1ac7d0b0b7de5f79acf8b89592e (diff) | |
download | meson-5066751b57f6999b6996e29e242d6b1614598bb7.zip meson-5066751b57f6999b6996e29e242d6b1614598bb7.tar.gz meson-5066751b57f6999b6996e29e242d6b1614598bb7.tar.bz2 |
modules/gnome: fix missing install_dir, again, harder
It turns out this could be missing in GResource*Target as well, due
mostly to the same problem, side effects of mutating a shared
dictionary; though it could also happen with a specific set of keywords
given and other omitted.
Fixes #9350
-rw-r--r-- | mesonbuild/modules/gnome.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index 4b3107e..e825981 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -278,18 +278,20 @@ class GnomeModule(ExtensionModule): if install_header and not export: raise MesonException('GResource header is installed yet export is not enabled') - kwargs['input'] = args[1] - kwargs['output'] = output - kwargs['depends'] = depends + c_kwargs = kwargs.copy() + c_kwargs['input'] = args[1] + c_kwargs['output'] = output + c_kwargs['depends'] = depends + c_kwargs.setdefault('install_dir', []) if not mesonlib.version_compare(glib_version, gresource_dep_needed_version): # This will eventually go out of sync if dependencies are added - kwargs['depend_files'] = depend_files - kwargs['command'] = cmd + c_kwargs['depend_files'] = depend_files + c_kwargs['command'] = cmd else: depfile = f'{output}.d' - kwargs['depfile'] = depfile - kwargs['command'] = copy.copy(cmd) + ['--dependency-file', '@DEPFILE@'] - target_c = GResourceTarget(name, state.subdir, state.subproject, kwargs) + c_kwargs['depfile'] = depfile + c_kwargs['command'] = copy.copy(cmd) + ['--dependency-file', '@DEPFILE@'] + target_c = GResourceTarget(name, state.subdir, state.subproject, c_kwargs) if gresource: # Only one target for .gresource files return ModuleReturnValue(target_c, [target_c]) |