LWN.net Logo

Kamp: A Generation Lost in the Bazaar

Kamp: A Generation Lost in the Bazaar

Posted Aug 22, 2012 0:55 UTC (Wed) by cesarb (subscriber, #6266)
In reply to: Kamp: A Generation Lost in the Bazaar by alankila
Parent article: Kamp: A Generation Lost in the Bazaar

> but when you write configure.ac to generate configure.in to generate configure to generate Makefile.in to generate Makefile to generate the final product ...

AFAIK, configure.ac is just the modern name for configure.in. You will not have both at the same time, and both are used to generate configure.

Usually, you do not use configure to generate Makefile.in. Instead, you use automake to generate Makefile.in from Makefile.am, and configure to generate Makefile from Makefile.in.

So, what you have is that you write configure.ac to generate configure, Makefile.am to generate Makefile.in, and configure and Makefile.in together generate Makefile. But that is simplifying things, there is also config.h.in to generate config.h together with configure, and some stamp.h.in/stamp-h thing.

But wait, there is more! I forgot aclocal. So, you write configure.ac to generate aclocal.m4 to generate configure. And then there is libtool. Since this post is already too long, let me just link to a page of its manual with an easy-to-understand ASCII art graphic: https://www.gnu.org/software/libtool/manual/html_node/Int... (there is one for autoconf too, see https://www.gnu.org/savannah-checkouts/gnu/autoconf/manua...).

autotools is fun!


(Log in to post comments)

Kamp: A Generation Lost in the Bazaar

Posted Aug 27, 2012 11:35 UTC (Mon) by pboddie (subscriber, #50784) [Link]

I almost feel I could get some quick technical support here. People reading my other comments may get the impression that I really like autotools, but I spent the weekend updating OpenWrt packages that rely on the underlying build systems of projects that are mostly autotools systems, and there can be some weird things going on.

First of all, a lot of projects use automake which doesn't really lend itself to concise, easily diagnosable scripts - there's plenty of "where does the Makefile get *that* from?" and "do I really need a few hundred lines of settings for hello_world.c?" - and having written .in files by hand a while ago, I do get the feeling that people might just be taking something that works for someone else and stuffing it into a situation where it doesn't necessarily make sense. Here, I disagree with the author of the article: the "bazaar" may make such arguably inappropriate re-use easier since you can just search the Internet for something that works, but it isn't a precondition of "bazaar" development that you just copy stuff around.

Cross-compilation is always going to stress build systems, and I found cases of things wanting to run recently built or installed things to configure themselves (Gtk+, I think) as well as a particularly bizarre interaction with pkg-config producing build-time "staging" paths instead of "target" paths. I'm pretty sure that OpenWrt does some magic to make pkg-config do the right thing, but then some other inscrutable thing seems to be overriding it.

What I would probably conclude from much of this is that less is, more often than not, more: a more economically stated set of configuration resources would probably produce fewer surprises, especially outside the narrow mode of operation of the upstream developers.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds