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

2012-12-19 Thread Robert Haas
On Wed, Dec 19, 2012 at 12:22 AM, Tom Lane wrote: > Robert Haas writes: >> On Mon, Dec 17, 2012 at 1:34 PM, Tom Lane wrote: >>> This is definitely not per make's contract, either. I think maybe the >>> "Don't rebuild the list if only the OBJS have changed" hack in common.mk >>> is a brick or tw

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

2012-12-18 Thread Tom Lane
Robert Haas writes: > On Mon, Dec 17, 2012 at 1:34 PM, Tom Lane wrote: >> This is definitely not per make's contract, either. I think maybe the >> "Don't rebuild the list if only the OBJS have changed" hack in common.mk >> is a brick or two shy of a load, but I don't know how to fix that. > I f

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

2012-12-18 Thread Robert Haas
On Mon, Dec 17, 2012 at 1:34 PM, Tom Lane wrote: > I wrote: >> Now perhaps this is not make's fault so much as a lack of adequate >> dependency specifications. It may be that we can still use .SECONDARY >> if we add the $(OBJS) lists as explicit targets of "make all" in backend >> directories, bu

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

2012-12-17 Thread Tom Lane
I wrote: > Now perhaps this is not make's fault so much as a lack of adequate > dependency specifications. It may be that we can still use .SECONDARY > if we add the $(OBJS) lists as explicit targets of "make all" in backend > directories, but I'm not sure how invasive that would be. I experiment

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

2012-12-17 Thread Tom Lane
Peter Eisentraut writes: > I suppose that you are not using automatic dependency mode, so you are > seeing the change just now with the recent introduction of global > .SECONDARY. True. > This is working correctly, as far as make is concerned. There is no > configuration knob in make that says,

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

2012-12-17 Thread Peter Eisentraut
On 12/17/12 8:46 AM, Peter Eisentraut wrote: > On 12/15/12 11:23 AM, Tom Lane wrote: >> =?iso-8859-15?q?C=E9dric_Villemain?= writes: >>> Le vendredi 14 décembre 2012 23:02:11, Tom Lane a écrit : $ rm gram.o rm: remove regular file `gram.o'? y $ make make: Nothing to be done for

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

2012-12-17 Thread Tom Lane
=?iso-8859-15?q?C=E9dric_Villemain?= writes: > Le lundi 17 décembre 2012 17:42:04, Tom Lane a écrit : >> Well, it's behaving as documented, but what this means is we need to be >> very wary of what contexts we can use .SECONDARY in. I'd just as soon >> try to avoid using it at all --- my example

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

2012-12-17 Thread Pavan Deolasee
On Mon, Dec 17, 2012 at 10:19 PM, Cédric Villemain wrote: > > That's not so obvious. > The current behavior is expected by .SECONDARY. > In other words, if I just 'touch rewriteDefine.c' then rewriteDefine.o will be > rebuilt by make (as expected). > > $ touch rewriteDefine.c > $ make > gcc -O2 -

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

2012-12-17 Thread Cédric Villemain
Le lundi 17 décembre 2012 17:42:04, Tom Lane a écrit : > =?iso-8859-15?q?C=E9dric_Villemain?= writes: > > Le lundi 17 décembre 2012 16:45:16, Tom Lane a écrit : > >> Having seen this, I now think .SECONDARY is broken across the board. > > > > make does what it is supposed to do here IIUC. > > We

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

2012-12-17 Thread Cédric Villemain
Le lundi 17 décembre 2012 15:29:09, Andrew Dunstan a écrit : > On 12/17/2012 08:46 AM, Peter Eisentraut wrote: > > On 12/15/12 11:23 AM, Tom Lane wrote: > >> =?iso-8859-15?q?C=E9dric_Villemain?= writes: > >>> Le vendredi 14 décembre 2012 23:02:11, Tom Lane a écrit : > $ rm gram.o > rm: r

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

2012-12-17 Thread Tom Lane
=?iso-8859-15?q?C=E9dric_Villemain?= writes: > Le lundi 17 décembre 2012 16:45:16, Tom Lane a écrit : >> Having seen this, I now think .SECONDARY is broken across the board. > make does what it is supposed to do here IIUC. Well, it's behaving as documented, but what this means is we need to be v

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

2012-12-17 Thread Cédric Villemain
Le lundi 17 décembre 2012 16:45:16, Tom Lane a écrit : > Pavan Deolasee writes: > > On Mon, Dec 17, 2012 at 7:16 PM, Peter Eisentraut 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/back

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

2012-12-17 Thread Tom Lane
Pavan Deolasee writes: > On Mon, Dec 17, 2012 at 7:16 PM, Peter Eisentraut 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

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

2012-12-17 Thread Andrew Dunstan
On 12/17/2012 08:46 AM, Peter Eisentraut wrote: On 12/15/12 11:23 AM, Tom Lane wrote: =?iso-8859-15?q?C=E9dric_Villemain?= writes: Le vendredi 14 décembre 2012 23:02:11, Tom Lane a écrit : $ rm gram.o rm: remove regular file `gram.o'? y $ make make: Nothing to be done for `all'. WTF? A pre

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

2012-12-17 Thread Pavan Deolasee
On Mon, Dec 17, 2012 at 7:16 PM, Peter Eisentraut 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 ma

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

2012-12-17 Thread Peter Eisentraut
On 12/15/12 11:23 AM, Tom Lane wrote: > =?iso-8859-15?q?C=E9dric_Villemain?= writes: >> Le vendredi 14 décembre 2012 23:02:11, Tom Lane a écrit : >>> $ rm gram.o >>> rm: remove regular file `gram.o'? y >>> $ make >>> make: Nothing to be done for `all'. >>> >>> WTF? > >> A previous patch changed t

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

2012-12-16 Thread Pavan Deolasee
On Sun, Dec 16, 2012 at 12:23 AM, Pavan Deolasee wrote: > > "When a file is secondary, make will not create the file merely > because it does not already exist, but make does not automatically > delete the file." > (link: > ftp://ftp.gnu.org/old-gnu/Manuals/make-3.79.1/html_chapter/make_10.html#

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

2012-12-15 Thread Pavan Deolasee
On Sat, Dec 15, 2012 at 9:53 PM, Tom Lane wrote: > =?iso-8859-15?q?C=E9dric_Villemain?= writes: >> Le vendredi 14 décembre 2012 23:02:11, Tom Lane a écrit : >>> $ rm gram.o >>> rm: remove regular file `gram.o'? y >>> $ make >>> make: Nothing to be done for `all'. >>> >>> WTF? > >> A previous patc

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

2012-12-15 Thread Tom Lane
=?iso-8859-15?q?C=E9dric_Villemain?= writes: > Le vendredi 14 décembre 2012 23:02:11, Tom Lane a écrit : >> $ rm gram.o >> rm: remove regular file `gram.o'? y >> $ make >> make: Nothing to be done for `all'. >> >> WTF? > A previous patch changed the ".SECONDARY" from an if() section to the main

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

2012-12-15 Thread Cédric Villemain
Le vendredi 14 décembre 2012 23:02:11, Tom Lane a écrit : > In a fully-built source tree: > > $ cd pgsql/src/backend/parser > $ make > make: Nothing to be done for `all'. > ... okay so far ... > $ rm gram.o > rm: remove regular file `gram.o'? y > $ make > make: Nothing to be done for `all'. > > W