%% gk <[EMAIL PROTECTED]> writes:
g> I'm using Gnu make 3.79.1 I've noticed that there is no test for
g> circularity of include statements, like there is for circular
g> dependencies. I think it would be a nice feature to add.
Unlike prerequisites, circular includes could be done without looping
infinitely (because you can use preprocessor statements to control
this).
g> --- Makefile:
g> include Makefile2
g> --- Makefile2:
g> include Makefile
g> Infinite loop results.
g> How should this be prevented?
The same way as it's done in C:
$ cat MyMakefile.mk
ifndef __MY_MAKEFILE
__MY_MAKEFILE := 1
...contents...
endif
In 3.80 I suppose you could test the MAKEFILE_LIST variable to see if
the file is already included, and not include it if it has been.
--
-------------------------------------------------------------------------------
Paul D. Smith <[EMAIL PROTECTED]> Find some GNU make tips at:
http://www.gnu.org http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make