On Thu, Aug 11, 2005 at 11:54:46PM +0300, Angel Tsankov wrote: > Is it possible to get a list of all cpp files in a folder (including > subfolders) using wildcard functions only?
Using wildcard alone, this can only be done using Paul's suggestion. However, you could define a function and recurse on it. It is much more efficient than $(shell)ing to find. It violates your original constraint by strip, eval, addsuffix, if, and call ;) find = \ $(strip \ $(eval these-files := $(wildcard $(addsuffix /*,$(strip $(1))))) \ $(these-files) \ $(if $(strip $(these-files)),$(call find,$(these-files))) \ ) This gets you everything. You can $(filter %.cpp,$(call find,dir)) to make this more specific or define another function which does that for you or modify the find function to deal with file suffixes or ... Ken _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
