[cfe-dev] alternate clang driver

Don Quixote de la Mancha quixote at dulcineatech.com
Wed Oct 26 03:32:10 PDT 2011


autotools does to main things: it creates a header file called
"config.h" that has #defines for lots of system-dependent stuff, and
it generates Makefiles.

Over the years I have observed that most of what is declared in
config.h is not actually used by the codebase that depends on it.
This is because the maintainer did not customize the configure script
to test only for what is actually needed.

The Makefiles it generates look like line noise.  If there is some
problem with the build, it is difficult to impossible to figure out by
reading autotools-generated Makefiles.

There are only so many automated build systems in common use: the
various IDE project formats, Visual Studio's nmake, GNU make, the
original UNIX make and so on.

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.

As for config.h, a possible solution would be to have everyone submit
the config.h that their particular build generates, as well as the
output of something like:

   touch foo.h ; cpp -dM foo.

With GCC that prints out all the pre-defined preprocessor symbols.
The way you get them all though would be quite different for different
compilers.

Then someone could look at all the different submitted config.h's and
the different set of compiler-dependent preprocessor symbols, then
handroll just one header file that would work for everyone.

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

ZooLib actually has two configuration headers that come with the
framework.  All of its source code and the user's client code includes
a file called "zconfig.h", but usually zconfig.h includes a "previous
header", then some of the user's own definitions, and an "afterwards
header" whose result depends on everything that went before it was
included.

-- 
Don Quixote de la Mancha
Dulcinea Technologies Corporation
Software of Elegance and Beauty
http://www.dulcineatech.com
quixote at dulcineatech.com



More information about the cfe-dev mailing list