On 27 September 2007 15:01, Eli Zaretskii wrote:
>> From: "Dave Korn" <[EMAIL PROTECTED]>
>> Date: Thu, 27 Sep 2007 13:25:57 +0100
>> Cc:
>>
>>> Suppose I have a root directory, whose subdirectories could also
>>> subdirectories, etc. I want to wildcard all the .cc in the root
>>> directory, which shall give me all the path of all the .cc files.
>>> Would you please let me know how to do it?
>>
>> Is this what you're looking for?
>>
>> DIR:=/path/to/whereever
>> CC_FILES_IN_ROOT:=$(wildcard $(DIR)/*.cc)
>
> No, I think he wants the files in subdirectories as well, and then in
> subdirectories of those subdirectories, etc., recursively.
Ah, I misunderstood the use of "root directory" in "all the .cc in the root
directory", but in that case AFAIK the only way to do it would be
DIR:=/path/to/whereever
CC_FILES_IN_ROOT:=$(shell find $(DIR) -type f -name '*.cc')
(Well, you could actually get horribly tricky with recursive functions adding
successive instances of '*/' to the front of a string that start of as '.cc'
and using $(wildcard) on that, but it's probably not worth the trouble).
cheers,
DaveK
--
Can't think of a witty .sigline today....
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make