GNU bug report logs - #11863
Building test plugins

Previous Next

Package: automake;

Reported by: Reuben Thomas <rrt <at> sc3d.org>

Date: Wed, 4 Jul 2012 20:49:02 UTC

Severity: normal

Tags: confirmed, help

Full log


View this message in rfc822 format

From: "Gary V. Vaughan" <gary <at> gnu.org>
To: Reuben Thomas <rrt <at> sc3d.org>
Cc: 11863 <at> debbugs.gnu.org, Stefano Lattarini <stefano.lattarini <at> gmail.com>
Subject: bug#11863: Building test plugins
Date: Thu, 5 Jul 2012 13:19:04 +0700
Hi Reuben,

On 5 Jul 2012, at 05:39, Reuben Thomas wrote:
> On 4 July 2012 23:35, Stefano Lattarini <stefano.lattarini <at> gmail.com> wrote:
>> tags 11863 + moreinfo
>> thanks
>> 
>> On 07/04/2012 10:43 PM, Reuben Thomas wrote:
>>> I have a library that I want to build just for tests. Hence, I add it
>>> to check_LTLIBRARIES. It's a plugin, so I want the .so (or .dll or
>>> whatever) to be built, but it isn't!
>>> 
>> It isn't built when you run "make check"?
> 
> The library is built, but no .so.

check_LTLIBRARIES works somewhat like noinst_LTLIBRARIES, in that Automake
instructs libtool to build a convenience archive by default in both cases
(a convenience archive being a static archive of pic objects).

Arguably that's not the right thing for check_LTLIBRARIES, for exactly the
reasons you have been tripped up by here.  And I'd be in favour of changing
the semantics of check_LTLIBRARIES accordingly - libltdl based module
loaders will continue to cope just fine because the .la file is examined
to determine how to link and load the module.

Currently the best way to tell Automake to only build a libtool library
for `make check' without installing it, but at the same time to tell libtool
not to make a convenience archive is:

  check_LTLIBRARIES += tests/libalientest.la

  tests_libalientest_la_LDFLAGS = -module -avoid-version -rpath /dev/null

The -rpath argument tells libtool that this is not a convenience archive.
The parameter can be anything, because Automake will not install a
check_LTLIBRARIES object anyway, but /dev/null makes it clearer that we'r
doing something a bit odd here.

Cheers,
-- 
Gary V. Vaughan (gary AT gnu DOT org)






This bug report was last modified 4 years and 207 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.