bake-toolkit 2.52.1 → 2.53.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bake/mergeConfig.rb +5 -1
- data/lib/bake/model/metamodel.rb +1 -0
- data/lib/bake/subst.rb +27 -24
- data/lib/bake/toolchain/clang.rb +8 -2
- data/lib/bakery/toBake.rb +1 -1
- data/lib/blocks/compile.rb +2 -0
- data/lib/common/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c30b262873a0ace0c66d50fd465eadc5831efab3aec86c1581449326894f53b8
|
4
|
+
data.tar.gz: bde9aa588f9735d37088bc3954ac6bec2c605665d6a472fcf9c1859898db5cb0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ff3239869804870c5d108cd5f43ca476749b0effc7fa4eccb909c0307f35f0fee6ba43b74c27590f0f764f1346ab9ce781601d46055c2c3bc48f71ec30512e8
|
7
|
+
data.tar.gz: 8df0c9092ce5073e0fe3d431edf8431c2e30ec958a9c5170650a62426db764749cd85119d1c1b6bd48c08a1e15f2e1d7d44380034981575befa9d56301885555
|
data/lib/bake/mergeConfig.rb
CHANGED
@@ -198,6 +198,10 @@ module Bake
|
|
198
198
|
end
|
199
199
|
|
200
200
|
def merge(type)
|
201
|
+
if (@child.strict == true) && !(@child.class == @parent.class)
|
202
|
+
return
|
203
|
+
end
|
204
|
+
|
201
205
|
s = StringIO.new
|
202
206
|
ser = RText::Serializer.new(Language)
|
203
207
|
|
@@ -207,7 +211,7 @@ module Bake
|
|
207
211
|
s.puts "\n>>>> parent <<<<"
|
208
212
|
ser.serialize(@parent, s)
|
209
213
|
end
|
210
|
-
|
214
|
+
|
211
215
|
if (type == :remove)
|
212
216
|
removeChilds(@child, @parent)
|
213
217
|
elsif (type == :replace)
|
data/lib/bake/model/metamodel.rb
CHANGED
@@ -279,6 +279,7 @@ module Bake
|
|
279
279
|
has_attr 'name', String, :defaultValueLiteral => ""
|
280
280
|
has_attr 'extends', String, :defaultValueLiteral => ""
|
281
281
|
has_attr 'type', String, :defaultValueLiteral => ""
|
282
|
+
has_attr 'strict', Boolean, :defaultValueLiteral => "false"
|
282
283
|
has_attr 'project', String, :defaultValueLiteral => ""
|
283
284
|
has_attr 'private', Boolean, :defaultValueLiteral => "false"
|
284
285
|
has_attr 'mergeInc', String, :defaultValueLiteral => ""
|
data/lib/bake/subst.rb
CHANGED
@@ -45,6 +45,18 @@ module Bake
|
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
|
+
def self.empty(elem, var, mandatory, str)
|
49
|
+
if mandatory
|
50
|
+
Bake.formatter.printError("Variable '$(#{var})' cannot be substituted, because #{str}", elem ? elem : @@config)
|
51
|
+
ExitHelper.exit(1)
|
52
|
+
else
|
53
|
+
if Bake.options.verbose > 0
|
54
|
+
msg = "Substitute variable '$(#{var})' with empty string, because #{str}"
|
55
|
+
Bake.formatter.printInfo(msg, elem ? elem : @@config)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
48
60
|
def self.itute(config, projName, isMainProj, toolchain, referencedConfigs, configTcMap)
|
49
61
|
@@lazy = true
|
50
62
|
@@config = config
|
@@ -168,9 +180,17 @@ module Bake
|
|
168
180
|
|
169
181
|
substStr << str[posSubst..posStart-1] if posStart>0
|
170
182
|
|
171
|
-
var = str[posStart+2..posEnd-1]
|
183
|
+
var = str[posStart+2..posEnd-1].strip
|
184
|
+
mandatory = false
|
172
185
|
|
173
186
|
splittedVar = var.split(",").map { |v| v.strip() }
|
187
|
+
splittedVar.each_with_index do |s,i|
|
188
|
+
if s.end_with?("!")
|
189
|
+
mandatory = true
|
190
|
+
splittedVar[i] = s[0..-2]
|
191
|
+
end
|
192
|
+
end
|
193
|
+
var = splittedVar.join(", ")
|
174
194
|
|
175
195
|
if Bake.options.vars.has_key?(var)
|
176
196
|
substStr << Bake.options.vars[var]
|
@@ -215,10 +235,7 @@ module Bake
|
|
215
235
|
config = configs.first
|
216
236
|
substStr << File.rel_from_to_project(@@projDir,config.get_project_dir,false)
|
217
237
|
else
|
218
|
-
|
219
|
-
msg = "Substitute variable '$(#{var})' with empty string, because project #{out_proj_name} not found"
|
220
|
-
Bake.formatter.printInfo(msg, elem ? elem : @@config)
|
221
|
-
end
|
238
|
+
empty(elem, var, mandatory, "project #{out_proj_name} not found")
|
222
239
|
end
|
223
240
|
end
|
224
241
|
elsif var == "OutputDir" or (splittedVar.length == 3 and splittedVar[0] == "OutputDir")
|
@@ -271,22 +288,13 @@ module Bake
|
|
271
288
|
end
|
272
289
|
end
|
273
290
|
else
|
274
|
-
|
275
|
-
msg = "Substitute variable '$(#{var})' with empty string, because config #{out_conf_name} not found for project #{out_proj_name}"
|
276
|
-
Bake.formatter.printInfo(msg, elem ? elem : @@config)
|
277
|
-
end
|
291
|
+
empty(elem, var, mandatory, "config #{out_conf_name} not found for project #{out_proj_name}")
|
278
292
|
end
|
279
293
|
else
|
280
|
-
|
281
|
-
msg = "Substitute variable '$(#{var})' with empty string, because project #{out_proj_name} not found"
|
282
|
-
Bake.formatter.printInfo(msg, elem ? elem : @@config)
|
283
|
-
end
|
294
|
+
empty(elem, var, mandatory, "project #{out_proj_name} not found")
|
284
295
|
end
|
285
296
|
elsif splittedVar.length > 1 and splittedVar[0] == "OutputDir"
|
286
|
-
|
287
|
-
msg = "Substitute variable '$(#{var})' with empty string, because syntax of complex variable OutputDir is not $(OutputDir,<project name>,<config name>)"
|
288
|
-
Bake.formatter.printInfo(msg, elem ? elem : @@config)
|
289
|
-
end
|
297
|
+
empty(elem, var, mandatory, "syntax of complex variable OutputDir is not $(OutputDir,<project name>,<config name>)")
|
290
298
|
elsif var == "Time"
|
291
299
|
substStr << Time.now.to_s
|
292
300
|
elsif var == "Hostname"
|
@@ -321,13 +329,8 @@ module Bake
|
|
321
329
|
elsif ENV[var]
|
322
330
|
substStr << ENV[var]
|
323
331
|
else
|
324
|
-
if
|
325
|
-
|
326
|
-
if elem
|
327
|
-
Bake.formatter.printInfo(msg, elem)
|
328
|
-
else
|
329
|
-
Bake.formatter.printInfo(msg + " in the toolchain", @@config)
|
330
|
-
end
|
332
|
+
if !(["ASMCompilerPrefix", "CompilerPrefix", "ArchiverPrefix", "LinkerPrefix"].include?(var))
|
333
|
+
empty(elem, var, mandatory, "it's not set") if mandatory || Bake.options.verbose >= 2
|
331
334
|
end
|
332
335
|
end
|
333
336
|
|
data/lib/bake/toolchain/clang.rb
CHANGED
@@ -29,8 +29,14 @@ module Bake
|
|
29
29
|
CLANG_CHAIN[:COMPILER][:ASM][:SOURCE_FILE_ENDINGS] = Provider.default[:COMPILER][:ASM][:SOURCE_FILE_ENDINGS]
|
30
30
|
CLANG_CHAIN[:COMPILER][:ASM][:PREFIX] = Provider.default[:COMPILER][:ASM][:PREFIX]
|
31
31
|
|
32
|
-
|
33
|
-
|
32
|
+
if Bake::Utils::OS::name == "Mac"
|
33
|
+
CLANG_CHAIN[:ARCHIVER][:COMMAND] = "libtool"
|
34
|
+
CLANG_CHAIN[:ARCHIVER][:ARCHIVE_FLAGS] = "-static -o"
|
35
|
+
else
|
36
|
+
CLANG_CHAIN[:ARCHIVER][:COMMAND] = "ar"
|
37
|
+
CLANG_CHAIN[:ARCHIVER][:ARCHIVE_FLAGS] = "r"
|
38
|
+
end
|
39
|
+
|
34
40
|
CLANG_CHAIN[:ARCHIVER][:ERROR_PARSER] = gccCompilerErrorParser
|
35
41
|
|
36
42
|
CLANG_CHAIN[:LINKER][:COMMAND] = "clang++"
|
data/lib/bakery/toBake.rb
CHANGED
@@ -45,7 +45,7 @@ module Bake
|
|
45
45
|
next unless bp.proj
|
46
46
|
contents = File.open(bp.proj, "r") {|io| io.read }
|
47
47
|
contents.split("\n").each do |c|
|
48
|
-
res = c.match("\\s*(Library|Executable|Custom){1}Config\\s*\"?([\\w:-]*)\"?")
|
48
|
+
res = c.gsub(/#.*/,"").match("\\s*(Library|Executable|Custom){1}Config\\s*\"?([\\w:-]*)\"?")
|
49
49
|
if res
|
50
50
|
if res[2].match(bp.conf) != nil
|
51
51
|
toBuild << BuildPattern.new(bp.proj, res[2], bp.args, nil)
|
data/lib/blocks/compile.rb
CHANGED
@@ -249,6 +249,8 @@ module Bake
|
|
249
249
|
srcFilePath = File.join(@projectDir, srcFilePath)
|
250
250
|
cmdJson[source] = srcFilePath
|
251
251
|
end
|
252
|
+
puts cmdJson
|
253
|
+
cmdJson.gsub!("\"" , "\\\"")
|
252
254
|
Blocks::CC2J << { :directory => @projectDir, :command => cmdJson, :file => srcFilePath }
|
253
255
|
end
|
254
256
|
|
data/lib/common/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bake-toolkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.53.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Schaal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-07-
|
11
|
+
date: 2019-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rtext
|