[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: Makefiles



On Sun, Jul 20, 2003 at 03:42:35PM -0500, Steve Baker wrote:
> Francesco Orsenigo wrote:
> >Ok, i finally entered the wonderful world of Makefiles.
> 
> Excellent!
> 
> Now you need to learn the 'auto' tools - automake, autoconf, autolib, etc.
> 
> These automatically generate Makefiles from the yet simpler 'Makefile.am',
> and automatically handle all the '.deps' directory stuff that you are 
> struggling
> with.
> 
> Automake builds really comprehensive Makefiles with 'clean' and 'distclean'
> targets - and lots of other things to make your Makefile more robust.
> 

autotools have many detractors, but they really do make things much easier
than trying to build your own Makefiles by hand.

When I saw the initial post, I considered a post recommending autotools, but
held back because such a recommendation often triggers a flame war.

The deps handling really is very good, it supports building the object
files away from the source tree, and in addition to the rules Steve
mentions above, it also has dist and distcheck rules which I find invaluable
for creating distributions, check rules for automated testing, and libtool
takes away much of the pain of creating libraries, should you need to.

A key benifit it has over other alternatives to hand-written Makefiles is
that the resulting code can be built on a machine that does not have
autotools installed. The generated configure script and the Makefiles it
in turn generates require only the most basic shell and make features.

Al
-- 
Alistair Riddoch
alriddoch@zepler.org
http://www.zepler.org/~alriddoch/
It's GNU/Linux dammit!

Attachment: pgp00000.pgp
Description: PGP signature