[QBS] How to change build directory of a Product?

.Santanu Chakrabarti santanu.chakrabarti at gmail.com
Wed May 7 08:39:05 CEST 2014


Hi Joerg and Jake,

Thanks for your time to explain me in such a detail all my queries. Also I
am sorry for my late reply.

I am using qbs from command line for building the project. Qtcreator is
just my editor to rapidly write the code. So how it can be that if I change
the build setting in qtcreator for the build directory it would be
reflected in qbs?

" What's your use case?"
If I want to support multiple build systems for my project so that the user
who is pulling my source may use the one already installed in their system.
In that case I would like to have absolute control over the directory
structure and the naming convention of the generated artifacts so that its
uniform for all the  supported build systems.

Thanks again for all these help.

Regards
Santanu
On May 5, 2014 2:56 PM, "Joerg Bornemann" <joerg.bornemann at digia.com> wrote:

> On 03-May-14 22:40, Jake Petroules wrote:
>
> >> 2. I have found that the object file that is getting created if I
> >> build the QBS project has the name "XXXXX.c.o" if the file name is
> >> "XXXXX.c". How can I configure QBS to name the object file as "XXXXX.o"?
> >>
> > We did this so that having multiple files with the same base name but
> > different extensions will not cause an error. For example, if you have
> > both file.c and file.cpp, both cannot be built into file.o as this
> > causes a conflict. Currently you cannot change the naming scheme of
> > object files but given a good reason we may add a way for users to
> > configure it. Is there a specific reason you need your object files
> > named XXXXX.o?
>
> Also, we're considering the build directory to be opaque for the user.
> The directory layout and naming conventions of files should not matter.
>
> I have the same question like Jake. What's your use case?
>
> >> 3. Moreover the object files are getting generated in a folder ".obj"
> >> in the default build directory. How to configure this also?
> >>
> > This is currently not user-configurable but probably should be.
>
> Probably. But here as well: what's the use case?
>
> >> I am new to QBS as well as writing applications in C so any help
> >> regarding my above queries would be much appreciated. I shall also
> >> like to make some observations on QBS build system and its
> documentation.
> >> 1. I believe QBS is a very flexible build system, at least it appears
> >> so to me. But the documentation is very poor for a newcomer.
> >> Specifically, elaborate documentation is needed in the areas like
> >> Transformer, Rule (both multiplex and non-multiplex), Module, etc.
> >>
> > Qbs is a very new product so we still have a lot of work to do in this
> > area but it's definitely on the roadmap.
>
> That's unfortunately true. Please ask on this mailing list, if
> something's unclear. We'll try to extend the docs in those areas.
>
> >> 4. It is not obvious from documentation how to create custom build
> >> jobs in QBS. For example lets say in my project I have flex/bison
> >> files along with other C files and I want to build those flex/bison
> >> files first with respective tools before compiling all the C files.
> >> How to specify this custom step?
> >>
> > You'd do this using custom Rules, Transformers, and Modules. I remember
> > another user had written some Qbs scripts to handle flex/bison files;
> > perhaps we can add built-in support at some point. Again, this is
> > something that more extensive documentation could help with as you noted
> > in (1).
>
> There's an example in tests/auto/blackbox/testdata/codegen and another
> in tests/auto/blackbox/testdata/dynamicRuleOutputs.
> We should move them over to the examples directory.
>
>
> BR,
>
> Joerg
> _______________________________________________
> QBS mailing list
> QBS at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qbs
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20140507/a81daa94/attachment.html>


More information about the Qbs mailing list