Re: Makefiles don't seem to remember to rebuild everything anymore

From: Cédric Villemain <cedric(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Makefiles don't seem to remember to rebuild everything anymore
Date: 2012-12-17 16:22:05
Message-ID: 201212171722.09163.cedric@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Le lundi 17 décembre 2012 16:45:16, Tom Lane a écrit :
> Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com> writes:
> > On Mon, Dec 17, 2012 at 7:16 PM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> >> If you
> >> want to rebuild postgres, run make in src/backend, and analyze.o (or
> >> whatever) will be rebuilt.
> >
> > FWIW for me, make in src/backend fails with this:
> > i686-apple-darwin11-llvm-gcc-4.2: parser/analyze.o: No such file or
> > directory make: *** [postgres] Error 1
>
> Yes, I see the same, on both make 3.81 and 3.82. (BTW, you have to
> remove the postgres executable, else make won't even try to rebuild it.)
>
> IMO this is broken. It did not use to work like that, either.
> I'm familiar with the behavior here because I frequently recompile
> individual .o files (eg, to build them with nondefault -O settings)
> and am in the habit of rm'ing the .o file afterwards to let things
> go back to normal. They no longer do.
>
> Having seen this, I now think .SECONDARY is broken across the board.
> A case comparable to .o files with nondefault CFLAGS could be that
> one manually edits gram.c (say, to inject some debugging code),
> rebuilds, and later wants to revert to a standard build. Formerly
> you'd just rm gram.c and things would be good. Now, it's quite
> unobvious what would need to be removed to convince make to do what
> it's contracted to do. If you didn't watch the rebuild step very
> closely (or, heaven forbid, used make -s and didn't see anything),
> you could waste a lot of time before realizing that make hadn't
> done what it's supposed to.

make does what it is supposed to do here IIUC.
Then we may just want to move the .SECONDARY in an ifcase again (the
.SECONDARY is still interesting)

What was the consensus when Peter did the change ?
--
Cédric Villemain +33 (0)6 20 30 22 52
http://2ndQuadrant.fr/
PostgreSQL: Support 24x7 - Développement, Expertise et Formation

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-12-17 16:42:04 Re: Makefiles don't seem to remember to rebuild everything anymore
Previous Message Tom Lane 2012-12-17 16:19:15 Re: pg_basebackup from cascading standby after timeline switch