[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: |
Lars J. Aas |
Subject: |
Re: lib_ and noinst_ in the same Makefile.am using conditional!! |
Date: |
Wed, 14 Nov 2001 11:58:28 +0100 |
User-agent: |
Mutt/1.3.23i |
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,
Lars J