[QBS] When are rules built?

Joerg Bornemann joerg.bornemann at digia.com
Tue Jul 2 11:35:08 CEST 2013

On 01/07/2013 16:28, Johannes.Matokic at microchip.com wrote:

> So I started wondering what is required that a rule is considered part of the build-process?

Each rule has input filetags and ouput artifacts (with file tags). The 
rules form a directed graph: rule A is connected to rule B iff the 
filetags of the output artifacts of A match some input file tags in B. 
We call that structure the rule graph.
   You have a certain set of source files in your project. All of those 
get some file tag, either explicitly or implicitly via file taggers. 
Then there's the product's type which specifies what kind of product you 
want to produce. Product.type is a list of file tags.
   When creating the build graph, qbs looks in the rule graph for paths 
from the source files to the file tags in Product.type. Only the rules 
on these paths are applied.

If you have some rule R that's not applied then it's because:
    - There's no source file or generated file with a file tag that's in 
    - There's no file tag in Product.type that matches R's output artifacts.
Or more generally: R is not on some path from the source files to 



Joerg Bornemann
Digia, Qt

More information about the Qbs mailing list