Re: Get rid of libtool? [was Re: Makefile problems]

2002-02-28 Thread Tom Lord



   espie:

   [...] I'm only tweaking libtool VERY reluctantly.
   This thing is at least one harder of magnitude LESS maintainable than
   a Makefile, and probably more. This partly comes from the fact that it
   is impossible to debug shell scripts of such a size. This also comes from
   the fact that libtool is incredibly bloated, and does really, really need
   a complete redesign.


   aoliva:

   What gets me annoyed is when people say `hey, let's throw all this
   effort away and reinvent it poorly' or `hey, building shared libraries
   properly is easy, why do I have to use this junk'.

I've been reviewing libtool recently and hope to have a more complete
response to it later, but just on a preliminary basis -- I think a lot
can be done to drastically improve libtool without throwing away all
the effort that's gone into it so far.

Among my major sources of praise is the presense of all those testing
tools.  Those make it far more tractable to improve the implementation.

Among my major complaints so far are:

- the way that ports happen / the way that platform details 
  are represented
- the reliance on autoconf
- the absense of comments
- the absense of technical documentation
- the monolithic implementation

I think the information that goes into a port can be profitably
factored out, most of it into a plain text, commented database, with
perhaps a little bit of per-platform scripting.  The result would be a
database, mostly independent of the rest of libtool, describing the
mechanics of libraries on all supported platforms/compilers.  Through
cleverness, I'm hoping that such a database can be produced mostly
automatically using the existing libtool implementation itself.

The reliance on autoconf and m4 and a number of idioms inherited from
autoconf for writing portable shell code is, I think, a lot of the
source of the perception that it's hard to maintain.  I understand
that that reliance is a conservative choice if you're just down the
hall from some of the "auto*" maintainers -- based on the fact that
autoconf encapsulates a lot of accumulated wisdom and tricks for
writing portable scripts -- but I think there are far more
maintainable approaches.

Another part of the maintainability problem is the absense of good
comments and documentation.  The user manual describes the abstraction
that libtool tries to maintain, but would be usefully accompanied by a
review of libraries in general, describing the kinds of variations
seen, and sections for each platform/compiler/configuration locating
that system in the space of library-handling variations.  The internal
abstractions used by libtool are barely documented at all in comments
-- it's in a horrible state in that regard.

The fact that all that functionality is lumped into one huge script
makes the code ridiculously hard to read and the internal abstractions
ridiculously hard to identify.  Making those abstractions more
explicit by breaking up the huge script into functions and/or
subscripts with documented interfaces would help a lot.

The comment in the user's manual that if you aren't using automake
you're "on your own" is a bad sign for the abstractions that libtool
wants to give users, to put it mildly.  Even if I wanted to use
automake I'd find that flippant remark to be an off-putting,
red-flag-raising clue.  Getting those abstractions to the point where
they are easy to use independently of the "auto*" tools is important
-- I don't see how you can claim to have a well designed tool
otherwise.

(I haven't yet gotten far into reviewing "libltdl".)

-t

___
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool



Re: [shell functions, was RE: solving of name conflicts in included.a]

2002-11-14 Thread Tom Lord


   > Let them install BASH and get out of our way.

As someone else pointed out, bash uses autoconf.

Also, while its good to talk about bringing up GNU environments on top
of proprietary ones, the long term view is to also think about
bringing them up on raw iron.

So, pick a small set of prerequisite tools (bash might or might not be
one), and factor the bootstrapping of those tools into a separate
project.  Make that a separate problem, then design the build tools to
take advantage of its having been solved.

Another issue (related in my warped way of looking at things) is all
the compilation of configure/build scripts.  It causes an infinite
supply of inefficiencies, confusions, and little annoyances to have to
compile configure.in and Makefile.am -- and with a fixed set of modern
prereqs in place, that can easily be fixed.  While adding shell
functions, get rid of m4 and use a modern make (but don't screw the
bootstrapping of the prereq tools).

Finally, I still wish that a side-effect of the libtool effort was a
document/database that explained clearly and concisely how to deal
with shared libraries in various environments.   As it stands, that
information is weaved into convoluted code and the situation is
glossed over with "trust us -- we're building the right abstractions".

-t



___
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool



Re: [shell functions, was RE: solving of name conflicts inincluded.a]

2002-11-15 Thread Tom Lord


   > I don't see the urgency to move to shell functions, but I do
   > see how they can simplify our lives.
 

Uh... "if not now, when"?

Seriously, there's _always_ commercial incentive to do a half assed
job and the _real_ ego competition is to reject that incentive and do
a good job anyway.

Ties are nooses, in a pinch.

-t





___
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool