bake-toolkit 2.68.0 → 2.70.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d2d635c3cc903018e92f111403d9a1450fa76c82cabd5d1159afbfe1269c3b1e
4
- data.tar.gz: a4ecb9b50ead0faaf4e3a2ac37d3d295886bb8d3e6a221f41da69e74ad805474
3
+ metadata.gz: 416c14f84643a59f67c1c7d3ba19032a847d56bbef738c8e3563a9919ba255db
4
+ data.tar.gz: 59250025415e8353a51a7e753d5af219491a05f2bd959cf520b682c963758ef2
5
5
  SHA512:
6
- metadata.gz: b5d974d79c37da1ced9fa7ae03273a5aacd27531d2e080259225df1884b646ffc7cd2b0b2658011e80446eba81617eef4072474515ee66d500e7fbbdcb87f81f
7
- data.tar.gz: 998f741470db5a771b26356519f58bc904a0ac26e838aca5f100e4c2f73ef646fe09aa0ca8f96f5b08c075edc3e6dd699c136462a9cab9f8708d286cf882d5e8
6
+ metadata.gz: 815be1963aef84b578e080d47dd0454170f93b0ba8b0b455c7478fb8a6d04be5fc08bba9b8c649666f237774ac280803a76d7b53d537eaa904126c162247b6f4
7
+ data.tar.gz: 8efb1f2f9594f3affcf970c06829e9791b16cbe54dc554dbc566f21066a2d0bb3cd7934fc88ae03c821c8d0a4d7f0b1d7c04b1f3f4a74fb1825f442a90720543
data/Rakefile.rb CHANGED
@@ -1,7 +1,3 @@
1
- gem "coveralls", "=0.8.23"
2
- gem "simplecov", "=0.16.1"
3
- gem "rspec", "=3.10.0"
4
-
5
1
  require 'rake'
6
2
 
7
3
  require './rake_helper/spec.rb'
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)
@@ -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
 
@@ -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
@@ -375,7 +375,7 @@ module Bake
375
375
  deps_string = File.read(dep_filename)
376
376
  deps_string = deps_string.gsub(/\\\n/,'')
377
377
  dep_splitted = deps_string.split(/([^\\]) /).each_slice(2).map(&:join)[2..-1]
378
- deps = dep_splitted.map { |d| d.gsub(/[\\] /,' ').gsub(/[\\]/,'/').strip }.delete_if {|d| d == "" }
378
+ deps = dep_splitted.map { |d| d.gsub(/[\\] /,' ').gsub(/\\:\\/,':\\').gsub(/[\\]/,'/').strip }.delete_if {|d| d == "" }
379
379
  elsif lineType == :plain
380
380
  firstLine = true
381
381
  File.readlines(dep_filename).each do |line|
@@ -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
- if ((!@fileTcs.has_key?(f)) || singleFile)
590
- @fileTcs[f] = icf
589
+ fTcs = (Bake.options.consoleOutput_fullnames ? 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)
@@ -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
@@ -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(@arg1, @arg2)
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(@arg1, @arg2)
33
+ Dir.glob(@arg1).each {|f| FileUtils.cp_r(f, @arg2)}
27
34
  elsif @type == :remove
28
35
  puts "Removing #{@arg1}" if @echo
29
- FileUtils.rm_rf(@arg1)
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/common/root.rb CHANGED
@@ -80,6 +80,7 @@ module Bake
80
80
  end
81
81
 
82
82
  def self.search_to_depth(root, baseName, depth)
83
+ return Dir.glob(baseName) if File.is_absolute?(baseName)
83
84
  if not File.exist?(root)
84
85
  Bake.formatter.printError("Root #{root} does not exist.")
85
86
  ExitHelper.exit(1)
@@ -1,7 +1,7 @@
1
1
  module Bake
2
2
  class Version
3
3
  def self.number
4
- "2.68.0"
4
+ "2.70.1"
5
5
  end
6
6
 
7
7
  def self.printBakeVersion(ry = "")
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.68.0
4
+ version: 2.70.1
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-03-03 00:00:00.000000000 Z
11
+ date: 2021-12-09 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.16.1
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.16.1
138
+ version: 0.21.2
139
139
  - !ruby/object:Gem::Dependency
140
- name: coveralls
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.23
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.23
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.1.4
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: []