On Sat, 28 Jun 2003, Fabio Alemagna wrote: > This is the code: > > define getdeplist_1 > $(eval __ALLDEPS__ += $(1)) $(foreach m,$(1),$(foreach d,$($(m)/DEPS),$(if \ > $(findstring $(d),$(__ALLDEPS__)),,$(call getdeplist_1,$(d))))) > endef
This one is simpler and more correct (in that it doesn't allow any duplicate modules in the deps list): define getdeplist_1 $(foreach m,$(1),$(if $(findstring $(m),$(__ALLDEPS__)),,$(eval \ __ALLDEPS__ += $(m)) $(call getdeplist_1,$($(m)/DEPS)))) endef However it might be slower, because it adds one module at time to the list. Fabio Alemagna _______________________________________________ Bug-make mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-make