[CMake] retraining Autoconf users on the command line

Brandon Van Every bvanevery at gmail.com
Fri Aug 10 14:16:14 EDT 2007


On 8/10/07, dave <dfeustel at mindspring.com> wrote:
> On Fri, Aug 10, 2007 at 12:38:08PM -0400, Brandon Van Every wrote:
> >
> > The command line is the retraining tool.
>
> How about a CMake utility that accepts autotools files as input
> and creates CMake output files for all the autotools features which
> can be translated directly and then flagging with comments the features
> in the input tools which need to (for whatever reason) be converted by
> hand?

Sure.  You wanna pay me by the hour to write it?  I'm doing a quick
'n' dirty translation of GMake to CMake right now for a client, using
CMake script.  It's feasible in a reasonable timeframe because I don't
have to deal with arbitrary inputs, I only have to deal with actual
coding styles present in their (rather large) source tree.  Then I can
throw the translation script away.  Or they could bang on it more, or
pay me to bang on it more, extending its life.

Trying to do this for arbitrary inputs, and making it robust, looks
like a big job.  You seen all the crap that GMake has in it?
Nevermind that Automake is not Autoconf is not GMake.  There are some
Automake parsers from the KDE project, but the only GMake parser I
found was http://search.cpan.org/~agent/Makefile-Parser-0.17/lib/Makefile/Parser.pm
The risk of bothering to understand it didn't look good, so I blew it
off.  At present I'm simply doing "have regex, will translate."  If I
had time, budget, and mandate, I'd probably do it in a language more
suited to parsing, such as Chicken Scheme.  Or maybe go back to OCaml.
 But the truth is, I'm currently a way better CMake buildmaster than a
Scheme programmer, so I went with what I know best, which is CMake
script.

I think open source translation tools will exist and become more
robust eventually, but meanwhile, they're very time consuming to write
and people have gotta get paid to deal with stuff.  I mean, has
Kitware up and written one?  No, so clearly they have other priorities
about where to put the heavy labor.  I feel similarly in the absence
of money.


Cheers,
Brandon Van Every


More information about the CMake mailing list