automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about testing a library.


From: Ralf Wildenhues
Subject: Re: Question about testing a library.
Date: Fri, 13 Jun 2008 07:41:43 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hello Glenn,

* Schrader, Glenn wrote on Thu, Jun 12, 2008 at 07:54:59PM CEST:
> 
> I am creating a library that is built with automake. The way that I
> >think< this should work is:

> The problem I'm having is that the programs installcheck uses to test
> the library can only be build after the 'make install' but the
> Makefile automake produces wants to build them as a dependency of the
> 'all' target. This, of course, fails since the library isn't installed
> yet.

Do you use libtool to build the library?

Generally, the intended mode of operation is like this: 'make all'
builds uninstalled libraries and uninstalled programs that may depend on
these libraries.  'make install' installs the libraries, then the
program, possibly causing libtool to relink these so they point to their
then-installed dependencies.

For this to work, it requires a bit of cooperation from the developer.
First, within a Makefile.am, lib_LTLIBRARIES has to be listed in
dependency order (for installation to be in order; this is irrelevant
for 'make all', because for them lib*_la_LIBADD are used, or if that
fails, *_DEPENDENCIES may be supplied).  With dependencies spread out
among several Makefile.am's, the developer should arrange the build
order (through the order in the SUBDIRS line) so that deplibs are built
before the libraries and programs that use them.

Hope that helps.

Cheers,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]