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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
|
{ "data":
{ "doc":
[ "Data produced by generic shell commands with toolchain support."
, ""
, "All variables accessible to commands and options are: \"TMPDIR\","
, "\"LOCALBASE\", \"WORKDIR\", \"DESTDIR\", \"CC\", \"CXX\", \"CFLAGS\","
, "\"CXXFLAGS\", \"LDFLAGS\", and \"AR\". \"LOCALBASE\" contains the path"
, "to the staged artifacts from \"localbase\" and the installed artifacts"
, "from \"deps\". Furthermore, the variable \"ACTION_DIR\" points to the"
, "current action directory, if needed for achieving reproducibility."
]
, "target_fields": ["project", "localbase", "deps"]
, "string_fields": ["cmds", "outs", "out_dirs"]
, "config_vars":
[ "CC"
, "CXX"
, "CFLAGS"
, "CXXFLAGS"
, "LDFLAGS"
, "ADD_CFLAGS"
, "ADD_CXXFLAGS"
, "ADD_LDFLAGS"
, "ENV"
, "AR"
, "PREFIX"
, "BUILD_POSITION_INDEPENDENT"
, "TIMEOUT_SCALE"
]
, "implicit":
{ "defaults": [["CC", "defaults"]]
, "foreign-defaults": [["CC/foreign", "defaults"]]
, "expand_exec": [["./", "..", "expand_exec"]]
}
, "field_doc":
{ "project":
[ "The project directory. It should contain a single tree artifact."
, "It's path can be accessed via the \"WORKDIR\" variable."
]
, "localbase": ["Artifacts to stage to \"LOCALBASE\"."]
, "deps": ["CC targets to install to \"LOCALBASE\"."]
, "cmds":
[ "List of commands to execute by \"sh\". Multiple commands will be"
, "joined with the newline character."
]
, "outs": ["Paths to the produced output files in \"DESTDIR\"."]
, "out_dirs": ["Paths to the produced output directories in \"DESTDIR\"."]
}
, "config_doc":
{ "CC":
[ "The name of the C compiler to be used."
, "If null, the respective value from [\"CC\", \"defaults\"] will be taken."
]
, "CXX":
[ "The name of the C++ compiler to be used."
, "If null, the respective value from [\"CC\", \"defaults\"] will be taken."
]
, "CFLAGS":
[ "The flags for CC to be used instead of the default ones."
, "For libraries that should be built in a non-standard way; usually"
, "adapting the default target [\"CC\", \"defaults\"] is the better"
, "choice"
]
, "CXXFLAGS":
[ "The flags for CXX to be used instead of the default ones."
, "For libraries that should be built in a non-standard way; usually"
, "adapting the default target [\"CC\", \"defaults\"] is the better"
, "choice."
]
, "LDFLAGS":
[ "The linker flags to be used instead of the default ones."
, "For libraries that should be linked in a non-standard way; usually"
, "adapting the default target [\"CC\", \"defaults\"] is the better"
, "choice"
]
, "ADD_CFLAGS":
[ "The flags to add to the default ones for CC."
, "For libraries that should be built in a non-standard way; usually"
, "adapting the default target [\"CC\", \"defaults\"] is the better"
, "choice."
]
, "ADD_CXXFLAGS":
[ "The flags to add to the default ones for CXX."
, "For libraries that should be built in a non-standard way; usually"
, "adapting the default target [\"CC\", \"defaults\"] is the better"
, "choice."
]
, "ADD_LDFLAGS":
[ "The linker flags to add to the default ones."
, "For libraries that should be linked in a non-standard way; usually"
, "adapting the default target [\"CC\", \"defaults\"] is the better"
, "choice."
]
, "ENV":
[ "The environment for any action generated."
, "If null, the respective value from [\"CC\", \"defaults\"] will be taken."
]
, "AR":
[ "The archive tool to used for creating the library."
, "If null, the respective value from [\"CC\", \"defaults\"] will be taken."
]
, "PREFIX":
[ "The absolute path that is used as prefix inside generated pkg-config"
, "files. The default value for this variable is \"/\". This variable"
, "is ignored if the field \"prefix\" is set."
]
, "BUILD_POSITION_INDEPENDENT": ["Build position independent code."]
, "TIMEOUT_SCALE":
[ "The scaling of the timeout for the invocation of the foreign build."
, "Defaults to 10."
]
}
, "imports":
{ "artifacts": ["", "field_artifacts"]
, "stage_field": ["", "stage_singleton_field"]
, "shell-build": "shell-build"
, "install-deps": ["CC", "install-with-deps stage"]
, "for host": ["transitions", "for host"]
}
, "config_transitions":
{ "defaults":
[{"type": "empty_map"}, {"type": "CALL_EXPRESSION", "name": "for host"}]
, "expand_exec": [{"type": "CALL_EXPRESSION", "name": "for host"}]
}
, "expression":
{ "type": "let*"
, "bindings":
[ ["cmds", {"type": "FIELD", "name": "cmds"}]
, [ "sources"
, { "type": "let*"
, "bindings": [["fieldname", "project"]]
, "body": {"type": "CALL_EXPRESSION", "name": "artifacts"}
}
]
, [ "localbase"
, { "type": "disjoint_map_union"
, "msg": "localbase and installed dependency files may not overlap"
, "$1":
[ { "type": "let*"
, "bindings":
[ ["pc-install-dir", "lib/pkgconfig"]
, ["targets", {"type": "FIELD", "name": "deps"}]
]
, "body": {"type": "CALL_EXPRESSION", "name": "install-deps"}
}
, { "type": "let*"
, "bindings": [["fieldname", "localbase"]]
, "body": {"type": "CALL_EXPRESSION", "name": "artifacts"}
}
]
}
]
, ["outs", {"type": "FIELD", "name": "outs"}]
, ["out_dirs", {"type": "FIELD", "name": "out_dirs"}]
, [ "expand_exec"
, { "type": "let*"
, "bindings":
[ ["fieldname", "expand_exec"]
, ["location", "expand_exec"]
, ["transition", {"type": "CALL_EXPRESSION", "name": "for host"}]
]
, "body": {"type": "CALL_EXPRESSION", "name": "stage_field"}
}
]
]
, "body":
{ "type": "RESULT"
, "artifacts": {"type": "CALL_EXPRESSION", "name": "shell-build"}
}
}
}
}
|