[QBS] Re-do the wildcard implementation.

André Somers andre at familiesomers.nl
Tue Jan 15 09:00:54 CET 2013


Op 14-1-2013 11:07, Ruslan Nigmatullin schreef:
> As it was shown, file pattern semantic is not clear right now in qbs and compete with bash patterns.
>
> It was proposed to use zsh-style patterns, which are very similiar with wildcard patterns, but introduce one more synax sugar: "**" (double stars), documentation (bash, 4.0) says, that:
>
>> The pattern ** used in a pathname expansion context will match all files and zero or more directories and subdirectories.
>> If the pattern is followed by a /, only directories and subdirectories match.
> 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.
>
> So,
> Group { recursive: true; files: "artwork/*" }
> can be replaced by
> Group { file: "artwork/**/*" }
> and their behaviour is absolutely identical.
>
> 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.
To me, this pattern looks really, really unclear. Even with your 
explanation, it makes very little sense to me. I'm quite sure I'll not 
be the only one to be confused.

André




More information about the Qbs mailing list