diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2017-04-20 12:30:18 -0400 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-04-21 13:01:36 +0300 |
commit | 1c8e9fc7aed01f55cb94a8997127ebf85af26000 (patch) | |
tree | 63a49a05097d90e1a28f1a71f0af866964a6c846 | |
parent | 6c500fd9dba82e45c1f1fd4ce8fb7dd99e8e80ce (diff) | |
download | meson-1c8e9fc7aed01f55cb94a8997127ebf85af26000.zip meson-1c8e9fc7aed01f55cb94a8997127ebf85af26000.tar.gz meson-1c8e9fc7aed01f55cb94a8997127ebf85af26000.tar.bz2 |
Stricter evaluation of deps. Closes #1648.
-rw-r--r-- | mesonbuild/modules/gnome.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index 6921472..b4dfd12 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -253,6 +253,8 @@ class GnomeModule(ExtensionModule): missing_basename = os.path.basename(missing) for dep in dependencies: + if hasattr(dep, 'held_object'): + dep = dep.held_object if isinstance(dep, mesonlib.File): if dep.fname == missing_basename: found = True @@ -260,18 +262,20 @@ class GnomeModule(ExtensionModule): dep_files.append(dep) subdirs.append(dep.subdir) break - elif isinstance(dep, interpreter.CustomTargetHolder): - if dep.held_object.get_basename() == missing_basename: + elif isinstance(dep, build.CustomTarget): + if dep.get_basename() == missing_basename: found = True dep_files.remove(missing) dep_files.append( mesonlib.File( is_built=True, - subdir=dep.held_object.get_subdir(), - fname=dep.held_object.get_basename())) - depends.append(dep.held_object) - subdirs.append(dep.held_object.get_subdir()) + subdir=dep.get_subdir(), + fname=dep.get_basename())) + depends.append(dep) + subdirs.append(dep.get_subdir()) break + else: + raise RuntimeError('Unreachable code.') if not found: raise MesonException( |