[QBS] Re-do the wildcard implementation.
euroelessar at yandex.ru
Mon Jan 14 13:30:49 CET 2013
14.01.2013, 16:25, "Bornemann Joerg" <Joerg.Bornemann at digia.com>:
>> So the pattern "src/**/*.cpp" will handle _all_ "*.cpp" files in "src" and all subdirectories of "src", I think this semantic is rather clear and, as we see, it's easy to be documented.
> Yes, if ** is just meant as a flag, it's easy.
Not as a flag, but as special entry, which means "zero or more subdirs".
> Would this be allowed: "artwork/**/subdir/*.jpg"?
> And what does it expand to?
It's interpreted as following:
1. Recursivly find all subdirectories "subdir" in directory "artwork".
2. Find all "*.jpg" files directly in found "subdir" dirs.
"artwork/subdir/1.jpg" - ok
"artwork/foo/subdir/1.jpg" - ok
"artwork/foo/boo/subdir/1.jpg" - ok
"artwork/subdir/any/1.jpg" - fail
"artwork/foo/subdir/any/1.jpg" - fail
"artwork/foo/boo/subdir/any/1.jpg" - fail
>> As additional bonus with this flag we can use both recursive and non-recursive targets in one Groups, which can simplify qbs-based build scripts.
> That's definitely a point on my pro list.
More information about the Qbs