%% Joost Leeuwesteijn <[EMAIL PROTECTED]> writes: jl> You can check if make is run from the root directory by including a jl> first/default rule in the dir1 makefile that stops the build. Something jl> like: jl> ---------------------------------------- jl> .PHONY : dir1_default_rule jl> dir1_default_rule : jl> echo "ERROR: only run the toplevel makefile" jl> <not sure what's the best way to bail out (exit 1?, $$(error ...)>
jl> and/or check on a variable that must be set by the toplevel makefile and jl> call $(error ...) jl> ---------------------------------------- You could instead check the MAKELEVEL variable to see whether this is the top-level make, or a recursive invocation. -- ------------------------------------------------------------------------------- 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://lists.gnu.org/mailman/listinfo/help-make
