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 t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Mon, Dec 17, 2012 at 1:34 PM, Tom Lane t...@sss.pgh.pa.us wrote: This is definitely not per make's contract, either. I think maybe the Don't rebuild the list if only the OBJS have

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 t...@sss.pgh.pa.us 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

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

2012-12-18 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Mon, Dec 17, 2012 at 1:34 PM, Tom Lane t...@sss.pgh.pa.us 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

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?= ced...@2ndquadrant.com 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

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 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

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?= ced...@2ndquadrant.com 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

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

2012-12-17 Thread Tom Lane
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:

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 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

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?= ced...@2ndquadrant.com 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

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?= ced...@2ndquadrant.com writes: Le vendredi 14 décembre 2012 23:02:11, Tom Lane a écrit : $ rm gram.o

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?= ced...@2ndquadrant.com 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

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 ced...@2ndquadrant.com 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 $

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?= ced...@2ndquadrant.com 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

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?= ced...@2ndquadrant.com 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

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

2012-12-17 Thread Tom Lane
Peter Eisentraut pe...@eisentraut.org 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

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 experimented a

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 pavan.deola...@gmail.com 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:

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'. WTF? A

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?= ced...@2ndquadrant.com 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

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 t...@sss.pgh.pa.us wrote: =?iso-8859-15?q?C=E9dric_Villemain?= ced...@2ndquadrant.com 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?