[Qbs] Depending on binary from install-root
Jochen Becher
jochen_becher at gmx.de
Wed Sep 8 19:28:28 CEST 2021
Hi,
I develop a transpiler for some language into C. The qbs project
contains products to build the compiler, the runtime and unit tests
that are executed with every build.
To compile the unit test source code with the new compiler I use the
following rule. Unfortunately, when I change something in the compiler,
this rule still uses the old binary. Depending on "compiler" seems not
be enough to wait for the finalization of the link process and
deployment of the compiler.
Any idea how I can force the rule to depend on the binary in install-
root/bin?
Regards, Jochen
-------------- snip here ------------------------
FileTagger {
patterns: "*.a"
fileTags: [ "alang" ]
}
Rule {
inputs: [ "alang" ]
explicitlyDependsOnFromDependencies: [ "compiler", "runtime" ]
Artifact {
filePath: input.fileName + ".c"
fileTags: [ "c" ]
}
prepare: {
var cmd = new Command()
cmd.description = "compiling " + input.fileName
cmd.highlight = "codegen"
cmd.program = project.buildDirectory + "/install-
root/bin/compiler"
cmd.arguments = [ "-o", output.filePath, input.filePath ]
return [ cmd ]
}
}
More information about the Qbs
mailing list