build setup with variables fail

aotto <[email protected]>
Newsgroups gmane.comp.sysutils.automake.general
Message-ID <[email protected]>
Hi,

I'm having a problem to use a makefile *variable* to minimize the configuration replication.

The problem is *noversion_LDFLAGS* which has all flags for *_LDFLAGS *but* seems *not* be accepted
as valid input in the *Makefile.am* file.

my project :

 > pkglib_LTLIBRARIES = pymqmsgque.la
 > pymqmsgque_la_SOURCES   = LibMqMsgque_python.c MqFactoryC_python.c MqContextC_python.c MqDumpC_python.c \
 >                            MqHigh_python.c MqCall_python.c
 > pymqmsgque_la_CPPFLAGS  = $(libmqmsgque_CPPFLAGS) -DMQ_PY_BUILD_DLL -I$(theKernel_SRCDIR)/pymsgque
 > pymqmsgque_la_CFLAGS    = $(libmqmsgque_CFLAGS) $(PYTHON_CFLAGS)
 > pymqmsgque_la_LDFLAGS   = $(noversion_LDFLAGS) $(PYTHON_LDFLAGS)
 > pymqmsgque_la_LIBADD    = $(theKernel_BUILDDIR)/pymsgque/libpymkkernel.la $(libmqmsgque_shared_LIBADD)

with *noversion_LDFLAGS* variable is defined as:

>  noversion_LDFLAGS= -module $(UBSAN) -shared -avoid-version -no-undefined

fails with

>  theLink/pymsgque/Makefile.am:14: error: 'pymqmsgque.la' is not a standard libtool library name
 > theLink/pymsgque/Makefile.am:14: did you mean 'libpymqmsgque.la'?

because the attribute *-module* is *not* part of the *_LDFLAGS* command-line. adding the *-module* to the
command-line solves this issue :

 > pymqmsgque_la_LDFLAGS = -module $(noversion_LDFLAGS)   $(PYTHON_LDFLAGS)

the reason to use the variable *noversion_LDFLAGS* is to support multiple projects with the *same* values to
minimize error-prone replication of configuration settings.

my problem is now that I feel uncomfortable because it seems that a *variable* at all have an *influence* on how
automake works and probably add "hidden-bug".

question: is there a work-around ?


mfg ao
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.