From 9b32ba53f36428abdecc79a0a047c2636af130d1 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Fri, 27 May 2022 16:35:44 +0100 Subject: build: add a more generic way to specify make->ninja dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Let any make target specify ninja goals that needs to be built for it (though selecting the goals is _not_ recursive on depending targets) instead of having a custom mechanism only for "make check" and "make bench". Signed-off-by: Paolo Bonzini Message-Id: <20220517092616.1272238-4-pbonzini@redhat.com> Signed-off-by: Alex Bennée Message-Id: <20220527153603.887929-15-alex.bennee@linaro.org> --- scripts/mtest2make.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts/mtest2make.py') diff --git a/scripts/mtest2make.py b/scripts/mtest2make.py index 304634b71e..0fe81efbbc 100644 --- a/scripts/mtest2make.py +++ b/scripts/mtest2make.py @@ -81,12 +81,12 @@ def emit_prolog(suites, prefix): def emit_suite_deps(name, suite, prefix): deps = ' '.join(suite.deps) - targets = f'{prefix}-{name} {prefix}-report-{name}.junit.xml {prefix} {prefix}-report.junit.xml' + targets = [f'{prefix}-{name}', f'{prefix}-report-{name}.junit.xml', f'{prefix}', f'{prefix}-report.junit.xml', + f'{prefix}-build'] print() print(f'.{prefix}-{name}.deps = {deps}') - print(f'ifneq ($(filter {prefix}-build {targets}, $(MAKECMDGOALS)),)') - print(f'.{prefix}.build-suites += {name}') - print(f'endif') + for t in targets: + print(f'.ninja-goals.{t} += $(.{prefix}-{name}.deps)') def emit_suite(name, suite, prefix): emit_suite_deps(name, suite, prefix) -- cgit v1.2.3