help-make
[Top][All Lists]
Advanced

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

Re: $(wildcard) question


From: Eli Zaretskii
Subject: Re: $(wildcard) question
Date: Thu, 25 Oct 2007 23:31:43 +0200

> From: Gary Allan Howard <address@hidden>
> Date: Wed, 24 Oct 2007 22:30:20 -0700
> 
> I need to get a list of all files from multiple directories and I'm
> not sure how to accomplish my task.
> 
> Using a bash shell, I would type: find ../../../. -name "*.mak".  As
> expected, the find command prints each file matching the pattern
> to standard out.
> 
> I've tried the following in a make file.
> 
> files = $(foreach f,../../..,$(wildcard $f/*.mak))
> all:
>       @ $(foreach f,$(files),echo $f;)
> 
> The all target displays only the *.mak files in the top directory.
> I need to recurse all directories. Is there a simple way to accomplish
> this with make?

How about

  files := $(shell find ../../../. -name "*.mak")




reply via email to

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