Re: Required make version - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Required make version
Date
Msg-id 200802270150.09422.peter_e@gmx.net
Whole thread Raw
In response to Re: Required make version  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Required make version
Re: Required make version
List pgsql-hackers
Tom Lane wrote:
> Andrew Dunstan <andrew@dunslane.net> writes:
> > only objfiles.txt uses the somewhat arcane feature that is apparently
> > breaking dawn_bat - it is apparently not used anywhere else in our build
> > system.
> >
> > Is that really the only way we can do it? Maybe Peter understands it but
> > I don't, and I'm not sure I want to invest lots of brain cells in
> > finding out.
>
> Yeah, I'm not seeing why we should suddenly need a make feature we never
> needed before ...

This was in response to your request
   BTW, why does this patch force objfiles.txt to be regenerated every time   any individual .o file is rebuilt?
Surelyit need only depend on the   specific Makefile (and maybe Makefile.global).
 
   I find the current behavior kind of annoying because the echo command   occupies more than a full window in some
subdirectories(eg utils/adt),   making it necessary to scroll back to see whether one's recompile of a   couple of
modifiedfiles generated any warnings.
 

In the original implementation, objfiles.txt needs to be regenerated every 
time an .o file is rebuilt

1) to tell make to build the .o files in the first place, and
2) to rebuild postgres by looking when an objfiles.txt file has changed.

Using the order-only prerequisites feature, which is what is failing with the 
old make version, solves item 1).

The alternative is your suggestion
   If the dependencies   need to stay as they are, maybe we could avoid the annoyance by having   make not print the
echocommand.
 

but I'm not a friend of hiding commands because you don't know what is going 
on and it will come back to bite you.

So obviously, there are a few possible solutions.  We just have to pick one we 
like best.

We could actually query make whether it supports order-only prerequisites and 
only use the developer-optimized rules in that case.  That would mean, 
however, that the optimized rules would only be used with GNU make 3.81 or 
higher.  I read earlier that you use 3.79.1, so then you still wouldn't get 
the behavior you want.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/


pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: multi-worker pg_restore was: 8.3 / 8.2.6 restore comparison
Next
From: "Andrej Ricnik-Bay"
Date:
Subject: Re: Two Coverity Scan volunteers needed