blob: 45d4b748ddd68a74b634e01e114fe9617bba2fbc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
import qbs 1.0
import qbs.FileInfo
import qbs.TextFile
Module {
property bool buildZort: true
FileTagger {
pattern: "*.narf"
fileTags: ["narf"]
}
Rule {
condition: product.moduleProperty("narfzort", "buildZort");
inputs: ["narf"]
Artifact {
fileName: product.name + "." + input.fileName + ".zort"
fileTags: ["zort"]
}
prepare: {
var cmd = new JavaScriptCommand();
cmd.description = "generating " + FileInfo.fileName(output.fileName);
cmd.sourceCode = function() {
var f = new TextFile(output.fileName, TextFile.WriteOnly);
f.write("NARF! ZORT!");
f.close();
}
return cmd;
}
}
}
|