]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
build: avoid check-symfile on non-Linux
authorEric Blake <eblake@redhat.com>
Wed, 5 Sep 2012 19:10:18 +0000 (13:10 -0600)
committerEric Blake <eblake@redhat.com>
Wed, 5 Sep 2012 19:10:18 +0000 (13:10 -0600)
I tested both OpenBSD and cygwin; both failed 'make check' with:

  GEN    check-symfile
Can't return outside a subroutine at ./check-symfile.pl line 13.

Perl requires 'exit 77' instead of 'return 77' in that context,
but even with that tweak, the build still fails, since the exit
code of 77 is only special to explicit TESTS=foo listings, and
not to make-only dependency rules where we are not going through
automake's test framework.

* src/check-symfile.pl: Kill bogus platform check...
* src/Makefile.am (check-symfile): ...and replace with an automake
conditional.

src/Makefile.am
src/check-symfile.pl

index 39adeac08c159431c620d9cb3efd36188d6d1c23..9f27fcfa747b088b9df4a7716a543d95fad1bd62 100644 (file)
@@ -312,10 +312,14 @@ PDWTAGS = \
        fi
 
 # .libs/libvirt.so is built by libtool as a side-effect of the Makefile
-# rule for libvirt.la
+# rule for libvirt.la.  However, checking symbols relies on Linux ELF layout
+if WITH_LINUX
 check-symfile: libvirt.syms libvirt.la
        $(AM_V_GEN)$(PERL) $(srcdir)/check-symfile.pl libvirt.syms \
          .libs/libvirt.so
+else
+check-symfile:
+endif
 
 PROTOCOL_STRUCTS = \
        $(srcdir)/remote_protocol-structs \
index 5454f45486efffe6c4b26b820ec3a5d75cacfb21..454fed3260796b1d61dfbbb6c095e7b5bd57fd42 100755 (executable)
@@ -8,11 +8,6 @@ my @elflibs = @ARGV;
 my @wantsyms;
 my %gotsyms;
 
-# Skip on non-linux
-if ($^O ne "linux") {
-    return 77; # Automake's skip code
-}
-
 open SYMFILE, $symfile or die "cannot read $symfile: $!";
 
 while (<SYMFILE>) {