Re: Makefiles don't seem to remember to rebuild everything anymore - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Makefiles don't seem to remember to rebuild everything anymore
Date
Msg-id 50CF5F17.9030803@eisentraut.org
Whole thread Raw
In response to Re: Makefiles don't seem to remember to rebuild everything anymore  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Makefiles don't seem to remember to rebuild everything anymore  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 12/17/12 8:46 AM, Peter Eisentraut wrote:
> On 12/15/12 11:23 AM, Tom Lane wrote:
>> Cédric Villemain <cedric@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 the main
>>> section of src/Makefile.global.in,
>>
>> Hm.  I should have made clear that this isn't specific to gram.o ---
>> I also tried "rm analyze.o" and that didn't trigger any action either.
>> So it doesn't seem to be a case of the bison rule chain being
>> specifically at fault.
>>
>> I do suspect that this was triggered by some fairly recent makefile
>> change, though, because I don't recall having seen anything as odd
>> as this until recently.
>
> I can see it in 9.1 but not in 9.0, but I haven't had the time to
> pinpoint the exact change.

The change happened here:

[5c788e7cf5026be1cad634f12bb42111a411cd9e] When in automatic dependency
mode, never delete any intermediate files automatically.

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.

This is working correctly, as far as make is concerned.  There is no
configuration knob in make that says, build all the files you can think
of even though they are not required for the target I gave you.

If you are not happy with the current behavior, I suppose the best way
forward would be to revert the global .SECONDARY setting and instead
explicitly list the files you don't want deleted in localized .SECONDARY
targets (something like .SECONDARY: gram.c).  Needs some testing, of course.





pgsql-hackers by date:

Previous
From: Pavan Deolasee
Date:
Subject: Re: XLByte* usage
Next
From: Pavan Deolasee
Date:
Subject: Re: XLByte* usage