aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2022-05-27 16:35:44 +0100
committerAlex Bennée <alex.bennee@linaro.org>2022-06-01 15:47:43 +0100
commit9b32ba53f36428abdecc79a0a047c2636af130d1 (patch)
tree63a29cb4b60db533a48a08a9d57710796709a9e5 /scripts
parent231ca96316f17d0af8c5e72cc2c496c68ee23ab6 (diff)
build: add a more generic way to specify make->ninja dependencies
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 <pbonzini@redhat.com> Message-Id: <20220517092616.1272238-4-pbonzini@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220527153603.887929-15-alex.bennee@linaro.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mtest2make.py8
1 files changed, 4 insertions, 4 deletions
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)