[cfe-dev] alternate clang driver

Miles Bader miles at gnu.org
Wed Oct 26 22:17:56 PDT 2011

[I'm a bit wary of wading into this, as I know many people love to
rant about autotools.  I think they get a lot of undeserved abuse:
yes, the implementation is gross in many ways, but as _tools_, they
actually work quite well from a user's point of view, for many uses
(OK, not if you want to compile with visual studio).]

Don Quixote de la Mancha
<quixote at dulcineatech.com> writes:
> It should not be that hard to hand-create Makefiles for the
> most-popular build tools that are a lot easier to read and debug than
> the ones that autotools generates.

You're comparing a _source_ file ("hand written XXX") with a generated
file (autotool output).  They are not the same, and should not be
compared directly.

_Trivial_ makefiles are very easy to write.  Makefiles that do more
actually tend to be quite difficult to write, typically contain huge
masses of boilerplate, are hard to maintain and prone to bit-rot.

An automake input file, by contrast, is simple and easy to maintain,
but supports many features (automatic dependency generation.

As for debugging (where a direct comparison is more relevant), I think
you're just wrong.  Makefiles output by autotools files are actually
not particularly hard to debug -- they're _long_, but pretty
straightforward and easy to read, and the boilerplate is typically
well-debugged upstream.  Debugging them is really no harder than a
typical hand-written Makefile with the same amount of functionality
(e.g., Makefiles in Linux, git etc) -- and often simpler, because
hand-written Makefiles tend to use a lot more special functionality to
try and keep the verbosity down.

> If someone wanted to port to a new target or build host, then they
> would have to adjust the config.h and Makefiles apropriately.

Yeah, that's how it was done "back in the day."  It was a huge pain.
There's a very good reason that autoconf adopted the approach it uses
(functionality testing instead of "per-target configs" as older
approaches usually used).


Rational, adj. Devoid of all delusions save those of observation, experience
and reflection.

More information about the cfe-dev mailing list