If you have all makefiles under your control, then probably the following machinery can help you:
I use/include this one in the master-file that includes all other files: #*************************************** # __FILE__ # var_from_string = $1 define __FILE__prefix tmp := $$(word $$(words $$(MAKEFILE_LIST)),$$(MAKEFILE_LIST)) $$(call var_from_string,$$(tmp))__FILE__old := $$(__FILE__) __FILE__ := $$(tmp) endef define __FILE__suffix __FILE__ := $($(call var_from_string,$(__FILE__))__FILE__old) endef # # __FILE__ #*************************************** $(eval $(__FILE__prefix)) Then each other file that wants to know/use its own name looks like ... #----------------------------------- $(eval $(__FILE__prefix)) _______________________________________________ Help-make mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/help-make
