Aria Stewart ([info]aredridel) wrote,

Idea: migrating autotools into a pure gnu-make system

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: geek

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    Your reply will be screened

    Your IP address will be recorded 

  • 5 comments

[info]ginaspider

April 13 2008, 02:31:14 UTC 4 years ago

The openbsd makefile structure is pretty elegant in this regard. I personally don't like autotools very much.

[info]aredridel

April 13 2008, 03:30:41 UTC 4 years ago

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.

[info]lizdean

April 13 2008, 04:56:52 UTC 4 years ago

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

April 13 2008, 16:13:13 UTC 4 years ago

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

[info]aredridel

April 13 2008, 16:37:33 UTC 4 years ago

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.
Create an Account
Forgot your login or password?
Facebook Twitter More login options
English • Español • Deutsch • Русский…