From a024d75e150334330954bf7a6fdbe8cb02a82491 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Thu, 1 Sep 2022 00:59:41 -0400 Subject: 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. --- test cases/python/7 install path/meson.build | 4 ++++ test cases/python/7 install path/target/meson.build | 3 +++ 2 files changed, 7 insertions(+) create mode 100644 test cases/python/7 install path/target/meson.build (limited to 'test cases/python') diff --git a/test cases/python/7 install path/meson.build b/test cases/python/7 install path/meson.build index 1075c1bac..22e33c653 100644 --- a/test cases/python/7 install path/meson.build +++ b/test cases/python/7 install path/meson.build @@ -17,4 +17,8 @@ py_plat.install_sources('test.py', pure: true, subdir: 'kwrevert') install_data('test.py', install_dir: py_plat.get_install_dir() / 'kw/data') install_data('test.py', install_dir: py_plat.get_install_dir(pure: true) / 'kwrevert/data') +if get_option('backend') == 'none' + subdir('target') +endif + subdir('structured') diff --git a/test cases/python/7 install path/target/meson.build b/test cases/python/7 install path/target/meson.build new file mode 100644 index 000000000..178ae0224 --- /dev/null +++ b/test cases/python/7 install path/target/meson.build @@ -0,0 +1,3 @@ +testcase expect_error('Install-only backend cannot generate target rules, try using `--backend=ninja`.') + import('fs').copyfile('../test.py') +endtestcase -- cgit v1.2.3