bake-toolkit 2.46.0 → 2.47.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.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/bin/bake +46 -46
  3. data/bin/bake-doc +1 -1
  4. data/bin/bake-format +1 -1
  5. data/bin/bakeclean +1 -1
  6. data/bin/bakeqac +9 -9
  7. data/bin/bakery +11 -11
  8. data/lib/adapt/config/loader.rb +2 -2
  9. data/lib/bake/cache.rb +5 -5
  10. data/lib/bake/config/loader.rb +3 -3
  11. data/lib/bake/mergeConfig.rb +1 -1
  12. data/lib/bake/model/language.rb +1 -4
  13. data/lib/bake/model/loader.rb +6 -6
  14. data/lib/bake/model/metamodel.rb +21 -0
  15. data/lib/bake/model/metamodel_ext.rb +2 -2
  16. data/lib/bake/options/create.rb +1 -1
  17. data/lib/bake/options/options.rb +24 -16
  18. data/lib/bake/options/showDoc.rb +1 -1
  19. data/lib/bake/options/usage.rb +3 -1
  20. data/lib/bake/subst.rb +14 -13
  21. data/lib/bake/toolchain/clang.rb +5 -5
  22. data/lib/bake/toolchain/clang_analyze.rb +2 -2
  23. data/lib/bake/toolchain/diab.rb +4 -4
  24. data/lib/bake/toolchain/errorparser/diab_compiler_error_parser.rb +1 -1
  25. data/lib/bake/toolchain/errorparser/diab_linker_error_parser.rb +1 -1
  26. data/lib/bake/toolchain/errorparser/gcc_compiler_error_parser.rb +1 -1
  27. data/lib/bake/toolchain/errorparser/gcc_linker_error_parser.rb +1 -1
  28. data/lib/bake/toolchain/errorparser/greenhills_compiler_error_parser.rb +1 -1
  29. data/lib/bake/toolchain/errorparser/greenhills_linker_error_parser.rb +1 -1
  30. data/lib/bake/toolchain/errorparser/keil_compiler_error_parser.rb +1 -1
  31. data/lib/bake/toolchain/errorparser/keil_linker_error_parser.rb +1 -1
  32. data/lib/bake/toolchain/errorparser/msvc_compiler_error_parser.rb +1 -1
  33. data/lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb +1 -1
  34. data/lib/bake/toolchain/errorparser/tasking_compiler_error_parser.rb +1 -1
  35. data/lib/bake/toolchain/errorparser/tasking_linker_error_parser.rb +1 -1
  36. data/lib/bake/toolchain/errorparser/ti_compiler_error_parser.rb +1 -1
  37. data/lib/bake/toolchain/errorparser/ti_linker_error_parser.rb +1 -1
  38. data/lib/bake/toolchain/gcc.rb +9 -5
  39. data/lib/bake/toolchain/gcc_env.rb +5 -5
  40. data/lib/bake/toolchain/greenhills.rb +4 -4
  41. data/lib/bake/toolchain/keil.rb +5 -5
  42. data/lib/bake/toolchain/msvc.rb +5 -5
  43. data/lib/bake/toolchain/provider.rb +10 -10
  44. data/lib/bake/toolchain/tasking.rb +4 -4
  45. data/lib/bake/toolchain/ti.rb +5 -5
  46. data/lib/bake/util.rb +5 -6
  47. data/lib/bakeclean/options/options.rb +2 -2
  48. data/lib/bakeqac/options/options.rb +4 -4
  49. data/lib/bakery/model/language.rb +1 -1
  50. data/lib/bakery/model/loader.rb +5 -5
  51. data/lib/bakery/options/options.rb +4 -4
  52. data/lib/bakery/toBake.rb +1 -1
  53. data/lib/blocks/block.rb +4 -4
  54. data/lib/blocks/blockBase.rb +0 -11
  55. data/lib/blocks/commandLine.rb +2 -2
  56. data/lib/blocks/compile.rb +69 -29
  57. data/lib/blocks/convert.rb +1 -1
  58. data/lib/blocks/docu.rb +1 -1
  59. data/lib/blocks/executable.rb +1 -1
  60. data/lib/blocks/fileutil.rb +62 -0
  61. data/lib/blocks/library.rb +1 -1
  62. data/lib/blocks/makefile.rb +1 -1
  63. data/lib/blocks/showIncludes.rb +4 -4
  64. data/lib/blocks/sleep.rb +41 -0
  65. data/lib/common/cleanup.rb +1 -1
  66. data/lib/common/crc32.rb +1 -1
  67. data/lib/common/ext/file.rb +1 -1
  68. data/lib/common/ext/stdout.rb +1 -1
  69. data/lib/common/ide_interface.rb +2 -2
  70. data/lib/common/options/parser.rb +2 -2
  71. data/lib/common/version.rb +1 -1
  72. data/lib/multithread/job.rb +1 -1
  73. data/lib/tocxx.rb +124 -102
  74. metadata +5 -6
  75. data/bin/createVSProjects +0 -214
  76. data/lib/vs/options.rb +0 -69
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d21d45b4900652c338212ddd0f76da254c4a45e2
4
- data.tar.gz: d0c410d6a94440f08108a997ed5bcad489b779e9
3
+ metadata.gz: f78e2244644f2f30995e911a8927f4fd135819a7
4
+ data.tar.gz: 7d97b8abee26bda490caf479e850f01080923903
5
5
  SHA512:
6
- metadata.gz: e51a9b81676a11436b76a9264eb998405947632f3d6fbf4e4d196b7bf339d410fafe35f121ae25459c85333eab59ffaaada760114f7df78cb3bc39ce0eaba7a3
7
- data.tar.gz: c4d113d43a34a6b9ab467fbef15af7996caca4d8efd30b3e6fd26932d0f30e5eda447de8af070d6e8f6bdec87b701376d329babb86e78349821dcc56737cd176
6
+ metadata.gz: 205b865a3d58f1a5815eeee319d5b2c9a549c51cdd8160f786808817a7618fd66dc3945b8b519d675e8e1ddbee24b0c657620d9742e004f5386cd4db0297d950
7
+ data.tar.gz: d8e65c232fa852f14b2a6366fb25acf51d87deda466c7cd5b5a90ccbb924274b86dd8d3bd6907fe598f257c09a4f90f334510cb33bce4f681661c561bfe9aa28
data/bin/bake CHANGED
@@ -1,46 +1,46 @@
1
- #!/usr/bin/env ruby
2
-
3
- $timeStart = Time.now
4
-
5
- $:.unshift(File.dirname(__FILE__)+"/../lib")
6
- require 'common/version'
7
-
8
- STDOUT.sync = true
9
- STDERR.sync = true
10
-
11
- require 'tocxx'
12
- require 'socket'
13
-
14
- module Bake
15
-
16
- earlyExit = nil
17
- begin
18
- if RUBY_VERSION[0..2] == "1.8"
19
- Bake.formatter.printError("Error: Ruby 1.8 not supported anymore. Use Ruby 1.9 or greater.")
20
- ExitHelper.exit(1)
21
- end
22
-
23
- Bake.options = Options.new(ARGV)
24
- Bake.options.parse_options
25
-
26
- tocxx = Bake::ToCxx.new
27
- tocxx.connect()
28
- tocxx.doit()
29
- tocxx.disconnect()
30
-
31
- rescue SystemExit => e
32
- earlyExit = e
33
- begin
34
- tocxx.disconnect()
35
- rescue Exception => e2
36
- end
37
- end
38
-
39
- timeEnd = Time.now
40
- timeDiff = timeEnd - $timeStart
41
- if Bake.options.printTime
42
- Bake.formatter.printInfo("\nTime: %02d:%02d minutes" % [timeDiff/60, timeDiff%60])
43
- end
44
-
45
- raise earlyExit if earlyExit
46
- end
1
+ #!/usr/bin/env ruby
2
+
3
+ $timeStart = Time.now
4
+
5
+ $:.unshift(File.dirname(__FILE__)+"/../lib")
6
+ require_relative '../lib/common/version'
7
+
8
+ STDOUT.sync = true
9
+ STDERR.sync = true
10
+
11
+ require 'tocxx'
12
+ require 'socket'
13
+
14
+ module Bake
15
+
16
+ earlyExit = nil
17
+ begin
18
+ if RUBY_VERSION[0..1] == "1."
19
+ Bake.formatter.printError("Error: Ruby 1.x not supported anymore. Use Ruby 2.0 or greater.")
20
+ ExitHelper.exit(1)
21
+ end
22
+
23
+ Bake.options = Options.new(ARGV)
24
+ Bake.options.parse_options
25
+
26
+ tocxx = Bake::ToCxx.new
27
+ tocxx.connect()
28
+ tocxx.doit()
29
+ tocxx.disconnect()
30
+
31
+ rescue SystemExit => e
32
+ earlyExit = e
33
+ begin
34
+ tocxx.disconnect()
35
+ rescue Exception => e2
36
+ end
37
+ end
38
+
39
+ timeEnd = Time.now
40
+ timeDiff = timeEnd - $timeStart
41
+ if Bake.options.printTime
42
+ Bake.formatter.printInfo("\nTime: %02d:%02d minutes" % [timeDiff/60, timeDiff%60])
43
+ end
44
+
45
+ raise earlyExit if earlyExit
46
+ end
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  $:.unshift(File.dirname(__FILE__)+"/../lib")
4
- require 'common/version'
4
+ require_relative '../lib/common/version'
5
5
 
6
6
  Bake::Version.printBakeVersion
7
7
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  $:.unshift(File.dirname(__FILE__)+"/../lib")
4
4
 
5
- require 'format/bake_format'
5
+ require_relative '../lib/format/bake_format'
6
6
  begin
7
7
  if ARGV.size == 2
8
8
  indent = ' '
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  $:.unshift(File.dirname(__FILE__)+"/../lib")
4
- require "bakeclean/options/options"
4
+ require_relative "../lib/bakeclean/options/options"
5
5
  require "fileutils"
6
6
 
7
7
  $options = Bake::BakecleanOptions.new(ARGV)
@@ -5,13 +5,13 @@ require 'set'
5
5
 
6
6
  $:.unshift(File.dirname(__FILE__)+"/../lib")
7
7
 
8
- require "bakeqac/options/options"
9
- require "bakeqac/filter"
10
- require 'bake/toolchain/colorizing_formatter'
11
- require 'bake/options/options'
12
- require 'common/process'
13
- require 'common/utils'
14
- require 'common/ext/file'
8
+ require_relative "../lib/bakeqac/options/options"
9
+ require_relative "../lib/bakeqac/filter"
10
+ require_relative '../lib/bake/toolchain/colorizing_formatter'
11
+ require_relative '../lib/bake/options/options'
12
+ require_relative '../lib/common/process'
13
+ require_relative '../lib/common/utils'
14
+ require_relative '../lib/common/ext/file'
15
15
 
16
16
  STDOUT.sync = true
17
17
  STDERR.sync = true
@@ -222,13 +222,13 @@ $cmdRemoveLocks = qaExe + ["admin", "--qaf-project", @options.qacdata, "--remove
222
222
  cmd = qaExe + ["analyze", "-b"]
223
223
 
224
224
  begin
225
- devMode = File.exist?"c:/Projekte/git/bake/bin/bake"
225
+ devMode = File.exist?"e:/bake/bake/bin/bake"
226
226
  rescue Exception
227
227
  devMode = false
228
228
  end
229
229
 
230
230
  if devMode
231
- bcmd = "ruby c:/Projekte/git/bake/bin/bake "
231
+ bcmd = "ruby e:/bake/bake/bin/bake "
232
232
  else
233
233
  bcmd = (Utils::OS.windows? ? "cmd /c bake.bat " : "bake ")
234
234
  end
data/bin/bakery CHANGED
@@ -3,9 +3,9 @@
3
3
  $timeStart = Time.now
4
4
 
5
5
  $:.unshift(File.dirname(__FILE__)+"/../lib")
6
- require 'common/version'
6
+ require_relative '../lib/common/version'
7
7
 
8
- require 'common/utils'
8
+ require_relative '../lib/common/utils'
9
9
 
10
10
  Bake::Version.printBakeryVersion
11
11
 
@@ -14,15 +14,15 @@ STDERR.sync = true
14
14
 
15
15
  $stars = "************************************************"
16
16
 
17
- require 'bake/toolchain/colorizing_formatter'
18
- require 'bake/options/options'
19
- require 'tocxx'
20
- require "bakery/model/loader"
21
- require "bakery/options/options"
22
- require "bakery/toBake"
23
- require "bakery/buildPattern"
24
- require 'common/ext/stdout'
25
- require 'common/cleanup'
17
+ require_relative '../lib/bake/toolchain/colorizing_formatter'
18
+ require_relative '../lib/bake/options/options'
19
+ require_relative '../lib/tocxx'
20
+ require_relative "../lib/bakery/model/loader"
21
+ require_relative "../lib/bakery/options/options"
22
+ require_relative "../lib/bakery/toBake"
23
+ require_relative "../lib/bakery/buildPattern"
24
+ require_relative '../lib/common/ext/stdout'
25
+ require_relative '../lib/common/cleanup'
26
26
 
27
27
  module Bake
28
28
 
@@ -1,5 +1,5 @@
1
- require 'bake/model/loader'
2
- require 'bake/config/checks'
1
+ require_relative '../../bake/model/loader'
2
+ require_relative '../../bake/config/checks'
3
3
 
4
4
  module Bake
5
5
 
@@ -1,8 +1,8 @@
1
- require 'common/exit_helper'
2
- require 'bake/toolchain/colorizing_formatter'
3
- require 'common/options/parser'
4
- require 'common/version'
5
- require 'adapt/config/loader'
1
+ require_relative '../common/exit_helper'
2
+ require_relative 'toolchain/colorizing_formatter'
3
+ require_relative '../common/options/parser'
4
+ require_relative '../common/version'
5
+ require_relative '../adapt/config/loader'
6
6
 
7
7
  module Bake
8
8
 
@@ -1,6 +1,6 @@
1
- require 'bake/model/loader'
2
- require 'bake/config/checks'
3
- require 'adapt/config/loader'
1
+ require_relative '../model/loader'
2
+ require_relative 'checks'
3
+ require_relative '../../adapt/config/loader'
4
4
 
5
5
  module Bake
6
6
 
@@ -1,4 +1,4 @@
1
- require 'common/ext/rtext'
1
+ require_relative '../common/ext/rtext'
2
2
 
3
3
  module Bake
4
4
 
@@ -1,9 +1,6 @@
1
- require 'bake/model/metamodel'
2
-
1
+ require_relative 'metamodel'
3
2
  require 'rtext/language'
4
3
 
5
-
6
-
7
4
  module Bake
8
5
 
9
6
  class Idp
@@ -1,6 +1,6 @@
1
- require 'bake/model/metamodel'
2
- require 'bake/model/language'
3
- require 'common/version'
1
+ require_relative 'metamodel'
2
+ require_relative 'language'
3
+ require_relative '../../common/version'
4
4
 
5
5
  require 'rgen/environment'
6
6
  require 'rgen/fragment/dump_file_cache'
@@ -9,9 +9,9 @@ require 'rgen/util/file_cache_map'
9
9
 
10
10
  require 'rtext/default_loader'
11
11
 
12
- require 'common/exit_helper'
13
- require 'bake/toolchain/colorizing_formatter'
14
- require 'bake/options/options'
12
+ require_relative '../../common/exit_helper'
13
+ require_relative '../toolchain/colorizing_formatter'
14
+ require_relative '../options/options'
15
15
 
16
16
  module Bake
17
17
 
@@ -203,6 +203,27 @@ module Bake
203
203
  contains_many 'flags', Flags, 'parent'
204
204
  end
205
205
 
206
+ class MakeDir < Step
207
+ end
208
+
209
+ class Remove < Step
210
+ end
211
+
212
+ class Copy < Step
213
+ has_attr 'to', String, :defaultValueLiteral => ""
214
+ end
215
+
216
+ class Move < Step
217
+ has_attr 'to', String, :defaultValueLiteral => ""
218
+ end
219
+
220
+ class Touch < Step
221
+ end
222
+
223
+ class Sleep < Step
224
+ has_attr 'name', String, :defaultValueLiteral => "0.0"
225
+ end
226
+
206
227
  class CommandLine < Step
207
228
  end
208
229
 
@@ -1,5 +1,5 @@
1
- require 'bake/model/metamodel'
2
- require 'common/ext/file'
1
+ require_relative 'metamodel'
2
+ require_relative '../../common/ext/file'
3
3
 
4
4
  module Bake
5
5
  module Metamodel
@@ -1,5 +1,5 @@
1
1
  require 'fileutils'
2
- require 'common/version'
2
+ require_relative '../../common/version'
3
3
 
4
4
  module Bake
5
5
 
@@ -1,13 +1,13 @@
1
- require 'bake/toolchain/colorizing_formatter'
2
- require 'common/options/parser'
3
- require 'bake/options/showToolchains'
4
- require 'bake/options/showLicense'
5
- require 'bake/options/showDoc'
6
- require 'bake/options/usage'
7
- require 'bake/options/create'
8
- require 'common/options/finder'
9
- require 'common/root'
10
- require 'common/crc32'
1
+ require_relative '../toolchain/colorizing_formatter'
2
+ require_relative '../../common/options/parser'
3
+ require_relative '../options/showToolchains'
4
+ require_relative '../options/showLicense'
5
+ require_relative '../options/showDoc'
6
+ require_relative '../options/usage'
7
+ require_relative '../options/create'
8
+ require_relative '../../common/options/finder'
9
+ require_relative '../../common/root'
10
+ require_relative '../../common/crc32'
11
11
 
12
12
  module Bake
13
13
 
@@ -28,8 +28,10 @@ module Bake
28
28
  attr_reader :vars, :include_filter_args # map
29
29
  attr_reader :verbose
30
30
  attr_reader :filelist # set
31
- attr_reader :consoleOutput_fullnames, :consoleOutput_visualStudio
31
+ attr_reader :consoleOutput_fullnames
32
32
  attr_reader :roots # Root array
33
+ attr_reader :diabCaseCheck
34
+ attr_reader :defines
33
35
 
34
36
 
35
37
  def initialize(argv)
@@ -54,7 +56,6 @@ module Bake
54
56
  @eclipseOrder = false
55
57
  @showConfigs = false
56
58
  @consoleOutput_fullnames = false
57
- @consoleOutput_visualStudio = false
58
59
  @prepro = false
59
60
  @stopOnFirstError = false
60
61
  @verbose = 1
@@ -85,6 +86,8 @@ module Bake
85
86
  @main_project_name = ""
86
87
  @adapt = []
87
88
  @syncedOutput = false
89
+ @diabCaseCheck = false
90
+ @defines = []
88
91
 
89
92
  add_option(["-b", "" ], lambda { |x| set_build_config(x) })
90
93
  add_option(["-m" ], lambda { |x| @main_dir = x })
@@ -142,20 +145,20 @@ module Bake
142
145
  add_option(["--doc", "--show_doc" ], lambda { Doc.show })
143
146
  add_option(["--install-doc", "--install_doc" ], lambda { Doc.install })
144
147
 
148
+ add_option(["-D" ], lambda { |x| @defines << x })
149
+
145
150
  add_option(["--dry" ], lambda { @dry = true })
146
151
 
147
152
  add_option(["--crc32" ], lambda { |x| CRC32.printAndExit(x) })
148
153
 
154
+ add_option(["--diab-case-check" ], lambda { @diabCaseCheck = true; @compileOnly = true })
155
+
149
156
  add_option(["--version" ], lambda { Bake::Usage.version })
150
157
  add_option(["--list", "--show_configs" ], lambda { @showConfigs = true })
151
158
  add_option(["--compilation-db" ], lambda { |x,dummy| @cc2j_filename = (x ? x : "compile_commands.json" )})
152
159
  add_option(["--link-2-17", "--link_2_17" ], lambda { @oldLinkOrder = true })
153
160
  add_option(["--build_", ], lambda { @buildDirDelimiter = "_" })
154
161
 
155
-
156
- # hidden
157
- add_option(["--visualStudio" ], lambda { @consoleOutput_visualStudio = true })
158
-
159
162
  # deprecated and not replaced by new command
160
163
  add_option(["--show_include_paths" ], lambda { @show_includes = true })
161
164
 
@@ -263,6 +266,11 @@ module Bake
263
266
  end
264
267
  end
265
268
 
269
+ if @caseSensitivityCheck == false && @diabCaseCheck == true
270
+ Bake.formatter.printError("Error: --no-case-check and --diab-case-check not allowed at the same time")
271
+ ExitHelper.exit(1)
272
+ end
273
+
266
274
  @filename = "." if @compileOnly
267
275
 
268
276
  end
@@ -1,6 +1,6 @@
1
1
  require "open-uri"
2
2
  require "fileutils"
3
- require "common/version"
3
+ require_relative "../../common/version"
4
4
  require "openssl"
5
5
 
6
6
  module Bake
@@ -1,4 +1,4 @@
1
- require 'common/version'
1
+ require_relative '../../common/version'
2
2
 
3
3
  module Bake
4
4
 
@@ -35,6 +35,7 @@ module Bake
35
35
  puts " --ignore-cache Rereads the original meta files - usefull if workspace structure has been changed."
36
36
  puts " -j <num> Set NUMBER of parallel compiled files (default is 8)."
37
37
  puts " -O The output will be synchronized per configuration. Note, this delays output."
38
+ puts " -D <define> Adds this define to the compiler commands"
38
39
  puts " --socket <num> Set SOCKET for sending errors, receiving commands, etc. - used by e.g. Eclipse."
39
40
  puts " --toolchain-info <name> Prints default values of a toolchain."
40
41
  puts " --toolchain-names Prints available toolchains."
@@ -59,6 +60,7 @@ module Bake
59
60
  puts " --create exe|lib|custom Creates a project with exe, lib or custom template"
60
61
  puts " --nb Suppresses the lines \"**** Building x of y: name (config) ****"
61
62
  puts " --crc32 <string> Calulates the CRC32 of string (0x4C11DB7, init 0, final xor 0, input and result not reflected), used for Uid variable calculation"
63
+ puts " --diab-case-check When compiling with DCC, this switches to the case check on Windows machines. No actual compilation is done."
62
64
  puts " --link-2-17 DEPRECATED: Using link order of libraries which was used until bake 2.17"
63
65
  puts " --build_ DEPRECATED: build directories will be build_<name> instead of build/<name>"
64
66
  puts " --version Print version."