[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
build setup with variables fail
From: |
aotto |
Subject: |
build setup with variables fail |
Date: |
Fri, 29 Mar 2024 13:50:42 +0100 |
User-agent: |
Mozilla Thunderbird |
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
- build setup with variables fail,
aotto <=