[geeks] Makefile question
Greg A. Woods
woods at weird.com
Sat Nov 9 17:33:14 CST 2002
[ On Saturday, November 9, 2002 at 16:00:23 (-0600), Jonathan C. Patschke wrote: ]
> Subject: Re: [geeks] Makefile question
>
> On Sat, 9 Nov 2002, Greg A. Woods wrote:
>
> > Yup, there is. Implicit rules and/or with GNU Make you can also use
> > static pattern rules.
>
> Is this portable to any other make? It looks like a really concise
> solution to the problem, but I personally prefer Makefiles that work on
> any vaguely-sane make tool.
Yes, implicit rules and their implicit dependencies are a fundamental
feature of pretty much any make that's even remotely compatible with the
original V7 make.
Unfortunately GNU Automake doesn't create fully compatible makefiles
(and never really did, though it's worse in the versions since 1.4) --
they rely (for no really good or valid reason except lack of imagination
and an apparent N.I.H. mentality) on GNU Make features for automatic
dependency tracking, and there are some other corner cases that automake
generated makefiles can get into trouble with too.
Just so you know I'm not too biased in against one version of Make I
should say that BSD Make isn't much better than GNU make at inventing
non-portable features. I recommend reading about the following things:
http://aegis.sourceforge.net/auug97.pdf
http://www.canb.auug.org.au/~millerp/cook/
http://www.perforce.com/jam/jam.html
http://dmake.wticorp.com/ [oops -- seems wticorp.com has gone POOF!]
Note that because most of my work either involves *BSD where I use the
BSD Make exclusively, or freeware that I wish to be widely portable I
generally don't practice what I preach w.r.t. makefiles very much. For
freeware projects I once used mkmf, but more recently I've started using
GNU Automake despite its many deficiencies.
--
Greg A. Woods
+1 416 218-0098; <g.a.woods at ieee.org>; <woods at robohack.ca>
Planix, Inc. <woods at planix.com>; VE3TCP; Secrets of the Weird <woods at weird.com>
More information about the geeks
mailing list