bake-toolkit 2.28.1 → 2.29.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.
@@ -205,6 +205,10 @@ module Bake
205
205
  contains_many 'step', Step, 'parent'
206
206
  end
207
207
 
208
+ class CleanSteps < ModelElement
209
+ contains_many 'step', Step, 'parent'
210
+ end
211
+
208
212
  class StartupSteps < ModelElement
209
213
  contains_many 'step', Step, 'parent'
210
214
  end
@@ -239,6 +243,7 @@ module Bake
239
243
  contains_one 'preSteps', PreSteps, 'parent'
240
244
  contains_one 'postSteps', PostSteps, 'parent'
241
245
  contains_one 'exitSteps', ExitSteps, 'parent'
246
+ contains_one 'cleanSteps', CleanSteps, 'parent'
242
247
  contains_many 'baseElement', BaseElement, 'parent'
243
248
  contains_one 'defaultToolchain', DefaultToolchain, 'parent'
244
249
  contains_one 'toolchain', Toolchain, 'parent'
@@ -38,9 +38,9 @@ module Bake
38
38
  puts " --toolchain-names Prints available toolchains."
39
39
  puts " --dot <filename> Creates a .dot file of the config dependencies."
40
40
  puts " --do <name> Includes steps with this filter name (can be used multiple times)."
41
- puts " 'PRE', 'POST', 'STARTUP' or 'EXIT' includes all according steps."
41
+ puts " 'PRE', 'POST', 'STARTUP', 'EXIT' or 'CLEAN' includes all according steps."
42
42
  puts " --omit <name> Excludes steps with this filter name (can be used multiple times)."
43
- puts " 'PRE', 'POST', 'STARTUP' or 'EXIT' excludes all according steps."
43
+ puts " 'PRE', 'POST', 'STARTUP', 'EXIT' or 'CLEAN' excludes all according steps."
44
44
  puts " --abs-paths Compiler prints absolute filename paths instead of relative paths."
45
45
  puts " --Wparse The error parser result is also taken into account, not only the return value of compiler, archiver and linker."
46
46
  puts " --no-autodir Disable auto completion of paths like in IncludeDir"
@@ -38,6 +38,10 @@ module Bake
38
38
  @exitSteps ||= []
39
39
  end
40
40
 
41
+ def cleanSteps
42
+ @cleanSteps ||= []
43
+ end
44
+
41
45
  def dependencies
42
46
  @dependencies ||= []
43
47
  end
@@ -262,7 +266,7 @@ module Bake
262
266
  depResult = callDeps(:clean)
263
267
  return false if not depResult and Bake.options.stopOnFirstError
264
268
 
265
- if Bake.options.verbose >= 2
269
+ if Bake.options.verbose >= 2 or cleanSteps.length > 0
266
270
  typeStr = @prebuild ? "Checking" : "Cleaning"
267
271
  Bake.formatter.printAdditionalInfo "**** #{typeStr} #{Block.block_counter} of #{@@num_projects}: #{@projectName} (#{@configName}) ****"
268
272
  end
@@ -278,6 +282,11 @@ module Bake
278
282
  end
279
283
  end
280
284
 
285
+ cleanSteps.each do |step|
286
+ @result = executeStep(step, :cleanStep) if @result
287
+ return false if not @result and Bake.options.stopOnFirstError
288
+ end unless @prebuild
289
+
281
290
  return (depResult && @result)
282
291
  end
283
292
 
@@ -12,19 +12,25 @@ module Bake
12
12
  @projectDir = config.get_project_dir
13
13
  end
14
14
 
15
- def execute
15
+ def run
16
16
  return true if Bake.options.linkOnly
17
17
  return executeCommand(@commandLine, nil, @config.validExitCodes, @config.echo)
18
18
  end
19
19
 
20
+ def execute
21
+ return run()
22
+ end
23
+
20
24
  def startupStep
21
- return true if Bake.options.linkOnly
22
- return executeCommand(@commandLine, nil, @config.validExitCodes, @config.echo)
25
+ return run()
23
26
  end
24
27
 
25
28
  def exitStep
26
- return true if Bake.options.linkOnly
27
- return executeCommand(@commandLine, nil, @config.validExitCodes, @config.echo)
29
+ return run()
30
+ end
31
+
32
+ def cleanStep
33
+ return run()
28
34
  end
29
35
 
30
36
  def clean
@@ -74,26 +74,36 @@ module Bake
74
74
 
75
75
  end
76
76
 
77
- def execute
77
+ def run
78
78
  return true if Bake.options.linkOnly
79
79
  return executeCommand(@commandLine, nil, @config.validExitCodes, @config.echo)
80
+ end
81
+
82
+ def execute
83
+ return run()
80
84
  end
81
85
 
82
86
  def startupStep
83
- return true if Bake.options.linkOnly
84
- return executeCommand(@commandLine, nil, @config.validExitCodes, @config.echo)
87
+ return run()
85
88
  end
86
89
 
87
90
  def exitStep
88
- return true if Bake.options.linkOnly
89
- return executeCommand(@commandLine, nil, @config.validExitCodes, @config.echo)
91
+ return run()
90
92
  end
91
93
 
92
- def clean
94
+ def do_clean
93
95
  return true if Bake.options.linkOnly
94
96
  return executeCommand(@cleanLine, "No rule to make target 'clean'.", @config.validExitCodes, @config.echo) unless Bake.options.filename
95
97
  end
96
98
 
99
+ def clean
100
+ return do_clean()
101
+ end
102
+
103
+ def cleanStep
104
+ return do_clean()
105
+ end
106
+
97
107
  end
98
108
 
99
109
  end
@@ -1,7 +1,7 @@
1
1
  module Bake
2
2
  class Version
3
3
  def self.number
4
- "2.28.1"
4
+ "2.29.0"
5
5
  end
6
6
 
7
7
  def self.printBakeVersion(ry = "")
@@ -300,8 +300,9 @@ module Bake
300
300
  addSteps(block, block.exitSteps, config.exitSteps)
301
301
 
302
302
  if not Bake.options.prepro and not Bake.options.conversion_info and not Bake.options.file_list and not Bake.options.docu and not Bake.options.filename and not Bake.options.analyze
303
- addSteps(block, block.preSteps, config.preSteps)
304
- addSteps(block, block.postSteps, config.postSteps)
303
+ addSteps(block, block.preSteps, config.preSteps)
304
+ addSteps(block, block.postSteps, config.postSteps)
305
+ addSteps(block, block.cleanSteps, config.cleanSteps)
305
306
  end
306
307
 
307
308
  if Bake.options.docu
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bake-toolkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.28.1
4
+ version: 2.29.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Schaal