I see some makefiles include many other makefiles by some complex
functions. A probable reasonable feature for make is to output the
final makefile as a text file so that a reader does not have to run
those functions each time to understand the makefile. One example is
the follows:
includemakefiles= \
$(foreach type,$(2), $(eval $(type)-y:=)) \
$(eval subdirs-y:=) \
$(eval -include $(1)) \
$(foreach type,$(2), \
$(eval $(type)s+= \
$$(subst $(top)/,, \
$$(abspath $$(patsubst src/%, \
$(obj)/%, \
$$(addprefix $(dir
$(1)),$$($(type)-y))))))) \
$(eval subdirs+=$$(subst $(PWD)/,,$$(abspath $$(addprefix $(dir
$(1)),$$(subdirs-y)))))
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make