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

Re: Remove cdrtools

Steve Greenland wrote:

> On 14-Aug-06, 15:59 (CDT), Michael Poole <mdpoole@troilus.org> wrote:
>> Wouter Verhelst writes:
>> > In the case of autotools, the fact is that usually it's configure.ac or
>> > Makefile.am being horribly broken, rather than the autotools.

Oh yeah.  Most people don't know how to write Makefiles, of course, which is
a bigger problem.  Automake doesn't know how to write them either.  Google
"Make is an expert system".  There should be as little as possible in the
procedural code: if you can express something with dependencies, you
should do it.

Unfortunately Make is missing one crucial feature which would allow most
Makefiles to be much, much cleaner.  I have been meaning to write a patched
version of make which includes it, but I never seem to get around to it. 
It's very simple: for each target, it should be possible to specify a piece
of procedural code which returns 0 if the target is considered 'up-to-date'
and 1 if it is not considered 'up-to-date'.  Think about the potential uses
of that for a minute.  :-)

> The *real* problem with the whole autotools disaster is that it promotes
> a braindead idea of how to achieve portability: a #ifdef branch for
> every different system (or library version, or whatever), strewn
> throughout the entire codebase.

Um, this is the exact opposite of the philosophy promoted by Autoconf since
at least version 2.0.  "Feature tests, not system tests".  I can't speak to
other autotools.

> Real portability involves understanding  
> your target systems, learning where the rough edges and corner cases
> are, and developing proper abstractions to work around them.

Furthermore, 'best practice' use of autoconf is to isolate the feature
differences in a single piece of wrapper code, so that your main code only
has to deal with (e.g.) 'memmove', and it's emulated where it isn't
present.  The emulation code is the only code containing #ifdefs, which are
then based on the features detected by autoconf.

I don't think I'd like to work without autoconf.  The alternatives I've seen
are all hideous monstrosities.  Automake -- well, if you know how to write
a Makefile, don't use it, just write your Makefile -- but most people

Nathanael Nerode  <neroden@fastmail.fm>

Bush admitted to violating FISA and said he was proud of it.
So why isn't he in prison yet?...

Reply to: