diff options
-rw-r--r-- | mesonbuild/build.py | 7 | ||||
-rw-r--r-- | mesonbuild/mintro.py | 8 |
2 files changed, 10 insertions, 5 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py index 5a243a4..91edbb8 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -2122,7 +2122,12 @@ class RunTarget(Target): return self.name def get_outputs(self): - return [self.name] + if isinstance(self.name, str): + return [self.name] + elif isinstance(self.name, list): + return self.name + else: + raise RuntimeError('RunTarget: self.name is neither a list nor a string. This is a bug') def type_suffix(self): return "@run" diff --git a/mesonbuild/mintro.py b/mesonbuild/mintro.py index 4a20e6b..9444b96 100644 --- a/mesonbuild/mintro.py +++ b/mesonbuild/mintro.py @@ -84,14 +84,14 @@ def list_targets(builddata: build.Build, installdata, backend: backends.Backend) tlist = [] # Fast lookup table for installation files - intall_lookuptable = {} + install_lookuptable = {} for i in installdata.targets: outname = os.path.join(installdata.prefix, i.outdir, os.path.basename(i.fname)) - intall_lookuptable[os.path.basename(i.fname)] = str(pathlib.PurePath(outname)) + install_lookuptable[os.path.basename(i.fname)] = str(pathlib.PurePath(outname)) for (idname, target) in builddata.get_targets().items(): if not isinstance(target, build.Target): - raise RuntimeError('Something weird happened. File a bug.') + raise RuntimeError('The target object in `builddata.get_targets()` is not of type `build.Target`. Please file a bug with this error message.') fname = [os.path.join(target.subdir, x) for x in target.get_outputs()] @@ -107,7 +107,7 @@ def list_targets(builddata: build.Build, installdata, backend: backends.Backend) if installdata and target.should_install(): t['installed'] = True # TODO Change this to the full list in a seperate PR - t['install_filename'] = [intall_lookuptable.get(x, None) for x in target.get_outputs()][0] + t['install_filename'] = [install_lookuptable.get(x, None) for x in target.get_outputs()][0] else: t['installed'] = False tlist.append(t) |