Pavan Deolasee <pavan.deola...@gmail.com> writes:
> On Mon, Dec 17, 2012 at 7:16 PM, Peter Eisentraut <pete...@gmx.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.

                        regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to