blob: 7d40876206360b747a3b50e391952555389885d4 (
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
import qbs
import qbs.FileInfo
import qbs.TextFile
Project {
Product {
name: "p1"
type: "custom"
Group {
files: "custom1.in"
fileTags: "custom.in"
}
}
Product {
name: "p2"
type: "custom"
Group {
files: "custom2.in"
fileTags: "custom.in"
}
}
Rule {
inputs: "custom.in"
Artifact {
filePath: FileInfo.baseName(input.filePath) + ".out"
fileTags: "custom"
}
prepare: {
var cmd = new JavaScriptCommand();
cmd.description = "generating " + output.fileName;
cmd.sourceCode = function() {
var f = new TextFile(output.filePath, TextFile.WriteOnly);
f.close();
}
return cmd;
}
}
Product {
name: "p3"
type: "custom-plus"
Depends { name: "p1" }
Depends { name: "p2" }
Rule {
inputsFromDependencies: "custom"
Artifact {
filePath: FileInfo.fileName(input.filePath) + ".plus"
fileTags: "custom-plus"
}
prepare: {
var cmd = new JavaScriptCommand();
cmd.description = "generating " + output.fileName;
cmd.sourceCode = function() {
var f = new TextFile(output.filePath, TextFile.WriteOnly);
f.close();
}
return cmd;
}
}
}
}
|