diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2022-09-01 00:59:41 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2023-03-20 17:22:50 -0400 |
commit | a024d75e150334330954bf7a6fdbe8cb02a82491 (patch) | |
tree | 0504f3471f335d79d994d9f68028233f95f38bb5 /mesonbuild/interpreter/interpreter.py | |
parent | 2a0b80eb679f27402035faa93b3b6b16f5839724 (diff) | |
download | meson-a024d75e150334330954bf7a6fdbe8cb02a82491.zip meson-a024d75e150334330954bf7a6fdbe8cb02a82491.tar.gz meson-a024d75e150334330954bf7a6fdbe8cb02a82491.tar.bz2 |
backends: add a new "none" backend
It can only be used for projects that don't have any rules at all, i.e.
they are purely using Meson to:
- configure files
- run (script?) tests
- install files that exist by the end of the setup stage
This can be useful e.g. for Meson itself, a pure python project.
Diffstat (limited to 'mesonbuild/interpreter/interpreter.py')
-rw-r--r-- | mesonbuild/interpreter/interpreter.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py index b725b99..4c3f723 100644 --- a/mesonbuild/interpreter/interpreter.py +++ b/mesonbuild/interpreter/interpreter.py @@ -3090,6 +3090,8 @@ class Interpreter(InterpreterBase, HoldableObject): "internal use. Please rename.") def add_target(self, name: str, tobj: build.Target) -> None: + if self.backend.name == 'none': + raise InterpreterException('Install-only backend cannot generate target rules, try using `--backend=ninja`.') if name == '': raise InterpreterException('Target name must not be empty.') if name.strip() == '': |