automake
[Top][All Lists]
Advanced

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

Re: library name enforcement?


From: Ralf Corsepius
Subject: Re: library name enforcement?
Date: Tue, 18 May 2004 10:55:39 +0200

On Mon, 2004-05-17 at 23:31, Alexandre Duret-Lutz wrote:
> >>> "Ralf" == Ralf Corsepius <address@hidden> writes:
> 
>  Ralf> On Mon, 2004-05-03 at 06:52, Bob Proulx wrote:
>  >> Older versions of automake allowed arbitrary library names.
>  >>
>  >> noinst_LIBRARIES = foo.a
>  >>
>  >> Recent versions of automake now complain about this naming.
>  Ralf> Recent? Well, AFAICT this (mal-) feature is in automake for years.
>  Ralf> I wish it had never been introduced :(
> 
> I've dug some interesting bit of history out of the CVS
> repository.

> >From this I gather that some people actually care that the
> libraries get properly named.  I guess it makes sense to enforce
> such name for installed libraries (so they can be used with -l),
Yes, but this is arguable. 

Most people will want to libxxx.a for comply with -l, but in general,
nothing but conventions prevents you from using static libs named by
arbitrary names.

For noinst_LIBRARIES, another consideration applies: They do not get
installed and therefore often will not be accessed using $CC -l, but
be used in other ways.

One case, I had encountered this issue, is creating noinst_LIBRARIES as
temporary archives being extracted elsewhere in a build-tree to be
merged into another library. Here, enforcing lib* is unnecessary and can
become annoying when converting a package to automake.

> and perhaps it would also be sensible to relax the naming for
> noinst_ libraries.  
> 
> I'm quite surprised by this thread, though.  First I don't know
> how Bob could have possibly used arbitrary library names (a
> patched Automake, maybe?)  Then I confess I don't really realize
> to what extent this restriction is annoying.  I can see that
> Ralf is annoyed, but I do not know why. 
Calling it "annoyed" is too strong.

However, in the past, I had been bitten by automake insisting on naming
LIBRARIES lib* myself and had found myself hacking Makefiles for
backward compatibility.

Nowadays this isn't an actual problem anymore (people probably are
accustomed to using lib*.a and take it for granted), except for one
issue, I consider to be "just an unclearity":
What kind of files is <dir>_LIBRARIES to take?

Is it static libraries?
In this case enforcing lib* complies to common "*nix" conventions, to 
accommodate the compilers' "-l" flags. But how about other, non-*nixish
systems? Does automake convert libxxx.a's into something else for these
systems?

Is it an arbitrary "ar"-created archive?
In this case the name "_LIBRARIES" is be misleading and automake's
behavior would not be correct.
 
>  AFAIC naming a
> convenience library libfoo.a instead of foo.a is not a big deal.
> Finally, I'm surprised this discussion hasn't come up before (or
> did it?).
I vaguely recall this not to be the first time and I am aware about
similar issues lurking for other automake primaries ;)

Ralf






reply via email to

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