]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
syntax-check: pass srcdir to group-qemu-caps.pl v4.3.0-rc1
authorJán Tomko <jtomko@redhat.com>
Thu, 26 Apr 2018 11:17:41 +0000 (13:17 +0200)
committerJán Tomko <jtomko@redhat.com>
Thu, 26 Apr 2018 11:39:10 +0000 (13:39 +0200)
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>
cfg.mk
tests/group-qemu-caps.pl

diff --git a/cfg.mk b/cfg.mk
index 158d4cbd7380236a93d0aaeed9bfdb44bca87f4e..c3d18279cefefc543c8150542e2f6bab19959c3e 100644 (file)
--- 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: \
index 847e3602542cff9656f7befcf9f9f3533d6d35ed..514764f47f0234d00115fd3f247117bb41491601 100755 (executable)
@@ -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 (&regroup_caps('src/qemu/qemu_capabilities.c',
+if (&regroup_caps($prefix . 'src/qemu/qemu_capabilities.c',
                   '^VIR_ENUM_IMPL\(virQEMUCaps,',
                   '\);',
                   0,
                   "              ") < 0) {
     $ret = 1;
 }
-if (&regroup_caps('src/qemu/qemu_capabilities.h',
+if (&regroup_caps($prefix . 'src/qemu/qemu_capabilities.h',
                   'virQEMUCapsFlags grouping marker',
                   'QEMU_CAPS_LAST \/\* this must',
                   1,