help-make
[Top][All Lists]
Advanced

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

Re: use of wildcard function recursively


From: Chris Chiasson
Subject: Re: use of wildcard function recursively
Date: Thu, 16 Mar 2006 01:24:34 -0600

Depending on your shell and the utilities available, you could easily
do this with a shell command. I use bash, find, and sed to obtain a
list in the appropriate format.

$(addprefix $(CURDIR),$(shell find . -type f -name "*.article.xml"
-print | sed 's/^\.//'))

where *.article.xml could be whatever for which you want to search.

I would be interested in hearing a more "make-native" way of doing this.

On 3/16/06, Aditya Kher <address@hidden> wrote:
> list,
> The wild card function will give list of *.c files in the current directory
>
> SOURCE = $(wildcard *.c)
>
> Is there any way to use wildcard to *find recursively* under given path
> e.g.
>
> SOURCE = $(wildcard source_dir/*.c)
>
> where the directory structrure is
>
> source_dir
>  |
> +-- dir_a
>  |
> +-- dir_b
>  |
> +-- dir_c
>
> and in all these directories, *.c files are scattered all over?
>
> -aditya
>
>
> _______________________________________________
> Help-make mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-make
>


--
http://chris.chiasson.name/




reply via email to

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