Re: Required make version

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Required make version
Date: 2008-02-27 00:50:08
Message-ID: 200802270150.09422.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)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? Surely it 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 modified files 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 echo command.

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/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Stark 2008-02-27 02:03:45 Re: pg_dump additional options for performance
Previous Message Andrej Ricnik-Bay 2008-02-27 00:29:33 Re: Two Coverity Scan volunteers needed