bug-automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: automake 1.11 parses if statement too late


From: Andrew W. Nosenko
Subject: Re: automake 1.11 parses if statement too late
Date: Fri, 7 Aug 2009 18:05:35 +0300

On Fri, Aug 7, 2009 at 15:23, Bernhard Rosenkraenzer<address@hidden> wrote:
> Hi,
> this part of a Makefile.am causes errors with automake 1.11:
>
> if IPHONE
> # What ****ing ***** came up with the idea of a platform without shared
> libraries???
> lib_LIBRARIES = libtest.a
> libtest_a_SOURCES = test.cpp
> libtest_a_LDFLAGS = -lsomelib
> else
> lib_LTLIBRARIES = libtest.la
> libtest_la_SOURCES = test.cpp
> libtest_la_LDFLAGS = -lsomelib
> endif
>
> The errors are
>
> Makefile.am: object `test.$(OBJEXT)' created both with libtool and without
> Makefile.am:5: variable `libtest_a_LDFLAGS' is defined but no program or
> Makefile.am:5: library has `libtest_a' as canonical name (possible typo)
>
> Both of the errors should not occur, given the statements in "if ..." and
> "else" are mutually exclusive and can't be run at the same time.

Essencially not about your exact question, but why not enforce libtool
to create static library only (untested, just idea, but should be not
so far from reality):

lib_LTLIBRARIES = libtest.la
libtest_la_SOURCES = test.cpp
libtest_la_LDFLAGS = -lsomelib
if IPHONE
# What ****ing ***** came up with the idea of a platform without
shared libraries???
libtest_la_CFLAGS += -static
libtest_la_LDFLAGS += -static
endif

Moreover, I always thinked that libtool smart enough to do not create
shared libs on platforms w/o shared libs support :-)

But again, I can be wrong or just don't understand something about
your environment that may confuse or fool libtool...

-- 
Andrew W. Nosenko <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]