bake-toolkit 2.68.1 → 2.71.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Rakefile.rb +0 -4
- data/bin/bakery +1 -1
- data/lib/bake/config/loader.rb +3 -0
- data/lib/bake/libElement.rb +2 -2
- data/lib/bake/options/options.rb +6 -3
- data/lib/bake/options/usage.rb +4 -1
- data/lib/bakery/buildPattern.rb +3 -2
- data/lib/bakery/model/metamodel.rb +1 -0
- data/lib/bakery/toBake.rb +3 -3
- data/lib/blocks/block.rb +1 -1
- data/lib/blocks/blockBase.rb +1 -1
- data/lib/blocks/compile.rb +6 -10
- data/lib/blocks/executable.rb +1 -1
- data/lib/blocks/fileutil.rb +10 -3
- data/lib/blocks/library.rb +1 -1
- data/lib/blocks/showIncludes.rb +2 -2
- data/lib/common/root.rb +1 -0
- data/lib/common/version.rb +1 -1
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97f124f36bbd221636166d8e01a9854b4c680f235643dab7154d3d6e50df0c4c
|
4
|
+
data.tar.gz: 664f60e7f0fec1089b08f55a7662c1d3f5c3e6ad81c7f5332b206e10ca28fc47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 655d3a58f54e604245af4a38feb61e099ae8ea9af58ec135a181a312cca39ed1cb18461ca4733c8d2754090cf782e0e2ca918b490ddce55f071add4ce09d9824
|
7
|
+
data.tar.gz: 14034133ac3b08bcfc0c3b54483bf0f1cc98138a2a04e452d0860ca91fb9914f37115b822a068cdbc42caf8d584ca8c0e96268f82cf601992e6403a4209625fe
|
data/Rakefile.rb
CHANGED
data/bin/bakery
CHANGED
@@ -112,7 +112,7 @@ module Bake
|
|
112
112
|
p = File.dirname(bp.proj)
|
113
113
|
pRel = File.rel_from_to_project(Dir.pwd, p, false)
|
114
114
|
pRel = "." if pRel.empty?
|
115
|
-
cmd = (["-m", pRel, "-b", bp.conf] + bp.args.split + passedParams)
|
115
|
+
cmd = (["-m", pRel, "-b", bp.conf] + bp.args.split + passedParams + bp.args_end.split)
|
116
116
|
cmdWithNum = "bakery #{currentRun} of #{maxRuns}: bake " + cmd.join(" ")
|
117
117
|
puts "\n#{$stars}"
|
118
118
|
Bake.formatter.printInfo(cmdWithNum)
|
data/lib/bake/config/loader.rb
CHANGED
@@ -143,6 +143,9 @@ module Bake
|
|
143
143
|
if !configHash.has_key?(name)
|
144
144
|
return adaptHash[name].any?{|ah| ah.match("")}
|
145
145
|
end
|
146
|
+
if name == "toolchain" && configHash[name] == [""]
|
147
|
+
Bake.formatter.printWarning("Trying to adapt '#{config.name}' with 'toolchain == #{c.parent.toolchain}', but toolchain is not defined yet", c)
|
148
|
+
end
|
146
149
|
adaptHash[name].any? { |ah| configHash[name].any?{|ch| ah.match(ch)}}
|
147
150
|
}
|
148
151
|
|
data/lib/bake/libElement.rb
CHANGED
@@ -56,7 +56,7 @@ module Bake
|
|
56
56
|
cb = block.library.compileBlock
|
57
57
|
if (block.prebuild and File.exist?adaptedPath) or
|
58
58
|
(!cb.nil? and !(cb.calcSources(true, true) - cb.source_files_ignored_in_lib).empty?)
|
59
|
-
if Bake.options.
|
59
|
+
if Bake.options.abs_path_in
|
60
60
|
adaptedPath = File.expand_path(adaptedPath, @projectDir)
|
61
61
|
end
|
62
62
|
@@linker_libs_array << adaptedPath
|
@@ -70,7 +70,7 @@ module Bake
|
|
70
70
|
cb.object_files_ignored_in_lib.each do |ldirect|
|
71
71
|
adaptedPath, prefix = adaptPath(ldirect, block, prefix)
|
72
72
|
if (!block.prebuild or File.exist?adaptedPath)
|
73
|
-
if Bake.options.
|
73
|
+
if Bake.options.abs_path_in
|
74
74
|
adaptedPath = File.expand_path(adaptedPath, @projectDir)
|
75
75
|
end
|
76
76
|
@@linker_libs_array << adaptedPath
|
data/lib/bake/options/options.rb
CHANGED
@@ -22,7 +22,7 @@ module Bake
|
|
22
22
|
attr_reader :vars, :include_filter_args # map
|
23
23
|
attr_reader :verbose
|
24
24
|
attr_reader :filelist # set
|
25
|
-
attr_reader :
|
25
|
+
attr_reader :abs_path_in, :abs_path_out
|
26
26
|
attr_reader :roots # Root array
|
27
27
|
attr_reader :diabCaseCheck
|
28
28
|
attr_reader :defines
|
@@ -50,7 +50,8 @@ module Bake
|
|
50
50
|
@analyze = false
|
51
51
|
@eclipseOrder = false
|
52
52
|
@showConfigs = false
|
53
|
-
@
|
53
|
+
@abs_path_in = false
|
54
|
+
@abs_path_out = false
|
54
55
|
@prepro = false
|
55
56
|
@stopOnFirstError = false
|
56
57
|
@verbose = 1
|
@@ -141,7 +142,9 @@ module Bake
|
|
141
142
|
add_option(["--dot-project-level", ], lambda { @dot = true; @dotShowProjOnly = true })
|
142
143
|
add_option(["--do", "--include_filter" ], lambda { |x| set_filter(x) })
|
143
144
|
add_option(["--omit", "--exclude_filter" ], lambda { |x| @exclude_filter << x })
|
144
|
-
add_option(["--abs-paths", "--show_abs_paths" ], lambda { @
|
145
|
+
add_option(["--abs-paths", "--show_abs_paths" ], lambda { @abs_path_in = @abs_path_out = true })
|
146
|
+
add_option(["--abs-paths-in", "--show_abs_paths" ], lambda { @abs_path_in = true })
|
147
|
+
add_option(["--abs-paths-out", "--show_abs_paths" ], lambda { @abs_path_out = true })
|
145
148
|
add_option(["--prebuild" ], lambda { @prebuild = true })
|
146
149
|
add_option(["--Wparse" ], lambda { @wparse = true })
|
147
150
|
|
data/lib/bake/options/usage.rb
CHANGED
@@ -48,7 +48,10 @@ module Bake
|
|
48
48
|
puts " 'PRE', 'POST', 'STARTUP', 'EXIT' or 'CLEAN' includes all according steps."
|
49
49
|
puts " --omit <name> Excludes elements with this filter name (can be used multiple times)."
|
50
50
|
puts " 'PRE', 'POST', 'STARTUP', 'EXIT' or 'CLEAN' excludes all according steps."
|
51
|
-
puts " --abs-paths
|
51
|
+
puts " --abs-paths Relative filename paths are converted to absolute paths for compiler commands and output."
|
52
|
+
puts " --abs-paths-in Relative filename paths are converted to absolute paths for compiler commands."
|
53
|
+
puts " Depending on the compiler this might have also effects on the raw output of the compiler."
|
54
|
+
puts " --abs-paths-out Relative filename paths are converted to absolute paths for compiler output."
|
52
55
|
puts " --Wparse The error parser result is also taken into account, not only the return value of compiler, archiver and linker."
|
53
56
|
puts " --no-autodir Disable auto completion of paths like in IncludeDir"
|
54
57
|
puts " --set <key>=<value> Sets a variable. Overwrites variables defined in Project.metas (can be used multiple times)."
|
data/lib/bakery/buildPattern.rb
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
module Bake
|
2
2
|
|
3
3
|
class BuildPattern
|
4
|
-
attr_reader :proj, :conf, :args, :coll_p
|
5
|
-
def initialize(proj, conf, args, coll_p)
|
4
|
+
attr_reader :proj, :conf, :args, :args_end, :coll_p
|
5
|
+
def initialize(proj, conf, args, args_end, coll_p)
|
6
6
|
@proj = proj
|
7
7
|
@conf = conf
|
8
8
|
@args = args
|
9
|
+
@args_end = args_end
|
9
10
|
@coll_p = coll_p
|
10
11
|
end
|
11
12
|
def getId
|
@@ -20,6 +20,7 @@ module Bake
|
|
20
20
|
has_attr 'name', String, :defaultValueLiteral => ""
|
21
21
|
has_attr 'config', String, :defaultValueLiteral => ""
|
22
22
|
has_attr 'args', String, :defaultValueLiteral => ""
|
23
|
+
has_attr 'args_end', String, :defaultValueLiteral => ""
|
23
24
|
end
|
24
25
|
class Exclude < ModelElement
|
25
26
|
has_attr 'name', String, :defaultValueLiteral => ""
|
data/lib/bakery/toBake.rb
CHANGED
@@ -30,7 +30,7 @@ module Bake
|
|
30
30
|
toBuildPattern = []
|
31
31
|
@options.roots.each do |root|
|
32
32
|
col.project.each do |p|
|
33
|
-
projs = Root.search_to_depth(root.dir,p.name + "/Project.meta", root.depth)
|
33
|
+
projs = Root.search_to_depth(root.dir,p.name + "/Project.meta", root.depth).map { |p| Pathname.new(p).cleanpath.to_s }
|
34
34
|
if File.basename(root.dir) == p.name && File.exist?(root.dir + "/Project.meta")
|
35
35
|
projs << root.dir + "/Project.meta"
|
36
36
|
end
|
@@ -38,7 +38,7 @@ module Bake
|
|
38
38
|
Bake.formatter.printWarning("pattern does not match any project: #{p.name}", p)
|
39
39
|
end
|
40
40
|
projs.each do |f|
|
41
|
-
toBuildPattern << BuildPattern.new(f, "^"+p.config.gsub("*","(\\w*)")+"$", p.args, p)
|
41
|
+
toBuildPattern << BuildPattern.new(f, "^"+p.config.gsub("*","(\\w*)")+"$", p.args, p.args_end, p)
|
42
42
|
end
|
43
43
|
end
|
44
44
|
end
|
@@ -51,7 +51,7 @@ module Bake
|
|
51
51
|
res = c.gsub(/#.*/,"").match("\\s*(Library|Executable|Custom){1}Config\\s*\"?([\\w:-]*)\"?")
|
52
52
|
if res
|
53
53
|
if res[2].match(bp.conf) != nil
|
54
|
-
toBuild << BuildPattern.new(bp.proj, res[2], bp.args, nil)
|
54
|
+
toBuild << BuildPattern.new(bp.proj, res[2], bp.args, bp.args_end, nil)
|
55
55
|
bp.coll_p.found
|
56
56
|
end
|
57
57
|
end
|
data/lib/blocks/block.rb
CHANGED
@@ -601,7 +601,7 @@ module Bake
|
|
601
601
|
if @tcs[:OUTPUT_DIR_POSTFIX] != nil
|
602
602
|
@output_dir = @output_dir + @tcs[:OUTPUT_DIR_POSTFIX]
|
603
603
|
end
|
604
|
-
if Bake.options.
|
604
|
+
if Bake.options.abs_path_in
|
605
605
|
@output_dir = File.expand_path(@output_dir, @projectDir)
|
606
606
|
end
|
607
607
|
end
|
data/lib/blocks/blockBase.rb
CHANGED
@@ -136,7 +136,7 @@ module Bake
|
|
136
136
|
end
|
137
137
|
|
138
138
|
console_output = x[0]
|
139
|
-
console_output = console_output_full if Bake.options.
|
139
|
+
console_output = console_output_full if Bake.options.abs_path_out
|
140
140
|
|
141
141
|
ret = error_descs.any? { |e| e.severity == ErrorParser::SEVERITY_ERROR }
|
142
142
|
|
data/lib/blocks/compile.rb
CHANGED
@@ -254,7 +254,7 @@ module Bake
|
|
254
254
|
if Bake.options.cc2j_filename
|
255
255
|
cmdJson = cmd.is_a?(Array) ? cmd.join(' ') : cmd
|
256
256
|
srcFilePath = source
|
257
|
-
if Bake.options.
|
257
|
+
if Bake.options.abs_path_in
|
258
258
|
srcFilePath = File.join(@projectDir, srcFilePath) if !File.is_absolute?(srcFilePath)
|
259
259
|
cmdJson[source] = srcFilePath
|
260
260
|
end
|
@@ -529,7 +529,7 @@ module Bake
|
|
529
529
|
if not type.nil?
|
530
530
|
object = get_object_file(source)
|
531
531
|
|
532
|
-
if Bake.options.
|
532
|
+
if Bake.options.abs_path_in
|
533
533
|
object = File.expand_path(object, @projectDir)
|
534
534
|
source = File.expand_path(source, @projectDir)
|
535
535
|
end
|
@@ -586,8 +586,9 @@ module Bake
|
|
586
586
|
end
|
587
587
|
res.each do |f|
|
588
588
|
singleFile = res.length == 1 && res[0] == pr
|
589
|
-
|
590
|
-
|
589
|
+
fTcs = (Bake.options.abs_path_in ? File.expand_path(f, @projectDir) : f)
|
590
|
+
if ((!@fileTcs.has_key?(fTcs)) || singleFile)
|
591
|
+
@fileTcs[fTcs] = icf
|
591
592
|
end
|
592
593
|
if source_files.include?(f) || exclude_files.include?(f)
|
593
594
|
if (singleFile)
|
@@ -641,7 +642,7 @@ module Bake
|
|
641
642
|
block.bes.each do |be|
|
642
643
|
if Metamodel::IncludeDir === be
|
643
644
|
if be.inherit == true || block == @block
|
644
|
-
if Bake.options.
|
645
|
+
if Bake.options.abs_path_in
|
645
646
|
mappedInc = be.name
|
646
647
|
else
|
647
648
|
mappedInc = File.rel_from_to_project(@projectDir,be.name,false)
|
@@ -781,11 +782,6 @@ module Bake
|
|
781
782
|
end
|
782
783
|
end
|
783
784
|
|
784
|
-
def tcs4source(source)
|
785
|
-
@fileTcs[source] || @block.tcs
|
786
|
-
end
|
787
|
-
|
788
|
-
|
789
785
|
end
|
790
786
|
|
791
787
|
end
|
data/lib/blocks/executable.rb
CHANGED
@@ -43,7 +43,7 @@ module Bake
|
|
43
43
|
baseFilename += ".#{@config.artifactExtension.name}"
|
44
44
|
end
|
45
45
|
@exe_name ||= File.join([@block.output_dir, baseFilename])
|
46
|
-
if Bake.options.
|
46
|
+
if Bake.options.abs_path_in
|
47
47
|
@exe_name = File.expand_path(@exe_name, @projectDir)
|
48
48
|
end
|
49
49
|
return @exe_name
|
data/lib/blocks/fileutil.rb
CHANGED
@@ -11,6 +11,13 @@ module Bake
|
|
11
11
|
@type = type
|
12
12
|
@projectDir = projectDir
|
13
13
|
@echo = (config.echo != "off")
|
14
|
+
if !@arg1 || @arg1.empty?
|
15
|
+
Bake.formatter.printError("Error: source of file-step must not be empty")
|
16
|
+
ExitHelper.exit(1)
|
17
|
+
elsif [:copy, :move].include?(@type) && (!@arg2 || @arg2.empty?)
|
18
|
+
Bake.formatter.printError("Error: target of file-step must not be empty")
|
19
|
+
ExitHelper.exit(1)
|
20
|
+
end
|
14
21
|
end
|
15
22
|
|
16
23
|
def run
|
@@ -20,13 +27,13 @@ module Bake
|
|
20
27
|
FileUtils.touch(@arg1)
|
21
28
|
elsif @type == :move
|
22
29
|
puts "Moving #{@arg1} to #{@arg2}" if @echo
|
23
|
-
FileUtils.mv(
|
30
|
+
Dir.glob(@arg1).each {|f| FileUtils.mv(f, @arg2)}
|
24
31
|
elsif @type == :copy
|
25
32
|
puts "Copying #{@arg1} to #{@arg2}" if @echo
|
26
|
-
FileUtils.cp_r(
|
33
|
+
Dir.glob(@arg1).each {|f| FileUtils.cp_r(f, @arg2)}
|
27
34
|
elsif @type == :remove
|
28
35
|
puts "Removing #{@arg1}" if @echo
|
29
|
-
|
36
|
+
Dir.glob(@arg1).each {|f| FileUtils.rm_rf(f)}
|
30
37
|
elsif @type == :makedir
|
31
38
|
puts "Making #{@arg1}" if @echo
|
32
39
|
FileUtils.mkdir_p(@arg1)
|
data/lib/blocks/library.rb
CHANGED
@@ -34,7 +34,7 @@ module Bake
|
|
34
34
|
baseFilename += ".#{@config.artifactExtension.name}"
|
35
35
|
end
|
36
36
|
@archive_name ||= File.join([@block.output_dir, baseFilename])
|
37
|
-
if Bake.options.
|
37
|
+
if Bake.options.abs_path_in
|
38
38
|
@archive_name = File.expand_path(@archive_name, @projectDir)
|
39
39
|
end
|
40
40
|
return @archive_name
|
data/lib/blocks/showIncludes.rb
CHANGED
@@ -22,7 +22,7 @@ module Bake
|
|
22
22
|
print projName
|
23
23
|
incs = []
|
24
24
|
blocks.each do |block|
|
25
|
-
if Bake.options.
|
25
|
+
if Bake.options.abs_path_in
|
26
26
|
incs += block.include_list.map { |i| File.expand_path(i, block.projectDir) }
|
27
27
|
else
|
28
28
|
incs += block.include_list
|
@@ -103,7 +103,7 @@ module Bake
|
|
103
103
|
block.calcIncludes
|
104
104
|
block.calcDefines
|
105
105
|
block.calcFlags
|
106
|
-
if Bake.options.
|
106
|
+
if Bake.options.abs_path_in
|
107
107
|
blockIncs += block.include_list.map { |i| File.expand_path(i, block.projectDir) }
|
108
108
|
else
|
109
109
|
blockIncs += block.include_list
|
data/lib/common/root.rb
CHANGED
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.71.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Schaal
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rtext
|
@@ -128,28 +128,28 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - '='
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 0.
|
131
|
+
version: 0.21.2
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - '='
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 0.
|
138
|
+
version: 0.21.2
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
140
|
+
name: simplecov-lcov
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
143
|
- - '='
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: 0.8.
|
145
|
+
version: 0.8.0
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - '='
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: 0.8.
|
152
|
+
version: 0.8.0
|
153
153
|
description: See documentation for more details
|
154
154
|
email: alexander.schaal@esrlabs.com
|
155
155
|
executables:
|
@@ -269,7 +269,7 @@ homepage: https://github.com/esrlabs/bake
|
|
269
269
|
licenses:
|
270
270
|
- MIT
|
271
271
|
metadata: {}
|
272
|
-
post_install_message:
|
272
|
+
post_install_message:
|
273
273
|
rdoc_options:
|
274
274
|
- "-x"
|
275
275
|
- doc
|
@@ -286,8 +286,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
286
286
|
- !ruby/object:Gem::Version
|
287
287
|
version: '0'
|
288
288
|
requirements: []
|
289
|
-
rubygems_version: 3.
|
290
|
-
signing_key:
|
289
|
+
rubygems_version: 3.2.22
|
290
|
+
signing_key:
|
291
291
|
specification_version: 4
|
292
292
|
summary: Build tool to compile C/C++ projects fast and easy.
|
293
293
|
test_files: []
|