> > > > To put the following statments in the file Makefile.mak before the > > statment including "generated.mak" > > > > ifneq ($(MAKECMDGOALS),main_target) > > > > include print_start_message > > > > print_start_message: > > > > echo "Makefile executed at" `date` > build.log > > > > endif > > > > when "Makefile" will be executed, it will try to include the file > > "print_start_message". This file does not exist and make will try to > > regenerate it. It will find a rule to generate it and this rule will > > print some messages in the file "build.log" but it will not generate > > any makefile "print_start_message". >
Thank you very much for your answer. > I see a couple of improvements here: > 1. "include print_start_message" really should be "-include print_start_message" > so that no warning message is generated. Good point. > > 2. using $(shell) is much clearer than the "include"-"rule" thing. > :))) 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". 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. > > HTH, 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
