[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lib_ and noinst_ in the same Makefile.am using conditional!!
From: |
Tom Tromey |
Subject: |
Re: lib_ and noinst_ in the same Makefile.am 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 = libp.la
Elisabetta> libp_la_SOURCES = events.c
Elisabetta> else
Elisabetta> noinst_LTLIBRARIES = libp.la libpl.la
Elisabetta> libp_la_SOURCES = p.c
Elisabetta> libpl_la_SOURCES = pl.c
Elisabetta> endif
Elisabetta> automake: Client/Makefile.am: `libdglog.la' 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:
lib_LTLIBRARIES = @LIBP_INST@
noinst_LTLIBRARIES = @LIBP_NOINST@
EXTRA_LTLIBRARIES = libp.la
if P_SELECTED
Clientdir = $(prefix)/include
Client_HEADERS = p.h
libp_la_SOURCES = events.c
libp_la_LDFLAGS = -rpath $(libdir)
else
noinst_LTLIBRARIES += libpl.la
libp_la_SOURCES = p.c
libpl_la_SOURCES = pl.c
endif
The configure substitutions combined with EXTRA_LTLIBRARIES are enough
to fool automake into doing what you want. (I haven't tested this.)
Tom
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: lib_ and noinst_ in the same Makefile.am using conditional!!,
Tom Tromey <=