diff options
-rw-r--r-- | mesonbuild/backend/ninjabackend.py | 8 | ||||
-rw-r--r-- | mesonbuild/build.py | 2 | ||||
-rw-r--r-- | test cases/common/171 not-found dependency/meson.build | 5 | ||||
-rw-r--r-- | test cases/common/171 not-found dependency/sub/meson.build | 1 | ||||
-rw-r--r-- | test cases/common/171 not-found dependency/testlib.c | 0 |
5 files changed, 12 insertions, 4 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index 1057892..85ed232 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -42,8 +42,12 @@ def ninja_quote(text): for char in ('$', ' ', ':'): text = text.replace(char, '$' + char) if '\n' in text: - raise MesonException('Ninja does not support newlines in rules. ' - 'Please report this error with a test case to the Meson bug tracker.') + errmsg = '''Ninja does not support newlines in rules. The content was: + +%s + +Please report this error with a test case to the Meson bug tracker.''' % text + raise MesonException(errmsg) return text diff --git a/mesonbuild/build.py b/mesonbuild/build.py index 4a35bec..8a2e716 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -839,7 +839,7 @@ This will become a hard error in a future Meson release.''') self.external_deps.append(extpart) # Deps of deps. self.add_deps(dep.ext_deps) - elif isinstance(dep, dependencies.ExternalDependency): + elif isinstance(dep, dependencies.Dependency): self.external_deps.append(dep) self.process_sourcelist(dep.get_sources()) elif isinstance(dep, BuildTarget): diff --git a/test cases/common/171 not-found dependency/meson.build b/test cases/common/171 not-found dependency/meson.build index 7d92f5a..85505ee 100644 --- a/test cases/common/171 not-found dependency/meson.build +++ b/test cases/common/171 not-found dependency/meson.build @@ -1,4 +1,4 @@ -project('dep-test') +project('dep-test', 'c') dep = dependency('', required:false) if dep.found() @@ -6,3 +6,6 @@ if dep.found() endif assert(dep.type_name() == 'not-found', 'dependency should be of type "not-found" not ' + dep.type_name()) + +library('testlib', 'testlib.c', dependencies: [dep]) +subdir('sub', if_found: dep) diff --git a/test cases/common/171 not-found dependency/sub/meson.build b/test cases/common/171 not-found dependency/sub/meson.build new file mode 100644 index 0000000..2a33cae --- /dev/null +++ b/test cases/common/171 not-found dependency/sub/meson.build @@ -0,0 +1 @@ +error('should be disabled by subdir(if_found:)') diff --git a/test cases/common/171 not-found dependency/testlib.c b/test cases/common/171 not-found dependency/testlib.c new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test cases/common/171 not-found dependency/testlib.c |