[Top][All Lists]

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

Re: lib_ and noinst_ in the same using conditional!!

From: Tom Tromey
Subject: Re: lib_ and noinst_ in the same using conditional!!
Date: 01 Jan 2002 16:10:32 -0700

>>>>> "Elisabetta" == Elisabetta Ronchieri <address@hidden> writes:

Elisabetta> if P_SELECTED
Elisabetta> Clientdir = $(prefix)/include
Elisabetta> Client_HEADERS    = p.h 
Elisabetta> lib_LTLIBRARIES    =
Elisabetta> libp_la_SOURCES = events.c 
Elisabetta> else
Elisabetta> noinst_LTLIBRARIES  = 
Elisabetta> libp_la_SOURCES = p.c 
Elisabetta> libpl_la_SOURCES = pl.c
Elisabetta> endif

Elisabetta> automake: Client/ `' is already
Elisabetta> going to be installed in `noinst'

This is a weird situation.  I'd say it is really a bug in how we built
the libtool support a long time ago.  We wanted automake to
automatically compute the -rpath argument for the user.  But this can
only be done if a library is only installed in one place.

One fix would be to have handle_ltlibraries look at the conditions
under which a library is defined.  If it is defined under multiple
conditions for different directories then we could simply omit the
`-rpath' computation.

A workaround for your case is something like this:

    Clientdir = $(prefix)/include
    Client_HEADERS    = p.h 
    libp_la_SOURCES = events.c 
    libp_la_LDFLAGS = -rpath $(libdir)
    noinst_LTLIBRARIES += 
    libp_la_SOURCES = p.c 
    libpl_la_SOURCES = pl.c

The configure substitutions combined with EXTRA_LTLIBRARIES are enough
to fool automake into doing what you want.  (I haven't tested this.)


reply via email to

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