automake
[Top][All Lists]
Advanced

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

Re: library name enforcement?


From: Alexandre Duret-Lutz
Subject: Re: library name enforcement?
Date: Mon, 17 May 2004 23:31:59 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

>>> "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.

In summer 1996, the syntax for _LIBRARIES was
  dir_LIBRARIES = foo bar baz
and Automake would just create a variable containing the
actual list of library files derived by prepending `lib'
and appending `.a':
  LIBFILES = libfoo.a libbar.a libbaz.a

In order to support conditional compilation via configure
substitutions, such rewriting was not applied to configure
substitutions.  Hence
  dir_LIBRARIES = foo @SUBST@
became
  LIBFILES = libfoo.a @SUBST@
And you had to define SUBST as `libbar.a' and not `bar'.

In November 1996 (a couple of weeks before Automake 1.1i) Gordon
Matzigkeit changed this to what we know today: dir_LIBRARIES
contains directly the names of the libraries.  Along with that
change he installed the standard library name enforcement check.
I can only presume part of the rational was that such check
would help people to realize the syntax of _LIBRARIES had
changed.  Besides, such enforcement was not an additional
constraint since there was no way to name the library otherwise
with the previous scheme.

The error reporting code for non-standard names was introduced
by the following comment:
 # FIXME this should only be a warning for foreign packages

this FIXME was removed by Tom one year later the day he released
Automake 1.2c, without further notice.

In December 1998 Thomas Tanner relaxed this name checking in
both _LIBRARIES and _LTLIBRARIES, "for the sake of building
libtool modules".  Of course libtool modules have nothing to do
with _LIBRARIES, so Tom Tromey reinstalled the check for
_LIBRARIES the next day.  Thomas Tanner followed up with a patch
to reinstall the full check for _LTLIBRARIES, and relax it only
when -module is used; we still use this today.


>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),
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.  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?).
--
Alexandre Duret-Lutz





reply via email to

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