I just wanted to share the following. I created two functions: define _include-makefile __FILE__ := $(1) include $(1) __FILE__ := $(2) endef
# include makefile passing in its name as __FILE__ include-makefile = $(eval $(call _include-makefile,$(1),$(__FILE__))) That can be used by doing something like: $(call include-makefile,another/makefile) such that another/makefile will know it's path relative to the includer so it, in turn, can do something like: $(call include-makefile,$(dir $(__FILE__))/yet-another-makefile) I think I had posted something similar a while back, but this version uses function-local variables to save and restore the previous __FILE__ value. 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
