From 00b50292fd1e32b83307b98be37a9bcc6d96e501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Thu, 26 Apr 2018 13:17:41 +0200 Subject: [PATCH] syntax-check: pass srcdir to group-qemu-caps.pl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The script assumed to be run in the source directory. Pass top_srcdir as the argument to fix VPATH builds. My commit 81a7571 broke this. Signed-off-by: Ján Tomko --- cfg.mk | 2 +- tests/group-qemu-caps.pl | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/cfg.mk b/cfg.mk index 158d4cbd73..c3d18279ce 100644 --- a/cfg.mk +++ b/cfg.mk @@ -1120,7 +1120,7 @@ test-wrap-argv: $(PERL) $(top_srcdir)/tests/test-wrap-argv.pl --check $$files group-qemu-caps: - $(PERL) $(top_srcdir)/tests/group-qemu-caps.pl --check + $(PERL) $(top_srcdir)/tests/group-qemu-caps.pl --check $(top_srcdir)/ # sc_po_check can fail if generated files are not built first sc_po_check: \ diff --git a/tests/group-qemu-caps.pl b/tests/group-qemu-caps.pl index 847e360254..514764f47f 100755 --- a/tests/group-qemu-caps.pl +++ b/tests/group-qemu-caps.pl @@ -31,15 +31,21 @@ if (defined $ARGV[0] && $ARGV[0] eq "--check") { shift @ARGV; } +my $prefix = ''; +if (defined $ARGV[0]) { + $prefix = $ARGV[0]; + shift @ARGV; +} + my $ret = 0; -if (®roup_caps('src/qemu/qemu_capabilities.c', +if (®roup_caps($prefix . 'src/qemu/qemu_capabilities.c', '^VIR_ENUM_IMPL\(virQEMUCaps,', '\);', 0, " ") < 0) { $ret = 1; } -if (®roup_caps('src/qemu/qemu_capabilities.h', +if (®roup_caps($prefix . 'src/qemu/qemu_capabilities.h', 'virQEMUCapsFlags grouping marker', 'QEMU_CAPS_LAST \/\* this must', 1,