?

Log in

No account? Create an account

Previous Entry | Next Entry

What if autoconf could be replaced by moving the configuration steps into makefiles, rather than vice-versa?

File paths and library lists can already be handled nicely with systems like pkg-config, with the only requirement that the pkg-config tool be in the path.

Why not move feature-detection and other configure sort of tasks into makefiles too?

A library of makefile pieces could be built that represent various autoconf tests, stored in a central directory like /usr/share/pkgconfig, ready for inclusion into GNUmakefiles. Rules might look like this:

include $(shell pkg-config gnuconf-make --variable=MAKEFILE)
all:	check-configuration

PKGCONFIG_PACKAGES=gtk2 atk lua-5.0.0
check-configuration: check-c-compiler check-cpp check-ld my-custom-check check-pkgconfig-packages

my-custom-check:
	do something here to check some part of the build

Tags:

Comments

( 5 comments — Leave a comment )
ginaspider
Apr. 13th, 2008 02:31 am (UTC)
The openbsd makefile structure is pretty elegant in this regard. I personally don't like autotools very much.
aredridel
Apr. 13th, 2008 03:30 am (UTC)
Indeed. But writing Yet Another Replacement isn't going to help. There's tons of those.

But an incremental change, using existing infrastructure even better would be awesome.

And it would simplify the user side, unify the developer side, and be much more inspectable.
lizdean
Apr. 13th, 2008 04:56 am (UTC)
rather than having me at hello, aria, you lost me at idea. :P

and i imagined all of this in your creepy old man voice too. :(
(Anonymous)
Apr. 13th, 2008 04:13 pm (UTC)
autotools are evil
While I hate autotools I think pure makefiles will make it even uglier. You might want to check waf as it's a rather nice autocrap replacement :)

-- Patrys
aredridel
Apr. 13th, 2008 04:37 pm (UTC)
Re: autotools are evil
The thing is, I don't want to replace it wholesale -- I want to use the existing infrastructure -- the checks are good, and the extensibility is excellent, it'd be nice to isolate the m4 macros into a system library and not have the complexity of auto* in various orders

I've been using gnustep-make, and it's exceptionally easy to use.
( 5 comments — Leave a comment )