Re: Patch for Makefile race against current cvs

From: Klaus Naumann <knaumann(at)gmx-ag(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Klaus Naumann <knaumann(at)gmx-ag(dot)de>, <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Patch for Makefile race against current cvs
Date: 2001-11-09 21:02:38
Message-ID: Pine.LNX.4.40.0111092156200.11554-100000@kn.technik.gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

On Fri, 9 Nov 2001, Tom Lane wrote:

> Klaus Naumann <knaumann(at)gmx-ag(dot)de> writes:
> > Yes, I also have seen races in two other directories
> > (and decided to change all occorences of the two-file
> > target in any Makefile because I'm under the impression
> > that it's to dangerous ...).
>
> Now you're back to saying that any two-target rule is unsafe under
> parallel make. I find that hard to believe, given the lack of any
> suggestion in the gmake documents that any care needs to be taken
> to make things safe for parallel makes.

At least the last sentence is just plain wrong. I have seen
and heard of several projects which had to change their
Makefiles to make parallel builds work.
A good example would be the linux kernel.
If you do a make -j3 dep clean bzImage you really f*ck up things
as it's all done in parallel. If you would add a rule

anything: dep clean bzImage

things would get messed up too (I have tried it ...).
I don't count this as a bug in make ...

And no, I'm not saying that any two-target rule is unsafe,
I just said I removed all as I think that it's a good idea
to aviod possible problems which might occur in the future.

CU, Klaus

--
Klaus Naumann
Systems Administration
GMX Aktiengesellschaft
Riesstrasse 17, 80992 München
Telefon +49.89.143 39-0
Telefax +49.89.143 39-100
mailto:knaumann(at)gmx-ag(dot)de
http://www.gmx.net/

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Brent Verner 2001-11-10 10:58:17 ALTER TABLE RENAME fix
Previous Message Tom Lane 2001-11-09 20:38:27 Re: Patch for Makefile race against current cvs