syntax-check: pass srcdir to group-qemu-caps.pl

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 <jtomko@redhat.com>
This commit is contained in:
Ján Tomko 2018-04-26 13:17:41 +02:00
parent 8fa4131814
commit 00b50292fd
2 changed files with 9 additions and 3 deletions

2
cfg.mk
View File

@ -1120,7 +1120,7 @@ test-wrap-argv:
$(PERL) $(top_srcdir)/tests/test-wrap-argv.pl --check $$files $(PERL) $(top_srcdir)/tests/test-wrap-argv.pl --check $$files
group-qemu-caps: 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 can fail if generated files are not built first
sc_po_check: \ sc_po_check: \

View File

@ -31,15 +31,21 @@ if (defined $ARGV[0] && $ARGV[0] eq "--check") {
shift @ARGV; shift @ARGV;
} }
my $prefix = '';
if (defined $ARGV[0]) {
$prefix = $ARGV[0];
shift @ARGV;
}
my $ret = 0; my $ret = 0;
if (&regroup_caps('src/qemu/qemu_capabilities.c', if (&regroup_caps($prefix . 'src/qemu/qemu_capabilities.c',
'^VIR_ENUM_IMPL\(virQEMUCaps,', '^VIR_ENUM_IMPL\(virQEMUCaps,',
'\);', '\);',
0, 0,
" ") < 0) { " ") < 0) {
$ret = 1; $ret = 1;
} }
if (&regroup_caps('src/qemu/qemu_capabilities.h', if (&regroup_caps($prefix . 'src/qemu/qemu_capabilities.h',
'virQEMUCapsFlags grouping marker', 'virQEMUCapsFlags grouping marker',
'QEMU_CAPS_LAST \/\* this must', 'QEMU_CAPS_LAST \/\* this must',
1, 1,