Skip site navigation (1) Skip section navigation (2)

Re: Makefile for parser

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Chris Bitmead <chris(at)bitmead(dot)com>, Hackers List <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Makefile for parser
Date: 2000-07-02 15:21:56
Message-ID: Pine.LNX.4.21.0007021307110.351-100000@localhost.localdomain (view raw or flat)
Thread:
Lists: pgsql-hackers
Tom Lane writes:

> > On the topic of make, have you all read "Recursive Make Considered
> > Harmful" at http://www.tip.net.au/~millerp/rmch/recu-make-cons-harm.html
> 
> I read it, I don't believe a word of it.

Not only do I believe some words of it, I've had essentially the same
thoughts for quite a while. No, certainly there should not be a single
makefile for all of PostgreSQL. I'd certainly like to be able to do `make
-C src/bin/psql install'. But for the backend tree where you only build
one program this certainly would make sense. And note that the author's
example is essentially the same we've been talking about: a parse.h file
with incomplete dependencies.

> The whole thing is founded on a bogus example, to which is added
> specious reasoning and an assumption that everyone wants to use GCC as
> compiler

Well, you would need a compiler that handles -c and -o at the same time,
but you can always use cc -c && mv if that doesn't work. I think GNU make
might even do that by default, but I'd have to check.

> The Postgres build setup is certainly far from ideal, but IMHO the only
> thing *really* wrong with it is that we're not constructing accurate
> dependency lists by default.

Accurate dependencies are one thing, actually knowing how to satisfy these
dependencies is another. If the dependencies say that file X depends on
fmgroids.h but no further information about fmgroids.h is provided then it
will fail if it doesn't exist, or assume on mere existance that it is up
to date. This is again exactly what this guy is talking about.


Concluding, I don't know how well the suggested setup would work. I
haven't tried it, but I certainly will. In any case there's got to be
something better than maintaining 50+ makefiles that all do the same thing
and all do the same thing wrong.


-- 
Peter Eisentraut                  Sernanders väg 10:115
peter_e(at)gmx(dot)net                   75262 Uppsala
http://yi.org/peter-e/            Sweden


In response to

pgsql-hackers by date

Next:From: Peter EisentrautDate: 2000-07-02 15:22:18
Subject: Re: Makefile for parser
Previous:From: Philip WarnerDate: 2000-07-02 12:46:23
Subject: Re: Announce: Testers needed for revised pg_dump/pg_restore

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group