bake-toolkit 2.19.2 → 2.20.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.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/documentation/_build/html/_images/dot.png +0 -0
  3. data/documentation/_build/html/_images/dotP.png +0 -0
  4. data/documentation/_build/html/_images/dotPC.png +0 -0
  5. data/documentation/_build/html/_sources/changelog.txt +12 -0
  6. data/documentation/_build/html/_sources/concepts/concepts.txt +2 -0
  7. data/documentation/_build/html/_sources/concepts/inject.txt +65 -0
  8. data/documentation/_build/html/_sources/concepts/prebuild.txt +56 -0
  9. data/documentation/_build/html/_sources/index.txt +1 -1
  10. data/documentation/_build/html/_sources/syntax/auto_adjustment.txt +43 -0
  11. data/documentation/_build/html/_sources/syntax/syntax.txt +1 -1
  12. data/documentation/_build/html/_sources/syntax/variable_substitutions.txt +41 -68
  13. data/documentation/_build/html/_sources/tips_and_tricks/dot.txt +34 -0
  14. data/documentation/_build/html/_sources/tips_and_tricks/tips_and_tricks.txt +1 -1
  15. data/documentation/_build/html/_static/dot.png +0 -0
  16. data/documentation/_build/html/_static/dotP.png +0 -0
  17. data/documentation/_build/html/_static/dotPC.png +0 -0
  18. data/documentation/_build/html/_static/syntax.html +20 -0
  19. data/documentation/_build/html/changelog.html +17 -3
  20. data/documentation/_build/html/commandline/commandline.html +3 -3
  21. data/documentation/_build/html/concepts/build_hierarchy.html +3 -3
  22. data/documentation/_build/html/concepts/concepts.html +13 -3
  23. data/documentation/_build/html/concepts/inject.html +217 -0
  24. data/documentation/_build/html/concepts/link_order.html +3 -3
  25. data/documentation/_build/html/concepts/prebuild.html +205 -0
  26. data/documentation/_build/html/concepts/the_main_project.html +3 -3
  27. data/documentation/_build/html/concepts/the_project_meta_file.html +3 -3
  28. data/documentation/_build/html/genindex.html +3 -3
  29. data/documentation/_build/html/ide/eclipse/eclipse.html +3 -3
  30. data/documentation/_build/html/ide/eclipse/how_to_convert_existing_cdt_workspace.html +3 -3
  31. data/documentation/_build/html/ide/eclipse/how_to_create_a_new_project_in_eclipse.html +3 -3
  32. data/documentation/_build/html/ide/eclipse/how_to_create_a_workspace_in_eclipse.html +3 -3
  33. data/documentation/_build/html/ide/eclipse/how_to_debug_in_eclipse.html +3 -3
  34. data/documentation/_build/html/ide/eclipse/how_to_install_eclipse_plugin.html +3 -3
  35. data/documentation/_build/html/ide/eclipse/how_to_use_bake_in_eclipse.html +3 -3
  36. data/documentation/_build/html/ide/ide_integrations.html +3 -3
  37. data/documentation/_build/html/ide/vs/how_to_create_vs_projects.html +3 -3
  38. data/documentation/_build/html/ide/vs/how_to_debug_in_vs.html +3 -3
  39. data/documentation/_build/html/ide/vs/how_to_used_bake_in_vs.html +3 -3
  40. data/documentation/_build/html/ide/vs/vs.html +3 -3
  41. data/documentation/_build/html/ide/vs/vs_install.html +3 -3
  42. data/documentation/_build/html/index.html +10 -7
  43. data/documentation/_build/html/install/install_bake.html +3 -3
  44. data/documentation/_build/html/internal.html +3 -3
  45. data/documentation/_build/html/known_issues.html +3 -3
  46. data/documentation/_build/html/license.html +3 -3
  47. data/documentation/_build/html/performance/performance.html +5 -5
  48. data/documentation/_build/html/quickstart/quickstart.html +3 -3
  49. data/documentation/_build/html/search.html +3 -3
  50. data/documentation/_build/html/searchindex.js +1 -1
  51. data/documentation/_build/html/syntax/adapt_configs.html +3 -3
  52. data/documentation/_build/html/syntax/auto_adjustment.html +190 -0
  53. data/documentation/_build/html/syntax/derive_configs.html +3 -3
  54. data/documentation/_build/html/syntax/project_meta_syntax.html +23 -3
  55. data/documentation/_build/html/syntax/syntax.html +11 -7
  56. data/documentation/_build/html/syntax/variable_substitutions.html +54 -67
  57. data/documentation/_build/html/tips_and_tricks/{bundle.html → dot.html} +25 -19
  58. data/documentation/_build/html/tips_and_tricks/how_to_use_bake_with_cygwin.html +3 -3
  59. data/documentation/_build/html/tips_and_tricks/static_code_analysis.html +3 -3
  60. data/documentation/_build/html/tips_and_tricks/the_bakery.html +3 -3
  61. data/documentation/_build/html/tips_and_tricks/the_clang.html +5 -5
  62. data/documentation/_build/html/tips_and_tricks/tips_and_tricks.html +4 -4
  63. data/documentation/_build/html/why_bake/why_bake.html +5 -5
  64. data/lib/adapt/config/loader.rb +37 -35
  65. data/lib/bake/config/checks.rb +19 -11
  66. data/lib/bake/config/loader.rb +67 -60
  67. data/lib/bake/model/metamodel.rb +56 -30
  68. data/lib/bake/options/options.rb +37 -3
  69. data/lib/bake/options/usage.rb +12 -3
  70. data/lib/bake/subst.rb +5 -2
  71. data/lib/blocks/block.rb +27 -6
  72. data/lib/blocks/blockBase.rb +2 -17
  73. data/lib/blocks/compile.rb +91 -91
  74. data/lib/blocks/executable.rb +41 -41
  75. data/lib/common/version.rb +1 -1
  76. data/lib/tocxx.rb +212 -55
  77. metadata +16 -4
  78. data/documentation/_build/html/_sources/tips_and_tricks/bundle.txt +0 -24
@@ -15,7 +15,7 @@ module Bake
15
15
  def fragment_ref=(fref)
16
16
  @fname = fref.fragment.location
17
17
  end
18
-
18
+
19
19
  def file_name
20
20
  @fname
21
21
  end
@@ -50,11 +50,11 @@ module Bake
50
50
  class InternalIncludes < ModelElement
51
51
  has_attr 'name', String, :defaultValueLiteral => ""
52
52
  end
53
-
53
+
54
54
  class InternalDefines < ModelElement
55
55
  has_attr 'name', String, :defaultValueLiteral => ""
56
56
  end
57
-
57
+
58
58
  class Archiver < ModelElement
59
59
  has_attr 'command', String, :defaultValueLiteral => ""
60
60
  contains_many 'flags', Flags, 'parent'
@@ -77,12 +77,12 @@ module Bake
77
77
 
78
78
  class LintPolicy < ModelElement
79
79
  has_attr 'name', String, :defaultValueLiteral => ""
80
- end
81
-
80
+ end
81
+
82
82
  class Docu < ModelElement
83
83
  has_attr 'name', String, :defaultValueLiteral => ""
84
- end
85
-
84
+ end
85
+
86
86
  class DefaultToolchain < ModelElement
87
87
  has_attr 'basedOn', String, :defaultValueLiteral => ""
88
88
  has_attr 'outputDir', String, :defaultValueLiteral => ""
@@ -103,7 +103,7 @@ module Bake
103
103
  contains_many 'lintPolicy', LintPolicy, 'parent'
104
104
  contains_one 'docu', Docu, 'parent'
105
105
  end
106
-
106
+
107
107
  class Person < ModelElement
108
108
  has_attr 'name', String, :defaultValueLiteral => ""
109
109
  has_attr 'email', String, :defaultValueLiteral => ""
@@ -112,12 +112,12 @@ module Bake
112
112
  class Description < ModelElement
113
113
  has_attr 'text', String, :defaultValueLiteral => ""
114
114
  end
115
-
115
+
116
116
  class RequiredBakeVersion < ModelElement
117
117
  has_attr 'minimum', String, :defaultValueLiteral => ""
118
118
  has_attr 'maximum', String, :defaultValueLiteral => ""
119
119
  end
120
-
120
+
121
121
  class Responsible < ModelElement
122
122
  contains_many "person", Person, 'parent'
123
123
  end
@@ -141,7 +141,7 @@ module Bake
141
141
 
142
142
  class LibStuff < ModelElement
143
143
  end
144
-
144
+
145
145
  class ExternalLibrary < LibStuff
146
146
  has_attr 'name', String, :defaultValueLiteral => ""
147
147
  has_attr 'search', Boolean, :defaultValueLiteral => "true"
@@ -154,12 +154,22 @@ module Bake
154
154
  class UserLibrary < LibStuff
155
155
  has_attr 'name', String, :defaultValueLiteral => ""
156
156
  end
157
-
157
+
158
158
  class Dependency < LibStuff
159
159
  has_attr 'name', String, :defaultValueLiteral => ""
160
160
  has_attr 'config', String, :defaultValueLiteral => ""
161
+ has_attr 'inject', String, :defaultValueLiteral => ""
162
+ end
163
+
164
+ class Except < ModelElement
165
+ has_attr 'name', String, :defaultValueLiteral => ""
166
+ has_attr 'config', String, :defaultValueLiteral => ""
167
+ end
168
+
169
+ class Prebuild < ModelElement
170
+ contains_many 'except', Except, 'parent'
161
171
  end
162
-
172
+
163
173
  class Step < ModelElement
164
174
  has_attr 'name', String, :defaultValueLiteral => ""
165
175
  has_attr 'default', String, :defaultValueLiteral => "on"
@@ -188,11 +198,11 @@ module Bake
188
198
  class ExitSteps < ModelElement
189
199
  contains_many 'step', Step, 'parent'
190
200
  end
191
-
201
+
192
202
  class StartupSteps < ModelElement
193
203
  contains_many 'step', Step, 'parent'
194
204
  end
195
-
205
+
196
206
  class LinkerScript < ModelElement
197
207
  has_attr 'name', String, :defaultValueLiteral => ""
198
208
  end
@@ -200,17 +210,17 @@ module Bake
200
210
  class MapFile < ModelElement
201
211
  has_attr 'name', String, :defaultValueLiteral => ""
202
212
  end
203
-
213
+
204
214
  class ArtifactName < ModelElement
205
215
  has_attr 'name', String, :defaultValueLiteral => ""
206
- end
207
-
216
+ end
217
+
208
218
  class Set < ModelElement
209
219
  has_attr 'name', String, :defaultValueLiteral => ""
210
220
  has_attr 'value', String, :defaultValueLiteral => ""
211
221
  has_attr 'cmd', String, :defaultValueLiteral => ""
212
222
  has_attr 'env', Boolean, :defaultValueLiteral => "false"
213
- end
223
+ end
214
224
 
215
225
  class BaseConfig_INTERNAL < ModelElement
216
226
  has_attr 'name', String, :defaultValueLiteral => ""
@@ -227,32 +237,48 @@ module Bake
227
237
  contains_one 'toolchain', Toolchain, 'parent'
228
238
  contains_many 'set', Set, 'parent'
229
239
  contains_many 'includeDir', IncludeDir, 'parent'
230
-
240
+ contains_many 'prebuild', Prebuild, 'parent'
241
+
231
242
  module ClassModule
232
243
  def ident
233
244
  s = file_name.split("/")
234
245
  s[s.length-2] + "/" + name
235
- end
246
+ end
236
247
  end
237
-
248
+
238
249
  end
239
-
250
+
240
251
  class BuildConfig_INTERNAL < BaseConfig_INTERNAL
241
252
  contains_many 'files', Files, 'parent'
242
253
  contains_many 'excludeFiles', ExcludeFiles, 'parent'
243
254
  contains_one 'artifactName', ArtifactName, 'parent'
244
- end
245
-
255
+ end
256
+
246
257
  class ExecutableConfig < BuildConfig_INTERNAL
247
258
  contains_one 'linkerScript', LinkerScript, 'parent'
248
259
  contains_one 'mapFile', MapFile, 'parent'
260
+ module ClassModule
261
+ def color
262
+ "green"
263
+ end
264
+ end
249
265
  end
250
-
266
+
251
267
  class LibraryConfig < BuildConfig_INTERNAL
268
+ module ClassModule
269
+ def color
270
+ "cyan"
271
+ end
272
+ end
252
273
  end
253
274
 
254
275
  class CustomConfig < BaseConfig_INTERNAL
255
276
  contains_one 'step', Step, 'parent'
277
+ module ClassModule
278
+ def color
279
+ "red"
280
+ end
281
+ end
256
282
  end
257
283
 
258
284
  class Project < ModelElement
@@ -261,21 +287,21 @@ module Bake
261
287
  contains_one 'requiredBakeVersion', RequiredBakeVersion, 'parent'
262
288
  contains_one 'responsible', Responsible, 'parent'
263
289
  contains_many 'config', BaseConfig_INTERNAL, 'parent'
264
-
290
+
265
291
  module ClassModule
266
292
  def name
267
293
  splitted = file_name.split("/")
268
294
  x = splitted[splitted.length-2]
269
295
  x
270
- end
296
+ end
271
297
  end
272
-
298
+
273
299
  end
274
300
 
275
301
  class Adapt < ModelElement
276
302
  contains_many 'config', BaseConfig_INTERNAL, 'parent'
277
303
  end
278
-
304
+
279
305
  end
280
306
 
281
307
  end
@@ -18,9 +18,9 @@ module Bake
18
18
 
19
19
  class Options < Parser
20
20
  attr_accessor :build_config, :nocache, :analyze, :eclipseOrder, :envToolchain, :showConfigs
21
- attr_reader :main_dir, :project, :filename, :main_project_name, :cc2j_filename, :bundleDir # String
21
+ attr_reader :main_dir, :project, :filename, :main_project_name, :cc2j_filename, :bundleDir, :buildDirDelimiter, :dot # String
22
22
  attr_reader :roots, :include_filter, :exclude_filter, :adapt # String List
23
- attr_reader :conversion_info, :stopOnFirstError, :clean, :rebuild, :show_includes, :show_includes_and_defines, :linkOnly, :no_autodir, :clobber, :lint, :docu, :debug, :prepro, :oldLinkOrder # Boolean
23
+ attr_reader :conversion_info, :stopOnFirstError, :clean, :rebuild, :show_includes, :show_includes_and_defines, :linkOnly, :compileOnly, :no_autodir, :clobber, :lint, :docu, :debug, :prepro, :oldLinkOrder, :prebuild # Boolean
24
24
  attr_reader :threads, :socket, :lint_min, :lint_max # Fixnum
25
25
  attr_reader :vars # map
26
26
  attr_reader :verbose
@@ -30,6 +30,9 @@ module Bake
30
30
  def initialize(argv)
31
31
  super(argv)
32
32
 
33
+ @dot = nil
34
+ @prebuild = false
35
+ @buildDirDelimiter = "/"
33
36
  @oldLinkOrder = false
34
37
  @conversion_info = false
35
38
  @envToolchain = false
@@ -57,6 +60,7 @@ module Bake
57
60
  @show_includes = false
58
61
  @show_includes_and_defines = false
59
62
  @linkOnly = false
63
+ @compileOnly = false
60
64
  @no_autodir = false
61
65
  @threads = 8
62
66
  @lint_min = 0
@@ -81,6 +85,7 @@ module Bake
81
85
  add_option(["--rebuild" ], lambda { @rebuild = true })
82
86
  add_option(["--prepro" ], lambda { @prepro = true })
83
87
  add_option(["--link-only", "--link_only" ], lambda { @linkOnly = true; })
88
+ add_option(["--compile-only", "--compile_only" ], lambda { @compileOnly = true; })
84
89
  add_option(["--no-autodir", "--no_autodir" ], lambda { @no_autodir = true })
85
90
  add_option(["--lint" ], lambda { @lint = true })
86
91
  add_option(["--lint-min", "--lint_min" ], lambda { |x| @lint_min = String === x ? x.to_i : x })
@@ -107,10 +112,16 @@ module Bake
107
112
  add_option(["--socket" ], lambda { |x| @socket = String === x ? x.to_i : x })
108
113
  add_option(["--toolchain-info", "--toolchain_info" ], lambda { |x| ToolchainInfo.showToolchain(x) })
109
114
  add_option(["--toolchain-names", "--toolchain_names" ], lambda { ToolchainInfo.showToolchainList })
115
+ add_option(["--dot", ], lambda { |x| @dot = x })
110
116
  add_option(["--do", "--include_filter" ], lambda { |x| @include_filter << x })
111
117
  add_option(["--omit", "--exclude_filter" ], lambda { |x| @exclude_filter << x })
112
118
  add_option(["--abs-paths", "--show_abs_paths" ], lambda { @consoleOutput_fullnames = true })
113
- add_option(["--bundle" ], lambda { |x| set_bundle_dir(x) })
119
+ add_option(["--bundle" ], lambda { |x| Bake::Usage.bundle })
120
+ add_option(["--bundle" ], lambda { Bake::Usage.bundle })
121
+ # add_option(["--bundle" ], lambda { |x| set_bundle_dir(x) })
122
+ # OLD flag renamed in case someone uses this feature
123
+ add_option(["--bundleDeprecated" ], lambda { |x| set_bundle_dir(x) })
124
+ add_option(["--prebuild" ], lambda { @prebuild = true })
114
125
 
115
126
  add_option(["-h", "--help" ], lambda { Bake::Usage.show })
116
127
 
@@ -122,6 +133,7 @@ module Bake
122
133
  add_option(["--list", "--show_configs" ], lambda { @showConfigs = true })
123
134
  add_option(["--writeCC2J" ], lambda { |x| @cc2j_filename = x.gsub(/[\\]/,'/') })
124
135
  add_option(["--link-2-17", "--link_2_17" ], lambda { @oldLinkOrder = true })
136
+ add_option(["--build_", ], lambda { @buildDirDelimiter = "_" })
125
137
 
126
138
 
127
139
  # hidden
@@ -164,6 +176,10 @@ module Bake
164
176
  Bake.formatter.printError("Error: --conversion-info and --linkOnly not allowed at the same time")
165
177
  ExitHelper.exit(1)
166
178
  end
179
+ if @compileOnly
180
+ Bake.formatter.printError("Error: --conversion-info and --compileOnly not allowed at the same time")
181
+ ExitHelper.exit(1)
182
+ end
167
183
  if @lint
168
184
  Bake.formatter.printError("Error: --conversion-info and --lint not allowed at the same time")
169
185
  ExitHelper.exit(1)
@@ -191,6 +207,21 @@ module Bake
191
207
  Bake.formatter.printError("Error: --link-only and --prepro not allowed at the same time")
192
208
  ExitHelper.exit(1)
193
209
  end
210
+ if @filename
211
+ Bake.formatter.printError("Error: --link-only and --filename not allowed at the same time")
212
+ ExitHelper.exit(1)
213
+ end
214
+ end
215
+
216
+ if @compileOnly
217
+ if @linkOnly
218
+ Bake.formatter.printError("Error: --compile-only and --link-only not allowed at the same time")
219
+ ExitHelper.exit(1)
220
+ end
221
+ if @filename
222
+ Bake.formatter.printError("Error: --compile-only and --filename not allowed at the same time")
223
+ ExitHelper.exit(1)
224
+ end
194
225
  end
195
226
 
196
227
  if @prepro
@@ -208,6 +239,9 @@ module Bake
208
239
  Bake.formatter.printError("Error: --lint and --docu not allowed at the same time")
209
240
  ExitHelper.exit(1)
210
241
  end
242
+
243
+ @filename = "." if @compileOnly
244
+
211
245
  end
212
246
 
213
247
  def check_valid_dir(dir)
@@ -9,7 +9,7 @@ module Bake
9
9
  puts " -p <dir> Project to build/clean (default is main project)"
10
10
  puts " -f <name> Build/Clean this file only."
11
11
  puts " -c Clean the file/project."
12
- puts " -a <scheme> Use ansi color sequences (console must support it). Possible values are 'white' and 'black'."
12
+ puts " -a <scheme> Use ansi color sequences (console must-- support it). Possible values are 'white' and 'black'."
13
13
  puts " -v<level> Verbose level from 0 to 3, whereas -v0 is less, -v1 is normal (default) and -v2 and -v3 are more verbose."
14
14
  puts " -r Stop on first error."
15
15
  puts " -w <root> Add a workspace root (can be used multiple times)."
@@ -20,6 +20,7 @@ module Bake
20
20
  puts " --prepro Stop after preprocessor."
21
21
  puts " --link-only Only link executables - doesn't update objects and archives or start PreSteps and PostSteps."
22
22
  puts " Forces executables to be relinked."
23
+ puts " --compile-only Only the compile steps are executed, equivalent to -f '.'"
23
24
  puts " --generate-doc Builds docu instead of compiling sources."
24
25
  puts " --lint Performs Lint checks instead of compiling sources."
25
26
  puts " --lint-min <num> If number of files in a project is too large for lint to handle, it is possible"
@@ -30,6 +31,7 @@ module Bake
30
31
  puts " --socket <num> Set SOCKET for sending errors, receiving commands, etc. - used by e.g. Eclipse."
31
32
  puts " --toolchain-info <name> Prints default values of a toolchain."
32
33
  puts " --toolchain-names Prints available toolchains."
34
+ puts " --dot <filename> Creates a .dot file of the config dependencies."
33
35
  puts " --do <name> Includes steps with this filter name (can be used multiple times)."
34
36
  puts " 'PRE', 'POST', 'STARTUP' or 'EXIT' includes all according steps."
35
37
  puts " --omit <name> Excludes steps with this filter name (can be used multiple times)."
@@ -40,10 +42,12 @@ module Bake
40
42
  puts " --adapt <name> Specifies an adapt project to manipulate the configs (can be used multiple times)"
41
43
  puts " --incs-and-defs Used by IDEs plugins"
42
44
  puts " --conversion-info Prints infos for an external tool which converts bake configs for other build systems"
43
- puts " --bundle <dir> Bundles the output (experimental, description will follow)"
45
+ # puts " --bundle <dir> Bundles the output (experimental, description will follow)"
46
+ puts "--prebuild Does not build configs which are marked as 'prebuild', this feature is used for distributions."
44
47
  puts " --writeCC2J <name> Writes compiler command into a json file (experimental!)"
45
48
  puts " --create exe|lib|custom Creates a project with exe, lib or custom template"
46
- puts " --link-2-17 Using link order of libraries which was used until bake 2.17"
49
+ puts " --link-2-17 DEPRECATED: Using link order of libraries which was used until bake 2.17"
50
+ puts " --build_ DEPRECATED: build directories will be build_<name> instead of build/<name>"
47
51
 
48
52
  puts ""
49
53
  puts " --version Print version."
@@ -55,6 +59,11 @@ module Bake
55
59
  ExitHelper.exit(0)
56
60
  end
57
61
 
62
+ def self.bundle
63
+ puts "\nOption --bundle not supported anymore, please contact the author via github if still needed."
64
+ ExitHelper.exit(1)
65
+ end
66
+
58
67
  end
59
68
 
60
69
  end
@@ -45,6 +45,7 @@ module Bake
45
45
  @@toolchain = toolchain
46
46
  @@loadedConfig = loadedConfig
47
47
  @@configTcMap = configTcMap
48
+ @@toolchainName = config.defaultToolchain.basedOn if isMainProj
48
49
 
49
50
  @@configName = config.name
50
51
  @@projDir = config.parent.get_project_dir
@@ -167,6 +168,8 @@ module Bake
167
168
  substStr << Bake.options.main_dir
168
169
  elsif var == "ConfigName"
169
170
  substStr << @@configName
171
+ elsif var == "ToolchainName" and defined?@@toolchainName
172
+ substStr << @@toolchainName
170
173
  elsif var == "ProjectName"
171
174
  substStr << @@projName
172
175
  elsif var == "ProjectDir"
@@ -191,9 +194,9 @@ module Bake
191
194
  end
192
195
  if not out_dir
193
196
  if out_proj_name == Bake.options.main_project_name and out_conf_name == Bake.options.build_config
194
- out_dir = "build/" + Bake.options.build_config
197
+ out_dir = "build" + Bake.options.buildDirDelimiter + Bake.options.build_config
195
198
  else
196
- out_dir = "build/" + out_conf_name + "_" + Bake.options.main_project_name + "_" + Bake.options.build_config
199
+ out_dir = "build" + Bake.options.buildDirDelimiter + out_conf_name + "_" + Bake.options.main_project_name + "_" + Bake.options.build_config
197
200
  end
198
201
  end
199
202
  out_dir = substString(out_dir, elem)
@@ -15,7 +15,7 @@ module Bake
15
15
 
16
16
  class Block
17
17
 
18
- attr_reader :lib_elements, :projectDir, :library, :config, :projectName, :warnConvValid
18
+ attr_reader :lib_elements, :projectDir, :library, :config, :projectName, :warnConvValid, :prebuild
19
19
  attr_accessor :visited, :inDeps, :result
20
20
 
21
21
  def startupSteps
@@ -54,8 +54,9 @@ module Bake
54
54
  @library = library
55
55
  end
56
56
 
57
- def initialize(config, referencedConfigs)
57
+ def initialize(config, referencedConfigs, prebuild)
58
58
  @inDeps = false
59
+ @prebuild = prebuild
59
60
  @visited = false
60
61
  @library = nil
61
62
  @config = config
@@ -210,8 +211,8 @@ module Bake
210
211
 
211
212
  def execute
212
213
  if (@inDeps)
213
- if Bake.options.verbose >= 1
214
- Bake.formatter.printWarning("Circular dependency found including project #{@projectName} with config #{@configName}", @config)
214
+ if Bake.options.verbose >= 3
215
+ Bake.formatter.printWarning("While calculating next config, a circular dependency was found including project #{@projectName} with config #{@configName}", @config)
215
216
  end
216
217
  return true
217
218
  end
@@ -227,9 +228,12 @@ module Bake
227
228
  Bake::IDEInterface.instance.set_build_info(@projectName, @configName)
228
229
 
229
230
  if Bake.options.verbose >= 1
230
- Bake.formatter.printAdditionalInfo "**** Building #{Block.block_counter} of #{@@num_projects}: #{@projectName} (#{@configName}) ****"
231
+ typeStr = @prebuild ? "Skipping" : "Building"
232
+ Bake.formatter.printAdditionalInfo "**** #{typeStr} #{Block.block_counter} of #{@@num_projects}: #{@projectName} (#{@configName}) ****"
231
233
  end
232
234
 
235
+ return depResult if @prebuild
236
+
233
237
  @result = callSteps(:execute)
234
238
  return (depResult && @result)
235
239
  end
@@ -242,9 +246,12 @@ module Bake
242
246
  return false if not depResult and Bake.options.stopOnFirstError
243
247
 
244
248
  if Bake.options.verbose >= 2
245
- Bake.formatter.printAdditionalInfo "**** Cleaning #{Block.block_counter} of #{@@num_projects}: #{@projectName} (#{@configName}) ****"
249
+ typeStr = @prebuild ? "Skipping" : "Cleaning"
250
+ Bake.formatter.printAdditionalInfo "**** #{typeStr} #{Block.block_counter} of #{@@num_projects}: #{@projectName} (#{@configName}) ****"
246
251
  end
247
252
 
253
+ return depResult if @prebuild
254
+
248
255
  @result = callSteps(:clean)
249
256
 
250
257
  if Bake.options.clobber
@@ -293,6 +300,20 @@ module Bake
293
300
  return (depResult && @result)
294
301
  end
295
302
 
303
+ def getSubBlocks(b, method)
304
+ b.send(method).each do |child_b|
305
+ if not @otherBlocks.include?child_b and not child_b == self
306
+ @otherBlocks << child_b
307
+ getSubBlocks(child_b, method)
308
+ end
309
+ end
310
+ end
311
+
312
+ def getBlocks(method)
313
+ @otherBlocks = []
314
+ getSubBlocks(self, method)
315
+ return @otherBlocks
316
+ end
296
317
 
297
318
  end
298
319