bake-toolkit 2.13.1 → 2.14.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.
- checksums.yaml +4 -4
- data/documentation/_build/html/_sources/changelog.txt +7 -0
- data/documentation/_build/html/_sources/index.txt +1 -1
- data/documentation/_build/html/_sources/syntax/adapt_configs.txt +143 -0
- data/documentation/_build/html/_sources/syntax/derive_configs.txt +48 -60
- data/documentation/_build/html/_sources/syntax/syntax.txt +1 -0
- data/documentation/_build/html/_static/syntax.html +9 -6
- data/documentation/_build/html/changelog.html +14 -4
- data/documentation/_build/html/commandline/commandline.html +6 -6
- data/documentation/_build/html/concepts/build_hierarchy.html +4 -4
- data/documentation/_build/html/concepts/concepts.html +4 -4
- data/documentation/_build/html/concepts/the_main_project.html +4 -4
- data/documentation/_build/html/concepts/the_project_meta_file.html +4 -4
- data/documentation/_build/html/genindex.html +4 -4
- data/documentation/_build/html/ide/eclipse/eclipse.html +4 -4
- data/documentation/_build/html/ide/eclipse/how_to_convert_existing_cdt_workspace.html +4 -4
- data/documentation/_build/html/ide/eclipse/how_to_create_a_new_project_in_eclipse.html +4 -4
- data/documentation/_build/html/ide/eclipse/how_to_create_a_workspace_in_eclipse.html +4 -4
- data/documentation/_build/html/ide/eclipse/how_to_install_eclipse_plugin.html +4 -4
- data/documentation/_build/html/ide/eclipse/how_to_use_bake_in_eclipse.html +4 -4
- data/documentation/_build/html/ide/ide_integrations.html +4 -4
- data/documentation/_build/html/ide/vs/how_to_create_vs_projects.html +4 -4
- data/documentation/_build/html/ide/vs/how_to_debug_in_vs.html +4 -4
- data/documentation/_build/html/ide/vs/how_to_used_bake_in_vs.html +4 -4
- data/documentation/_build/html/ide/vs/vs.html +4 -4
- data/documentation/_build/html/ide/vs/vs_install.html +4 -4
- data/documentation/_build/html/index.html +8 -7
- data/documentation/_build/html/install/install_bake.html +4 -4
- data/documentation/_build/html/internal.html +4 -4
- data/documentation/_build/html/known_issues.html +4 -4
- data/documentation/_build/html/license.html +4 -4
- data/documentation/_build/html/performance/performance.html +4 -4
- data/documentation/_build/html/quickstart/quickstart.html +4 -4
- data/documentation/_build/html/search.html +4 -4
- data/documentation/_build/html/searchindex.js +1 -1
- data/documentation/_build/html/syntax/adapt_configs.html +287 -0
- data/documentation/_build/html/syntax/derive_configs.html +57 -116
- data/documentation/_build/html/syntax/project_meta_syntax.html +13 -10
- data/documentation/_build/html/syntax/syntax.html +11 -4
- data/documentation/_build/html/syntax/variable_substitutions.html +4 -4
- data/documentation/_build/html/tips_and_tricks/how_to_use_bake_with_cygwin.html +4 -4
- data/documentation/_build/html/tips_and_tricks/static_code_analysis.html +4 -4
- data/documentation/_build/html/tips_and_tricks/the_bakery.html +4 -4
- data/documentation/_build/html/tips_and_tricks/the_clang.html +4 -4
- data/documentation/_build/html/tips_and_tricks/tips_and_tricks.html +4 -4
- data/documentation/_build/html/why_bake/why_bake.html +6 -6
- data/lib/adapt/config/loader.rb +111 -0
- data/lib/bake/cache.rb +25 -1
- data/lib/bake/config/checks.rb +61 -0
- data/lib/bake/config/loader.rb +41 -40
- data/lib/bake/libElement.rb +54 -55
- data/lib/bake/mergeConfig.rb +170 -154
- data/lib/bake/model/language.rb +2 -4
- data/lib/bake/model/metamodel.rb +31 -19
- data/lib/bake/model/metamodel_ext.rb +4 -1
- data/lib/bake/options/options.rb +12 -3
- data/lib/bake/options/usage.rb +1 -0
- data/lib/blocks/block.rb +0 -4
- data/lib/blocks/blockBase.rb +2 -1
- data/lib/blocks/compile.rb +5 -5
- data/lib/blocks/makefile.rb +1 -1
- data/lib/blocks/showIncludes.rb +13 -2
- data/lib/common/version.rb +3 -3
- data/lib/tocxx.rb +7 -2
- metadata +10 -6
data/lib/bake/model/language.rb
CHANGED
@@ -7,8 +7,8 @@ require 'rtext/language'
|
|
7
7
|
module Bake
|
8
8
|
|
9
9
|
class Idp
|
10
|
-
def call(e,
|
11
|
-
e.respond_to?(:ident) ? e.ident() : nil
|
10
|
+
def call(e,notUsed1,notUsed2,notUsed3)
|
11
|
+
e.respond_to?(:ident) ? e.ident() : nil
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
@@ -29,8 +29,6 @@ module Bake
|
|
29
29
|
["str"]
|
30
30
|
elsif c.name == "Flags" or c.name == "LibPostfixFlags" or c.name == "LibPrefixFlags"
|
31
31
|
["overwrite"]
|
32
|
-
elsif c.name == "UserLibrary"
|
33
|
-
["lib"]
|
34
32
|
elsif c.name == "DefaultToolchain"
|
35
33
|
["basedOn"]
|
36
34
|
elsif c.name == "Description"
|
data/lib/bake/model/metamodel.rb
CHANGED
@@ -12,9 +12,16 @@ module Bake
|
|
12
12
|
annotation :details => {'internal' => 'true'}
|
13
13
|
end
|
14
14
|
module ClassModule
|
15
|
-
|
15
|
+
def fragment_ref=(fref)
|
16
|
+
@fname = fref.fragment.location
|
17
|
+
end
|
18
|
+
|
16
19
|
def file_name
|
17
|
-
@
|
20
|
+
@fname
|
21
|
+
end
|
22
|
+
|
23
|
+
def file_name=(name)
|
24
|
+
@fname = name
|
18
25
|
end
|
19
26
|
end
|
20
27
|
end
|
@@ -132,15 +139,27 @@ module Bake
|
|
132
139
|
has_attr 'inherit', Boolean, :defaultValueLiteral => "false"
|
133
140
|
end
|
134
141
|
|
135
|
-
class
|
142
|
+
class LibStuff < ModelElement
|
143
|
+
end
|
144
|
+
|
145
|
+
class ExternalLibrary < LibStuff
|
136
146
|
has_attr 'name', String, :defaultValueLiteral => ""
|
137
147
|
has_attr 'search', Boolean, :defaultValueLiteral => "true"
|
138
148
|
end
|
139
149
|
|
140
|
-
class ExternalLibrarySearchPath <
|
150
|
+
class ExternalLibrarySearchPath < LibStuff
|
141
151
|
has_attr 'name', String, :defaultValueLiteral => ""
|
142
152
|
end
|
143
153
|
|
154
|
+
class UserLibrary < LibStuff
|
155
|
+
has_attr 'name', String, :defaultValueLiteral => ""
|
156
|
+
end
|
157
|
+
|
158
|
+
class Dependency < LibStuff
|
159
|
+
has_attr 'name', String, :defaultValueLiteral => ""
|
160
|
+
has_attr 'config', String, :defaultValueLiteral => ""
|
161
|
+
end
|
162
|
+
|
144
163
|
class Step < ModelElement
|
145
164
|
has_attr 'name', String, :defaultValueLiteral => ""
|
146
165
|
has_attr 'default', String, :defaultValueLiteral => "on"
|
@@ -174,10 +193,6 @@ module Bake
|
|
174
193
|
contains_many 'step', Step, 'parent'
|
175
194
|
end
|
176
195
|
|
177
|
-
class UserLibrary < ModelElement
|
178
|
-
has_attr 'lib', String, :defaultValueLiteral => ""
|
179
|
-
end
|
180
|
-
|
181
196
|
class LinkerScript < ModelElement
|
182
197
|
has_attr 'name', String, :defaultValueLiteral => ""
|
183
198
|
end
|
@@ -200,17 +215,18 @@ module Bake
|
|
200
215
|
class BaseConfig_INTERNAL < ModelElement
|
201
216
|
has_attr 'name', String, :defaultValueLiteral => ""
|
202
217
|
has_attr 'extends', String, :defaultValueLiteral => ""
|
218
|
+
has_attr 'type', String, :defaultValueLiteral => ""
|
219
|
+
has_attr 'project', String, :defaultValueLiteral => ""
|
203
220
|
contains_one 'description', Description, 'parent'
|
204
221
|
contains_one 'startupSteps', StartupSteps, 'parent'
|
205
222
|
contains_one 'preSteps', PreSteps, 'parent'
|
206
223
|
contains_one 'postSteps', PostSteps, 'parent'
|
207
224
|
contains_one 'exitSteps', ExitSteps, 'parent'
|
208
|
-
contains_many '
|
209
|
-
contains_many 'exLib', ExternalLibrary, 'parent'
|
210
|
-
contains_many 'exLibSearchPath', ExternalLibrarySearchPath, 'parent'
|
225
|
+
contains_many 'libStuff', LibStuff, 'parent'
|
211
226
|
contains_one 'defaultToolchain', DefaultToolchain, 'parent'
|
212
227
|
contains_one 'toolchain', Toolchain, 'parent'
|
213
228
|
contains_many 'set', Set, 'parent'
|
229
|
+
contains_many 'includeDir', IncludeDir, 'parent'
|
214
230
|
|
215
231
|
module ClassModule
|
216
232
|
def ident
|
@@ -224,7 +240,6 @@ module Bake
|
|
224
240
|
class BuildConfig_INTERNAL < BaseConfig_INTERNAL
|
225
241
|
contains_many 'files', Files, 'parent'
|
226
242
|
contains_many 'excludeFiles', ExcludeFiles, 'parent'
|
227
|
-
contains_many 'includeDir', IncludeDir, 'parent'
|
228
243
|
end
|
229
244
|
|
230
245
|
class ExecutableConfig < BuildConfig_INTERNAL
|
@@ -257,13 +272,10 @@ module Bake
|
|
257
272
|
|
258
273
|
end
|
259
274
|
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
BaseConfig_INTERNAL.contains_many 'dependency', Dependency, 'parent'
|
266
|
-
|
275
|
+
class Adapt < ModelElement
|
276
|
+
contains_many 'config', BaseConfig_INTERNAL, 'parent'
|
277
|
+
end
|
278
|
+
|
267
279
|
end
|
268
280
|
|
269
281
|
end
|
data/lib/bake/options/options.rb
CHANGED
@@ -19,7 +19,7 @@ module Bake
|
|
19
19
|
class Options < Parser
|
20
20
|
attr_accessor :build_config, :nocache, :analyze, :eclipseOrder, :envToolchain
|
21
21
|
attr_reader :main_dir, :project, :filename, :main_project_name, :cc2j_filename # String
|
22
|
-
attr_reader :roots, :include_filter, :exclude_filter # String List
|
22
|
+
attr_reader :roots, :include_filter, :exclude_filter, :adapt # String List
|
23
23
|
attr_reader :conversion_info, :stopOnFirstError, :clean, :rebuild, :show_includes, :show_includes_and_defines, :linkOnly, :no_autodir, :clobber, :lint, :docu, :debug, :prepro # Boolean
|
24
24
|
attr_reader :threads, :socket, :lint_min, :lint_max # Fixnum
|
25
25
|
attr_reader :vars # map
|
@@ -66,6 +66,7 @@ module Bake
|
|
66
66
|
@exclude_filter = []
|
67
67
|
@def_roots = []
|
68
68
|
@main_project_name = ""
|
69
|
+
@adapt = []
|
69
70
|
|
70
71
|
add_option(["-b", "" ], lambda { |x| set_build_config(x) })
|
71
72
|
add_option(["-m" ], lambda { |x| set_main_dir(x) })
|
@@ -84,10 +85,12 @@ module Bake
|
|
84
85
|
add_option(["--lint-max", "--lint_max" ], lambda { |x| @lint_max = String === x ? x.to_i : x })
|
85
86
|
|
86
87
|
add_option(["--create" ], lambda { |x| Bake::Create.proj(x) })
|
87
|
-
add_option(["--conversion-info", "--conversion_info" ], lambda {
|
88
|
+
add_option(["--conversion-info", "--conversion_info" ], lambda { @conversion_info = true })
|
88
89
|
|
89
90
|
add_option(["--generate-doc", "--docu" ], lambda { @docu = true })
|
90
|
-
|
91
|
+
|
92
|
+
add_option(["--adapt" ], lambda { |x| set_adapt(x) })
|
93
|
+
|
91
94
|
add_option(["-v0" ], lambda { @verbose = 0 })
|
92
95
|
add_option(["-v1" ], lambda { @verbose = 1 })
|
93
96
|
add_option(["-v2" ], lambda { @verbose = 2 })
|
@@ -128,6 +131,8 @@ module Bake
|
|
128
131
|
parse_internal()
|
129
132
|
set_main_dir(Dir.pwd) if @main_dir.nil?
|
130
133
|
@roots = @def_roots if @roots.length == 0
|
134
|
+
@roots.uniq!
|
135
|
+
@adapt.uniq!
|
131
136
|
|
132
137
|
if @project
|
133
138
|
if @project.split(',').length > 2
|
@@ -232,6 +237,10 @@ module Bake
|
|
232
237
|
r = File.expand_path(dir.gsub(/[\\]/,'/'))
|
233
238
|
@roots << r if not @roots.include?r
|
234
239
|
end
|
240
|
+
|
241
|
+
def set_adapt(name)
|
242
|
+
@adapt << name if not @adapt.include?name
|
243
|
+
end
|
235
244
|
|
236
245
|
def set_threads(num)
|
237
246
|
@threads = String === num ? num.to_i : num
|
data/lib/bake/options/usage.rb
CHANGED
@@ -37,6 +37,7 @@ module Bake
|
|
37
37
|
puts " --abs-paths Compiler prints absolute filename paths instead of relative paths."
|
38
38
|
puts " --no-autodir Disable auto completion of paths like in IncludeDir"
|
39
39
|
puts " --set <key>=<value> Sets a variable. Overwrites variables defined in Project.metas (can be used multiple times)."
|
40
|
+
puts " --adapt <name> Specifies an adapt project to manipulate the configs (can be used multiple times)"
|
40
41
|
puts " --incs-and-defs Used by IDEs plugins"
|
41
42
|
puts " --conversion-info Prints infos for an external tool which converts bake configs for other build systems"
|
42
43
|
puts " --writeCC2J <name> Writes compiler command into a json file (experimental!)"
|
data/lib/blocks/block.rb
CHANGED
data/lib/blocks/blockBase.rb
CHANGED
@@ -4,6 +4,7 @@ module Bake
|
|
4
4
|
class BlockBase
|
5
5
|
|
6
6
|
attr_reader :tcs
|
7
|
+
attr_reader :projectDir
|
7
8
|
|
8
9
|
def initialize(block, config, referencedConfigs, tcs)
|
9
10
|
@block = block
|
@@ -56,7 +57,7 @@ module Bake
|
|
56
57
|
cmdTime = File.mtime(cmdLineFile)
|
57
58
|
return "because config file has been changed" if cmdTime < File.mtime(@config.file_name)
|
58
59
|
return "because DefaultToolchain has been changed" if cmdTime < defaultToolchainTime
|
59
|
-
return "because command line has been changed
|
60
|
+
return "because command line has been changed"
|
60
61
|
end
|
61
62
|
|
62
63
|
def self.isCmdLineEqual?(cmd, cmdLineFile)
|
data/lib/blocks/compile.rb
CHANGED
@@ -365,25 +365,25 @@ module Bake
|
|
365
365
|
end
|
366
366
|
res.each do |f|
|
367
367
|
next if exclude_files.include?(f)
|
368
|
+
next if source_files.include?(f)
|
368
369
|
source_files << f
|
370
|
+
@source_files << f
|
369
371
|
end
|
370
372
|
end
|
371
373
|
|
372
374
|
if Bake.options.filename
|
373
|
-
source_files.keep_if do |source|
|
375
|
+
@source_files.keep_if do |source|
|
374
376
|
source.include?Bake.options.filename
|
375
377
|
end
|
376
|
-
if source_files.length == 0 and cleaning == false
|
378
|
+
if @source_files.length == 0 and cleaning == false
|
377
379
|
Bake.formatter.printInfo("#{Bake.options.filename} does not match to any source", @config)
|
378
380
|
end
|
379
381
|
end
|
380
382
|
|
381
|
-
@source_files = source_files.sort.to_a
|
382
|
-
|
383
383
|
if Bake.options.eclipseOrder # directories reverse order, files in directories in alphabetical order
|
384
384
|
dirs = []
|
385
385
|
filemap = {}
|
386
|
-
@source_files.reverse.each do |o|
|
386
|
+
@source_files.sort.reverse.each do |o|
|
387
387
|
d = File.dirname(o)
|
388
388
|
if filemap.include?(d)
|
389
389
|
filemap[d] << o
|
data/lib/blocks/makefile.rb
CHANGED
@@ -22,7 +22,7 @@ module Bake
|
|
22
22
|
calcCommandLine
|
23
23
|
calcCleanLine
|
24
24
|
|
25
|
-
block.lib_elements
|
25
|
+
block.lib_elements << LibElement.new(LibElement::LIB_WITH_PATH, config.lib) if config.lib != ""
|
26
26
|
end
|
27
27
|
|
28
28
|
def calcCommandLine
|
data/lib/blocks/showIncludes.rb
CHANGED
@@ -21,7 +21,14 @@ module Bake
|
|
21
21
|
Blocks::ALL_COMPILE_BLOCKS.sort.each do |projName, blocks|
|
22
22
|
print projName
|
23
23
|
incs = []
|
24
|
-
blocks.each
|
24
|
+
blocks.each do |block|
|
25
|
+
if Bake.options.consoleOutput_fullnames
|
26
|
+
incs += block.include_list.map { |i| File.expand_path(i, block.projectDir) }
|
27
|
+
else
|
28
|
+
incs += block.include_list
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
25
32
|
incs.uniq.each { |inc| print "##{inc}" }
|
26
33
|
print "\n"
|
27
34
|
end
|
@@ -92,7 +99,11 @@ module Bake
|
|
92
99
|
blockIncs = []
|
93
100
|
blockDefs = {:CPP => [], :C => [], :ASM => []}
|
94
101
|
blocks.each do |block|
|
95
|
-
|
102
|
+
if Bake.options.consoleOutput_fullnames
|
103
|
+
blockIncs += block.include_list.map { |i| File.expand_path(i, block.projectDir) }
|
104
|
+
else
|
105
|
+
blockIncs += block.include_list
|
106
|
+
end
|
96
107
|
[:CPP, :C, :ASM].each { |type| blockDefs[type] += block.tcs[:COMPILER][type][:DEFINES] }
|
97
108
|
end
|
98
109
|
|
data/lib/common/version.rb
CHANGED
data/lib/tocxx.rb
CHANGED
@@ -34,6 +34,8 @@ require 'socket'
|
|
34
34
|
require 'blocks/showIncludes'
|
35
35
|
require 'common/abortException'
|
36
36
|
|
37
|
+
require 'adapt/config/loader'
|
38
|
+
|
37
39
|
module Bake
|
38
40
|
|
39
41
|
class SystemCommandFailed < Exception
|
@@ -254,8 +256,11 @@ module Bake
|
|
254
256
|
end
|
255
257
|
|
256
258
|
begin
|
259
|
+
al = AdaptConfig.new
|
260
|
+
adaptConfigs = al.load()
|
261
|
+
|
257
262
|
@loadedConfig = Config.new
|
258
|
-
@loadedConfig.load
|
263
|
+
@loadedConfig.load(adaptConfigs)
|
259
264
|
|
260
265
|
taskType = "Analyzing" if Bake.options.analyze
|
261
266
|
|
@@ -267,7 +272,7 @@ module Bake
|
|
267
272
|
basedOn = @mainConfig.defaultToolchain.basedOn
|
268
273
|
basedOnToolchain = Bake::Toolchain::Provider[basedOn]
|
269
274
|
if basedOnToolchain.nil?
|
270
|
-
Bake.formatter.printError("DefaultToolchain based on unknown compiler '#{basedOn}'",
|
275
|
+
Bake.formatter.printError("DefaultToolchain based on unknown compiler '#{basedOn}'", @mainConfig.defaultToolchain)
|
271
276
|
ExitHelper.exit(1)
|
272
277
|
end
|
273
278
|
|
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.
|
4
|
+
version: 2.14.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:
|
11
|
+
date: 2016-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rtext
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.8.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.8.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rgen
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.8.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.8.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: highline
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -76,7 +76,9 @@ executables:
|
|
76
76
|
extensions: []
|
77
77
|
extra_rdoc_files: []
|
78
78
|
files:
|
79
|
+
- lib/adapt/config/loader.rb
|
79
80
|
- lib/bake/cache.rb
|
81
|
+
- lib/bake/config/checks.rb
|
80
82
|
- lib/bake/config/loader.rb
|
81
83
|
- lib/bake/libElement.rb
|
82
84
|
- lib/bake/mergeConfig.rb
|
@@ -217,6 +219,7 @@ files:
|
|
217
219
|
- documentation/_build/html/_sources/license.txt
|
218
220
|
- documentation/_build/html/_sources/performance/performance.txt
|
219
221
|
- documentation/_build/html/_sources/quickstart/quickstart.txt
|
222
|
+
- documentation/_build/html/_sources/syntax/adapt_configs.txt
|
220
223
|
- documentation/_build/html/_sources/syntax/derive_configs.txt
|
221
224
|
- documentation/_build/html/_sources/syntax/project_meta_syntax.txt
|
222
225
|
- documentation/_build/html/_sources/syntax/syntax.txt
|
@@ -412,6 +415,7 @@ files:
|
|
412
415
|
- documentation/_build/html/quickstart/quickstart.html
|
413
416
|
- documentation/_build/html/search.html
|
414
417
|
- documentation/_build/html/searchindex.js
|
418
|
+
- documentation/_build/html/syntax/adapt_configs.html
|
415
419
|
- documentation/_build/html/syntax/derive_configs.html
|
416
420
|
- documentation/_build/html/syntax/project_meta_syntax.html
|
417
421
|
- documentation/_build/html/syntax/syntax.html
|