bake-toolkit 2.66.0 → 2.67.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fa60204c2439429e2b1d8e42d36206941185d1085f5c59390b8e5552f6549893
4
- data.tar.gz: 5cfa793f77484f38e0170995b40b679fbd4367f3ef06c50c86c5cc148aacc9cc
3
+ metadata.gz: 8b7e8c87879aebca8bbd9587f2a2763fcb2f62b32c83ef544f0071ef5ef9cd1c
4
+ data.tar.gz: 0236c294b3d7a72134a77ffb0c1ef671e48be28248055fff777644ef9ae71eec
5
5
  SHA512:
6
- metadata.gz: 6901da13b1b992c9e99af33b82f4dc0841d3d236e376a8a6932ba9d1d40490a98f283d0c6aacc794881703fea09b147f353e24b7c5790329cee56d44c0b9bf97
7
- data.tar.gz: 93edb29bd48e1752ebe1d29e83916309fd291e69701b30e9deadfb9f58dc8507bffdb2da7474fcce7336de9f08275017759092b46528c9db793033e2795f0a9e
6
+ metadata.gz: 703bfcfeef0d0ddc237c096f29cac01fc545a17ee2b3d8213516964a2ad62d019bf2cb704e2898b294787322e04cf45482ca60d48733f8d4b16c4ab6417b1a9f
7
+ data.tar.gz: d4478018cc512ba6b3541bf2ec5a2149689d2e9212b92c2cce33324dfb3ac64d936c1bffc178c4820da167419e171222e85a8f333bc42ab288ec6e13e8452b35
@@ -1,3 +1,7 @@
1
- require 'rake'
2
-
3
- require './rake_helper/spec.rb'
1
+ gem "coveralls", "=0.8.23"
2
+ gem "simplecov", "=0.16.1"
3
+ gem "rspec", "=3.10.0"
4
+
5
+ require 'rake'
6
+
7
+ require './rake_helper/spec.rb'
@@ -1,242 +1,243 @@
1
- require_relative '../common/ext/rtext'
2
-
3
- module Bake
4
-
5
- class MergeConfig
6
-
7
- def initialize(child, parent)
8
- @child = child
9
- @parent = parent
10
- end
11
-
12
- def self.clone(obj)
13
- if obj.is_a?(Metamodel::ModelElement)
14
- cloneModelElement(obj)
15
- elsif Array === obj
16
- obj.map { |o| clone(o) }
17
- else
18
- obj # no clone, should not happen
19
- end
20
- end
21
-
22
- def self.cloneModelElement(obj)
23
- cpy = obj.class.new
24
- cpy.file_name = obj.file_name
25
- obj.class.ecore.eAllStructuralFeatures.each do |f|
26
- value = obj.getGeneric(f.name)
27
- if f.is_a?(RGen::ECore::EReference) && f.containment
28
- if value.is_a?(Array)
29
- cpy.setGeneric(f.name, value.collect{|v| clone(v)})
30
- elsif !value.nil?
31
- cpy.setGeneric(f.name, clone(value))
32
- end
33
- elsif f.is_a?(RGen::ECore::EAttribute)
34
- cpy.setGeneric(f.name, value) if obj.eIsSet(f.name)
35
- end
36
- end
37
- cpy
38
- end
39
-
40
-
41
- def replace()
42
- if Metamodel::BaseConfig_INTERNAL === @child &&
43
- Metamodel::BaseConfig_INTERNAL === @parent
44
- if @child.mergeInc != "" && @parent.mergeInc != "no"
45
- @parent.mergeInc = @child.mergeInc
46
- end
47
- end
48
-
49
- @child.class.ecore.eAllReferences.each do |f|
50
- next unless @parent.class.ecore.eAllReferences.include?f
51
- next unless f.containment
52
- childData = @child.getGeneric(f.name)
53
- if Metamodel::ModelElement === childData
54
- @parent.setGeneric(f.name,childData) if !childData.nil?
55
- elsif Array === childData
56
- if !childData.empty?
57
- parentData = @parent.getGeneric(f.name)
58
- cclasses = childData.map { |c| c.class }.uniq
59
- parentData.delete_if { |p| cclasses.include?p.class }
60
- parentData += childData
61
- @parent.setGeneric(f.name,parentData)
62
- end
63
- end
64
- end
65
- end
66
-
67
- def hasSubNodes(elem)
68
- elem.class.ecore.eAllReferences.each do |f|
69
- next unless f.containment
70
- elemData = elem.getGeneric(f.name)
71
- return true if (Array === elemData && !elemData.empty?)
72
- return true if (Metamodel::ModelElement === elemData)
73
- end
74
- false
75
- end
76
-
77
- def sameAttr(childData, parentData)
78
- childData.class.ecore.eAllAttributes.all? { |a|
79
- a.eAnnotations.each do |x| x.details.each do |y|
80
- return true if (y.key == :internal and y.value == true)
81
- end; end
82
- a.name == "line_number" || (not childData.eIsSet(a.name)) || (childData.getGeneric(a.name) == parentData.getGeneric(a.name))
83
- }
84
- end
85
-
86
- def removeChilds(childElem, parentElem)
87
- return if childElem.nil? or parentElem.nil?
88
-
89
- if Metamodel::BaseConfig_INTERNAL === childElem &&
90
- Metamodel::BaseConfig_INTERNAL === parentElem
91
- if childElem.mergeInc == parentElem.mergeInc
92
- parentElem.mergeInc = ""
93
- end
94
- end
95
-
96
- childElem.class.ecore.eAllReferences.each do |f|
97
- next unless f.containment
98
- begin
99
- childData = childElem.getGeneric(f.name)
100
- parentData = parentElem.getGeneric(f.name)
101
- rescue Exception => ex
102
- next # how to check fast if f.name is valid?
103
- end
104
- next if childData.nil? or parentData.nil?
105
- if (Array === childData)
106
- if !parentData.empty? && !childData.empty?
107
- childData.each do |c|
108
- cN = hasSubNodes(c)
109
- toRemove = []
110
- parentData.each do |p|
111
- next if p.class != c.class
112
- if (not cN)
113
- if sameAttr(c, p)
114
- toRemove << p
115
- end
116
- else
117
- removeChilds(c, p);
118
- end
119
- end
120
- toRemove.each do |r|
121
- parentElem.removeGeneric(f.name, r)
122
- end
123
- end
124
- end
125
- elsif Metamodel::ModelElement === childData
126
- if parentData.class == childData.class && sameAttr(childData, parentData)
127
- cN = hasSubNodes(childData)
128
- if (not cN)
129
- parentElem.setGeneric(f.name, nil)
130
- else
131
- removeChilds(childData, parentData)
132
- end
133
- end # otherwise not equal, will not be deleted
134
- end
135
- end
136
- end
137
-
138
- def extendAttributes(childData, parentData)
139
- parentData.class.ecore.eAllAttributes.each do |a|
140
- childData.setGeneric(a.name, parentData.getGeneric(a.name)) if !childData.eIsSet(a.name) && parentData.eIsSet(a.name)
141
- end
142
- end
143
-
144
- def extend(child, parent, push_front)
145
- if Metamodel::BaseConfig_INTERNAL === child &&
146
- Metamodel::BaseConfig_INTERNAL === parent
147
- if child.mergeInc != "" && parent.mergeInc != "no"
148
- parent.mergeInc = child.mergeInc
149
- end
150
- end
151
-
152
- (parent.class.ecore.eAllReferences & child.class.ecore.eAllReferences).each do |f|
153
- next unless f.containment
154
- parentData = parent.getGeneric(f.name)
155
- next if parentData.nil? or (Array === parentData && parentData.empty?)
156
- childData = child.getGeneric(f.name)
157
-
158
- if Array === parentData
159
- if f.name == "compiler"
160
- extendedParentData = []
161
- parentData.each do |p|
162
- c = childData.find { |c| p.ctype == c.ctype }
163
- if c
164
- extendAttributes(c, p)
165
- extend(c, p, push_front)
166
- extendedParentData << c
167
- else
168
- extendedParentData << p
169
- end
170
- end
171
- restOfChildData = childData.find_all { |c| parentData.find {|p| p.ctype != c.ctype } }
172
- child.setGeneric(f.name, extendedParentData + restOfChildData)
173
- else
174
- if push_front
175
- child.setGeneric(f.name, childData + parentData)
176
- else
177
- child.setGeneric(f.name, parentData + childData)
178
- end
179
- end
180
- elsif Metamodel::ModelElement === parentData
181
- if childData.nil? || childData.class != parentData.class
182
- child.setGeneric(f.name, parentData)
183
- else
184
- extendAttributes(childData, parentData)
185
- extend(childData, parentData, push_front)
186
- end
187
- end
188
- end
189
- end
190
-
191
- def copyChildToParent(c, p)
192
- (p.class.ecore.eAllReferences & c.class.ecore.eAllReferences).each do |f|
193
- next unless f.containment
194
- childData = c.getGeneric(f.name)
195
- next if childData.nil? || (Array === childData && childData.empty?)
196
- p.setGeneric(f.name, childData)
197
- end
198
- end
199
-
200
- def merge(type)
201
- if (@child.strict == true) && !(@child.class == @parent.class)
202
- return
203
- end
204
-
205
- s = StringIO.new
206
- ser = RText::Serializer.new(Language)
207
-
208
- if Bake.options.debug
209
- s.puts "\n>>>> child <<<<"
210
- ser.serialize(@child, s)
211
- s.puts "\n>>>> parent <<<<"
212
- ser.serialize(@parent, s)
213
- end
214
-
215
- if (type == :remove)
216
- removeChilds(@child, @parent)
217
- elsif (type == :replace)
218
- replace
219
- elsif (type == :extend)
220
- c = MergeConfig.clone(@child)
221
- extend(c, @parent, false)
222
- copyChildToParent(c, @parent)
223
- elsif (type == :push_front)
224
- c = MergeConfig.clone(@child)
225
- extend(c, @parent, true)
226
- copyChildToParent(c, @parent)
227
- elsif (type == :merge)
228
- extend(@child, MergeConfig.clone(@parent), false)
229
- end
230
-
231
- if Bake.options.debug
232
- s.puts "\n>>>> result of #{type.to_s} <<<<"
233
- ser.serialize(type == :merge ? @child : @parent, s)
234
- puts "#{s.string}"
235
- end
236
-
237
-
238
- end
239
-
240
- end
241
-
1
+ require_relative '../common/ext/rtext'
2
+
3
+ module Bake
4
+
5
+ class MergeConfig
6
+
7
+ def initialize(child, parent)
8
+ @child = child
9
+ @parent = parent
10
+ end
11
+
12
+ def self.clone(obj)
13
+ if obj.is_a?(Metamodel::ModelElement)
14
+ cloneModelElement(obj)
15
+ elsif Array === obj
16
+ obj.map { |o| clone(o) }
17
+ else
18
+ obj # no clone, should not happen
19
+ end
20
+ end
21
+
22
+ def self.cloneModelElement(obj)
23
+ cpy = obj.class.new
24
+ cpy.file_name = obj.file_name
25
+ cpy.org_file_name = obj.file_name
26
+ obj.class.ecore.eAllStructuralFeatures.each do |f|
27
+ value = obj.getGeneric(f.name)
28
+ if f.is_a?(RGen::ECore::EReference) && f.containment
29
+ if value.is_a?(Array)
30
+ cpy.setGeneric(f.name, value.collect{|v| clone(v)})
31
+ elsif !value.nil?
32
+ cpy.setGeneric(f.name, clone(value))
33
+ end
34
+ elsif f.is_a?(RGen::ECore::EAttribute)
35
+ cpy.setGeneric(f.name, value) if obj.eIsSet(f.name)
36
+ end
37
+ end
38
+ cpy
39
+ end
40
+
41
+
42
+ def replace()
43
+ if Metamodel::BaseConfig_INTERNAL === @child &&
44
+ Metamodel::BaseConfig_INTERNAL === @parent
45
+ if @child.mergeInc != "" && @parent.mergeInc != "no"
46
+ @parent.mergeInc = @child.mergeInc
47
+ end
48
+ end
49
+
50
+ @child.class.ecore.eAllReferences.each do |f|
51
+ next unless @parent.class.ecore.eAllReferences.include?f
52
+ next unless f.containment
53
+ childData = @child.getGeneric(f.name)
54
+ if Metamodel::ModelElement === childData
55
+ @parent.setGeneric(f.name,childData) if !childData.nil?
56
+ elsif Array === childData
57
+ if !childData.empty?
58
+ parentData = @parent.getGeneric(f.name)
59
+ cclasses = childData.map { |c| c.class }.uniq
60
+ parentData.delete_if { |p| cclasses.include?p.class }
61
+ parentData += childData
62
+ @parent.setGeneric(f.name,parentData)
63
+ end
64
+ end
65
+ end
66
+ end
67
+
68
+ def hasSubNodes(elem)
69
+ elem.class.ecore.eAllReferences.each do |f|
70
+ next unless f.containment
71
+ elemData = elem.getGeneric(f.name)
72
+ return true if (Array === elemData && !elemData.empty?)
73
+ return true if (Metamodel::ModelElement === elemData)
74
+ end
75
+ false
76
+ end
77
+
78
+ def sameAttr(childData, parentData)
79
+ childData.class.ecore.eAllAttributes.all? { |a|
80
+ a.eAnnotations.each do |x| x.details.each do |y|
81
+ return true if (y.key == :internal and y.value == true)
82
+ end; end
83
+ a.name == "line_number" || (not childData.eIsSet(a.name)) || (childData.getGeneric(a.name) == parentData.getGeneric(a.name))
84
+ }
85
+ end
86
+
87
+ def removeChilds(childElem, parentElem)
88
+ return if childElem.nil? or parentElem.nil?
89
+
90
+ if Metamodel::BaseConfig_INTERNAL === childElem &&
91
+ Metamodel::BaseConfig_INTERNAL === parentElem
92
+ if childElem.mergeInc == parentElem.mergeInc
93
+ parentElem.mergeInc = ""
94
+ end
95
+ end
96
+
97
+ childElem.class.ecore.eAllReferences.each do |f|
98
+ next unless f.containment
99
+ begin
100
+ childData = childElem.getGeneric(f.name)
101
+ parentData = parentElem.getGeneric(f.name)
102
+ rescue Exception => ex
103
+ next # how to check fast if f.name is valid?
104
+ end
105
+ next if childData.nil? or parentData.nil?
106
+ if (Array === childData)
107
+ if !parentData.empty? && !childData.empty?
108
+ childData.each do |c|
109
+ cN = hasSubNodes(c)
110
+ toRemove = []
111
+ parentData.each do |p|
112
+ next if p.class != c.class
113
+ if (not cN)
114
+ if sameAttr(c, p)
115
+ toRemove << p
116
+ end
117
+ else
118
+ removeChilds(c, p);
119
+ end
120
+ end
121
+ toRemove.each do |r|
122
+ parentElem.removeGeneric(f.name, r)
123
+ end
124
+ end
125
+ end
126
+ elsif Metamodel::ModelElement === childData
127
+ if parentData.class == childData.class && sameAttr(childData, parentData)
128
+ cN = hasSubNodes(childData)
129
+ if (not cN)
130
+ parentElem.setGeneric(f.name, nil)
131
+ else
132
+ removeChilds(childData, parentData)
133
+ end
134
+ end # otherwise not equal, will not be deleted
135
+ end
136
+ end
137
+ end
138
+
139
+ def extendAttributes(childData, parentData)
140
+ parentData.class.ecore.eAllAttributes.each do |a|
141
+ childData.setGeneric(a.name, parentData.getGeneric(a.name)) if !childData.eIsSet(a.name) && parentData.eIsSet(a.name)
142
+ end
143
+ end
144
+
145
+ def extend(child, parent, push_front)
146
+ if Metamodel::BaseConfig_INTERNAL === child &&
147
+ Metamodel::BaseConfig_INTERNAL === parent
148
+ if child.mergeInc != "" && parent.mergeInc != "no"
149
+ parent.mergeInc = child.mergeInc
150
+ end
151
+ end
152
+
153
+ (parent.class.ecore.eAllReferences & child.class.ecore.eAllReferences).each do |f|
154
+ next unless f.containment
155
+ parentData = parent.getGeneric(f.name)
156
+ next if parentData.nil? or (Array === parentData && parentData.empty?)
157
+ childData = child.getGeneric(f.name)
158
+
159
+ if Array === parentData
160
+ if f.name == "compiler"
161
+ extendedParentData = []
162
+ parentData.each do |p|
163
+ c = childData.find { |c| p.ctype == c.ctype }
164
+ if c
165
+ extendAttributes(c, p)
166
+ extend(c, p, push_front)
167
+ extendedParentData << c
168
+ else
169
+ extendedParentData << p
170
+ end
171
+ end
172
+ restOfChildData = childData.find_all { |c| parentData.find {|p| p.ctype != c.ctype } }
173
+ child.setGeneric(f.name, extendedParentData + restOfChildData)
174
+ else
175
+ if push_front
176
+ child.setGeneric(f.name, childData + parentData)
177
+ else
178
+ child.setGeneric(f.name, parentData + childData)
179
+ end
180
+ end
181
+ elsif Metamodel::ModelElement === parentData
182
+ if childData.nil? || childData.class != parentData.class
183
+ child.setGeneric(f.name, parentData)
184
+ else
185
+ extendAttributes(childData, parentData)
186
+ extend(childData, parentData, push_front)
187
+ end
188
+ end
189
+ end
190
+ end
191
+
192
+ def copyChildToParent(c, p)
193
+ (p.class.ecore.eAllReferences & c.class.ecore.eAllReferences).each do |f|
194
+ next unless f.containment
195
+ childData = c.getGeneric(f.name)
196
+ next if childData.nil? || (Array === childData && childData.empty?)
197
+ p.setGeneric(f.name, childData)
198
+ end
199
+ end
200
+
201
+ def merge(type)
202
+ if (@child.strict == true) && !(@child.class == @parent.class)
203
+ return
204
+ end
205
+
206
+ s = StringIO.new
207
+ ser = RText::Serializer.new(Language)
208
+
209
+ if Bake.options.debug
210
+ s.puts "\n>>>> child <<<<"
211
+ ser.serialize(@child, s)
212
+ s.puts "\n>>>> parent <<<<"
213
+ ser.serialize(@parent, s)
214
+ end
215
+
216
+ if (type == :remove)
217
+ removeChilds(@child, @parent)
218
+ elsif (type == :replace)
219
+ replace
220
+ elsif (type == :extend)
221
+ c = MergeConfig.clone(@child)
222
+ extend(c, @parent, false)
223
+ copyChildToParent(c, @parent)
224
+ elsif (type == :push_front)
225
+ c = MergeConfig.clone(@child)
226
+ extend(c, @parent, true)
227
+ copyChildToParent(c, @parent)
228
+ elsif (type == :merge)
229
+ extend(@child, MergeConfig.clone(@parent), false)
230
+ end
231
+
232
+ if Bake.options.debug
233
+ s.puts "\n>>>> result of #{type.to_s} <<<<"
234
+ ser.serialize(type == :merge ? @child : @parent, s)
235
+ puts "#{s.string}"
236
+ end
237
+
238
+
239
+ end
240
+
241
+ end
242
+
242
243
  end
@@ -14,16 +14,10 @@ module Bake
14
14
  annotation :details => {'internal' => 'true'}
15
15
  end
16
16
  module ClassModule
17
+ attr_accessor :file_name, :org_file_name
17
18
  def fragment_ref=(fref)
18
- @fname = fref.fragment.location
19
- end
20
-
21
- def file_name
22
- @fname
23
- end
24
-
25
- def file_name=(name)
26
- @fname = name
19
+ @file_name = fref.fragment.location
20
+ @org_file_name = fref.fragment.location
27
21
  end
28
22
  end
29
23
  end
@@ -103,6 +97,7 @@ module Bake
103
97
  class DefaultToolchain < ModelElement
104
98
  has_attr 'basedOn', String, :defaultValueLiteral => ""
105
99
  has_attr 'outputDir', String, :defaultValueLiteral => ""
100
+ has_attr 'outputDirPostfix', String, :defaultValueLiteral => ""
106
101
  has_attr 'eclipseOrder', Boolean, :defaultValueLiteral => "false"
107
102
  has_attr 'keepObjFileEndings', Boolean, :defaultValueLiteral => "false"
108
103
  contains_many 'compiler', Compiler, 'parent'
@@ -115,6 +110,7 @@ module Bake
115
110
 
116
111
  class Toolchain < ModelElement
117
112
  has_attr 'outputDir', String, :defaultValueLiteral => ""
113
+ has_attr 'outputDirPostfix', String, :defaultValueLiteral => ""
118
114
  contains_many 'compiler', Compiler, 'parent'
119
115
  contains_one 'archiver', Archiver, 'parent'
120
116
  contains_one 'linker', Linker, 'parent'
@@ -227,6 +227,13 @@ module Bake
227
227
  args = Bake.options.include_filter_args[splittedVar[1]]
228
228
  substStr << args if args
229
229
  end
230
+ elsif var == "OriginalDir"
231
+ org = File.dirname(elem.org_file_name)
232
+ if (org == @@projDir)
233
+ substStr << @@projDir
234
+ else
235
+ substStr << File.rel_from_to_project(@@projDir,File.dirname(elem.org_file_name),false)
236
+ end
230
237
  elsif var == "ProjectDir" or (splittedVar.length == 2 and splittedVar[0] == "ProjectDir")
231
238
  if (var == "ProjectDir")
232
239
  substStr << @@projDir
@@ -258,12 +265,18 @@ module Bake
258
265
  configs = @@referencedConfigs[out_proj_name]
259
266
  config = configs.select {|c| c.name == out_conf_name }.first
260
267
  if config
261
- out_dir = nil
262
- if (config.toolchain and config.toolchain.outputDir and config.toolchain.outputDir != "")
268
+
269
+ if config.toolchain && config.toolchain.outputDir && config.toolchain.outputDir != ""
263
270
  out_dir = config.toolchain.outputDir
264
271
  else
265
272
  out_dir = @@configTcMap[config][:OUTPUT_DIR]
266
273
  end
274
+ if config.toolchain && config.toolchain.outputDirPostfix && config.toolchain.outputDirPostfix != ""
275
+ out_dir_postfix = config.toolchain.outputDirPostfix
276
+ else
277
+ out_dir_postfix = @@configTcMap[config][:OUTPUT_DIR_POSTFIX]
278
+ end
279
+
267
280
  if not out_dir
268
281
  qacPart = Bake.options.qac ? (".qac" + Bake.options.buildDirDelimiter) : ""
269
282
  if out_proj_name == Bake.options.main_project_name and out_conf_name == Bake.options.build_config
@@ -272,6 +285,7 @@ module Bake
272
285
  out_dir = "build" + Bake.options.buildDirDelimiter + qacPart + out_conf_name + "_" + Bake.options.main_project_name + "_" + Bake.options.build_config
273
286
  end
274
287
  end
288
+ out_dir += out_dir_postfix if out_dir_postfix
275
289
 
276
290
  if (out_dir.include?"$(")
277
291
  if !elem
@@ -44,6 +44,7 @@ def integrateToolchain(tcs, toolchain)
44
44
 
45
45
  tcs[:KEEP_FILE_ENDINGS] = @mainConfig.defaultToolchain.keepObjFileEndings
46
46
  tcs[:OUTPUT_DIR] = toolchain.outputDir if toolchain.outputDir != ""
47
+ tcs[:OUTPUT_DIR_POSTFIX] = toolchain.outputDirPostfix if toolchain.outputDirPostfix != ""
47
48
  integrateLinker(tcs, toolchain.linker) if toolchain.respond_to?"linker"
48
49
  integrateArchiver(tcs, toolchain.archiver)
49
50
  toolchain.compiler.each do |c|
@@ -25,6 +25,10 @@ module Bake
25
25
  has_attr 'name', String, :defaultValueLiteral => ""
26
26
  has_attr 'config', String, :defaultValueLiteral => ""
27
27
  end
28
+
29
+ class ExcludeDir < ModelElement
30
+ has_attr 'name', String, :defaultValueLiteral => ""
31
+ end
28
32
  class SubCollection < ModelElement
29
33
  has_attr 'name', String, :defaultValueLiteral => ""
30
34
  end
@@ -32,6 +36,7 @@ module Bake
32
36
  has_attr 'name', String, :defaultValueLiteral => ""
33
37
  contains_many 'project', Project, 'collection'
34
38
  contains_many 'exclude', Exclude, 'collection'
39
+ contains_many 'exclude_dir', ExcludeDir, 'collection'
35
40
  contains_many 'collections', SubCollection, 'collection'
36
41
  end
37
42
 
@@ -67,11 +67,18 @@ module Bake
67
67
  p.config = "^"+p.config.gsub("*","(\\w*)")+"$"
68
68
  end
69
69
 
70
+ col.exclude_dir.each do |e|
71
+ e.name = File.expand_path(e.name, @options.collection_dir)
72
+ end
73
+
70
74
  toBuild.delete_if do |bp|
71
75
  exclude = false
72
76
  col.exclude.each do |p|
73
77
  exclude = true if (bp.proj.match(p.name) != nil and bp.conf.match(p.config) != nil)
74
78
  end
79
+ col.exclude_dir.each do |e|
80
+ exclude = true if bp.proj.start_with?(e.name)
81
+ end
75
82
  exclude
76
83
  end
77
84
 
@@ -598,6 +598,9 @@ module Bake
598
598
  @output_dir = "build" + Bake.options.buildDirDelimiter + qacPart + @config.name + "_" + Bake.options.main_project_name + "_" + Bake.options.build_config
599
599
  end
600
600
  end
601
+ if @tcs[:OUTPUT_DIR_POSTFIX] != nil
602
+ @output_dir = @output_dir + @tcs[:OUTPUT_DIR_POSTFIX]
603
+ end
601
604
  end
602
605
 
603
606
  end
@@ -1,7 +1,7 @@
1
1
  module Bake
2
2
  class Version
3
3
  def self.number
4
- "2.66.0"
4
+ "2.67.0"
5
5
  end
6
6
 
7
7
  def self.printBakeVersion(ry = "")
@@ -29,26 +29,22 @@ module Bake
29
29
  end
30
30
  end
31
31
 
32
- expectedRGen = "0.8.2"
33
- expectedRText = "0.9.0"
34
- expectedConcurrent = "1.0.5"
35
-
36
- begin
37
- gem "rgen", "=#{expectedRGen}"
38
- rescue Exception => e
39
- puts "Warning: Failed to load rgen #{expectedRGen}, using latest version"
40
- end
41
-
42
- begin
43
- gem "rtext", "=#{expectedRText}"
44
- rescue Exception => e
45
- puts "Warning: Failed to load rtext #{expectedRText}, using latest version"
46
- end
47
-
48
- begin
49
- gem "concurrent-ruby", "=#{expectedConcurrent}"
50
- rescue Exception => e
51
- puts "Warning: Failed to load concurrent-ruby #{expectedConcurrent}, using latest version"
32
+ deps = [
33
+ ["rgen", "0.8.2"],
34
+ ["rtext", "0.9.0"],
35
+ ["concurrent-ruby", "1.0.5"],
36
+ ["highline", "1.7.8"],
37
+ ["colored", "1.2"],
38
+ ["thwait", "0.1.0"],
39
+ ["e2mmap", "0.1.0"]]
40
+
41
+ deps.each do |d|
42
+ begin
43
+ gem d[0], "=#{d[1]}"
44
+ rescue Exception => e
45
+ puts "Error: Failed to load gem #{d[0]} #{d[1]}, please reinstall bake-toolkit."
46
+ exit -1
47
+ end
52
48
  end
53
49
 
54
50
  end
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.66.0
4
+ version: 2.67.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: 2020-10-23 00:00:00.000000000 Z
11
+ date: 2021-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rtext
@@ -98,72 +98,58 @@ dependencies:
98
98
  name: e2mmap
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ">="
101
+ - - '='
102
102
  - !ruby/object:Gem::Version
103
- version: '0'
103
+ version: 0.1.0
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: '0'
111
- - !ruby/object:Gem::Dependency
112
- name: rake
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- version: 12.3.3
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - ">="
108
+ - - '='
123
109
  - !ruby/object:Gem::Version
124
- version: 12.3.3
110
+ version: 0.1.0
125
111
  - !ruby/object:Gem::Dependency
126
112
  name: rspec
127
113
  requirement: !ruby/object:Gem::Requirement
128
114
  requirements:
129
- - - ">="
115
+ - - '='
130
116
  - !ruby/object:Gem::Version
131
- version: '0'
117
+ version: 3.10.0
132
118
  type: :development
133
119
  prerelease: false
134
120
  version_requirements: !ruby/object:Gem::Requirement
135
121
  requirements:
136
- - - ">="
122
+ - - '='
137
123
  - !ruby/object:Gem::Version
138
- version: '0'
124
+ version: 3.10.0
139
125
  - !ruby/object:Gem::Dependency
140
126
  name: simplecov
141
127
  requirement: !ruby/object:Gem::Requirement
142
128
  requirements:
143
- - - ">="
129
+ - - '='
144
130
  - !ruby/object:Gem::Version
145
- version: '0'
131
+ version: 0.16.1
146
132
  type: :development
147
133
  prerelease: false
148
134
  version_requirements: !ruby/object:Gem::Requirement
149
135
  requirements:
150
- - - ">="
136
+ - - '='
151
137
  - !ruby/object:Gem::Version
152
- version: '0'
138
+ version: 0.16.1
153
139
  - !ruby/object:Gem::Dependency
154
140
  name: coveralls
155
141
  requirement: !ruby/object:Gem::Requirement
156
142
  requirements:
157
- - - ">="
143
+ - - '='
158
144
  - !ruby/object:Gem::Version
159
- version: '0'
145
+ version: 0.8.23
160
146
  type: :development
161
147
  prerelease: false
162
148
  version_requirements: !ruby/object:Gem::Requirement
163
149
  requirements:
164
- - - ">="
150
+ - - '='
165
151
  - !ruby/object:Gem::Version
166
- version: '0'
152
+ version: 0.8.23
167
153
  description: See documentation for more details
168
154
  email: alexander.schaal@esrlabs.com
169
155
  executables:
@@ -279,7 +265,7 @@ files:
279
265
  - lib/rtext-service/options/options.rb
280
266
  - lib/tocxx.rb
281
267
  - license.txt
282
- homepage:
268
+ homepage: https://github.com/esrlabs/bake
283
269
  licenses:
284
270
  - MIT
285
271
  metadata: {}
@@ -300,8 +286,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
300
286
  - !ruby/object:Gem::Version
301
287
  version: '0'
302
288
  requirements: []
303
- rubyforge_project:
304
- rubygems_version: 2.7.7
289
+ rubygems_version: 3.1.4
305
290
  signing_key:
306
291
  specification_version: 4
307
292
  summary: Build tool to compile C/C++ projects fast and easy.