[QBS] Aliases in QBS - first prototype

marius.storm-olsen at nokia.com marius.storm-olsen at nokia.com
Fri Feb 17 18:11:39 CET 2012

On 2/17/12 8:17 AM, "Joerg Bornemann" <joerg.bornemann at nokia.com> wrote:

>On 17/02/2012 14:16, ext marius.storm-olsen at nokia.com wrote:
>> Not necessarily to _define_ build configurations, but perhaps to easily
>> allow you to repeat builds you do quite often. Take Bogdans' build for
>> multiple hosts at the same time, often.
>> Being able to say
>>       qbs buildall-arm
>> for example, would make it simpler for him, and many others I'm sure.
>> Sure you can always argue, 'you can just make a 1-line shell script for
>> that!'. So could you for git as well, yet aliases are there, and I
>> already have plenty of them. It's useful.
>I like both ideas. The aliases approach can be used for other short-hand
>commands as well.
>What Ossi proposes could also be wrapped in something like a git-like
># set up what we want to build in this build directory
>qbs init-build debug foo:bar release x:y a:b c:d e:f
># now build
>...hack hack hack...
># build again
>That's even less to type but also less flexible.
>You see that's also not fully thought through. ;)

IMO, that's more project configuration; which is why I argue that we
should wait with it until we have thought through the configuration nodes
etc a bit more. Just to be sure we don't "feature" ourselves into a corner
before we find the optimal solution. :)

For now I think aliases have a place. Take your initial command for
example. Perhaps you do that a lot. You have a lot of small projects, so
perhaps you want to alias "init-build debug foo:bar release x:y a:b c:d
e:f" to "new_project", so you can just
    qbs new_project
each time instead.

I don't see a reason _not_ to support such a convenience.


More information about the Qbs mailing list