This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Re: lib_ and noinst_ in the same Makefile.am using conditional!!
- From: Elisabetta Ronchieri <elisabetta dot ronchieri at cnaf dot infn dot it>
- To: "Lars J. Aas" <larsa at sim dot no>
- Cc: automake at gnu dot org
- Date: Thu, 15 Nov 2001 17:35:38 +0100
- Subject: Re: lib_ and noinst_ in the same Makefile.am using conditional!!
- List-id: Discussion list for automake <automake.gnu.org>
- References: <3BEF9E6E.CF9ACBBC@cnaf.infn.it> <20011114115828.A20276@sim.no>
"Lars J. Aas" wrote:
>
> On Mon, Nov 12, 2001 at 11:03:26AM +0100, Elisabetta Ronchieri wrote:
> : Hi,
> :
> : I'm using automake (GNU automake) 1.4 and ltmain.sh (GNU libtool) 1.3.5.
> :
> : I would like to know if I can make a thing like follow:
> :
> : if P_SELECTED
> : Clientdir = $(prefix)/include
> : Client_HEADERS = p.h
> : lib_LTLIBRARIES = libp.la
> : libp_la_SOURCES = events.c
> : else
> : noinst_LTLIBRARIES = libp.la libpl.la
> : libp_la_SOURCES = p.c
> : libpl_la_SOURCES = pl.c
> : endif
>
> Try reorganizing stuff a little (the following suggestion is totally
> untested BTW).
>
> if P_SELECTED
> Clientdir = $(prefix)/include
> Client_HEADERS = p.h
> LIBLIBPLIB = libp.la
> NOINSTLIBPLIB =
> NOINSTLIBPLLIB =
> LIBPSOURCES = events.c
> LIBPLSOURCES =
> else
> LIBLIBPLIB =
> NOINSTLIBPLIB = libp.la
> NOINSTLIBPLLIB = libpl.la
> LIBPSOURCES = p.c
> LIBPLSOURCES = pl.c
> endif
>
> lib_LTLIBRARIES = $(LIBLIBPLIB)
> noinst_LTLIBRARIES = $(NOINSTLIBPLIB) $(NOINSTLIBPLLIB)
>
> libp_la_SOURCES = $(LIBPSOURCES)
> libpl_la_SOURCES = $(LIBPLSOURCES)
>
> Cheers,
Unfortunately, I have the same problem of my solution.
Is it possible that the only solution is to change the library name.
e.g: libp.la when I install the library and libP.la when I doesn't
install it.
Cheers,eli
--
Elisabetta Ronchieri
CNAF INFN
Viale Berti Pichat 6/2
40127 Bologna
tel: +39 051 6092750
fax: +39 051 6092746