%% "Dill, John" <[EMAIL PROTECTED]> writes: dj> That's nice to know, but it seems a little too verbose. I'd like dj> to do something more to the effect of 'include $(call dj> guard,defs.mk)' or '$(call include_guard,defs.mk)' where guard dj> would do something to check the appropriate tag.
include_guard = $(if $(filter $1,$(.VARIABLES)),,$1) Unfortunately there's a problem here: I think plain "include" with no file after it might be considered an error. If so you'll need to use eval. You need GNU make 3.80 for this. dj> Also, can you implement something like '$(call function,defs.mk)' dj> which will return the text of 'include defs.mk' if that test dj> passes, and make will perform the include. No, but you can use eval to do it. Again you need GNU make 3.80. dj> Also, can functions be used reliably to define variables? dj> Something like: dj> $(call tx_include_name,defs.mk):=1 Sure. -- ------------------------------------------------------------------------------- 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
