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