[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problems with $(eval include...)

From: Fabio Alemagna
Subject: Re: problems with $(eval include...)
Date: Sat, 28 Jun 2003 02:27:25 +0200 (CEST)

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))))

However it might be slower, because it adds one module at time to the

Fabio Alemagna

reply via email to

[Prev in Thread] Current Thread [Next in Thread]