On Thu, 18 Dec 2003, Noel Yap wrote:

> Cristian Zoicas wrote:
> > If you do this way (I've tried) then the $(shell) statement is executed
> > two times  because of the regeneration of the file "generated.mak" even
> > if the statement is found in the file "Makefile".
>
> Good point.  But I'd think that since print_start_message doesn't exist on the 
> second pass, that the action would still be gone through twice.
>

I expected make to enter an infinite loop, but the documentation says
that if the file is not created after it's the rule  which creates it
is executed then it will not be regenerated again.


> Also, I forgot to mention that you probably want:
>
> .PHONY: print_start_message
>
> just in case somehow the file print_start_message does get created.
>
> > I asked some weeks on this mailing list ago why the $(shell) statement is
> > executed two times and I found that this behavior is by design.
>
> Yeah, it'd be a good feature to be able to write conditional makefiles based on the 
> re-exec count.
>
> Noel
> --
> NOTICE: If received in error, please destroy and notify sender.  Sender does not 
> waive confidentiality or privilege, and use is prohibited.
>



_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make

Reply via email to