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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Makefiles don't seem to remember to rebuild everything anymore
Дата
Msg-id 25318.1355759116@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Makefiles don't seem to remember to rebuild everything anymore  (Pavan Deolasee <pavan.deolasee@gmail.com>)
Ответы Re: Makefiles don't seem to remember to rebuild everything anymore
Список pgsql-hackers
Pavan Deolasee <pavan.deolasee@gmail.com> writes:
> On Mon, Dec 17, 2012 at 7:16 PM, Peter Eisentraut <peter_e@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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Dimitri Fontaine
Дата:
Сообщение: Re: Enabling Checksums
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_basebackup from cascading standby after timeline switch