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

From Pavan Deolasee
Subject Re: Makefiles don't seem to remember to rebuild everything anymore
Date
Msg-id CABOikdOHVpXYQqB5mxZLLyxBSb-zTJ9gLO_Y2PynCVkj9=KPSw@mail.gmail.com
Whole thread Raw
In response to Re: Makefiles don't seem to remember to rebuild everything anymore  (Pavan Deolasee <pavan.deolasee@gmail.com>)
List pgsql-hackers
On Sun, Dec 16, 2012 at 12:23 AM, Pavan Deolasee
<pavan.deolasee@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: ftp://ftp.gnu.org/old-gnu/Manuals/make-3.79.1/html_chapter/make_10.html#SEC97)
>

And here is another relevant info from
http://www.gnu.org/software/make/manual/html_node/Special-Targets.html

".SECONDARY with no prerequisites causes all targets to be treated as
secondary (i.e., no target is removed because it is considered
intermediate)."

Reading that along with the other comment explains what we are seeing
with a .SECONDARY without any prerequisites. BTW I also tried with a
very simple Makefile to rule out any roles that implicit rules might
be playing. If I create a Makefile like below:

final: sfinalcp sfinal final
sfinal: qfinalcp qfinal sfinal
qfinal:touch qfinal

If I build fully and then remove file "sfinal", subsequent make will
recreate that file. But if I add a ".SECONDARY:" target without any
prerequisites, "sfinal" will not be recreated.

Thanks,
Pavan
-- 
Pavan Deolasee
http://www.linkedin.com/in/pavandeolasee



pgsql-hackers by date:

Previous
From: Pavan Deolasee
Date:
Subject: Re: Set visibility map bit after HOT prune
Next
From: Pavel Stehule
Date:
Subject: Re: multiple CREATE FUNCTION AS items for PLs