bake-toolkit 2.14.0 → 2.15.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/bin/bakery +3 -1
- data/documentation/_build/html/_sources/changelog.txt +8 -1
- data/documentation/_build/html/_sources/index.txt +1 -1
- data/documentation/_build/html/_sources/syntax/derive_configs.txt +13 -0
- data/documentation/_build/html/_static/syntax.html +5 -5
- data/documentation/_build/html/changelog.html +13 -4
- data/documentation/_build/html/commandline/commandline.html +3 -3
- data/documentation/_build/html/concepts/build_hierarchy.html +3 -3
- data/documentation/_build/html/concepts/concepts.html +3 -3
- data/documentation/_build/html/concepts/the_main_project.html +3 -3
- data/documentation/_build/html/concepts/the_project_meta_file.html +3 -3
- data/documentation/_build/html/genindex.html +3 -3
- data/documentation/_build/html/ide/eclipse/eclipse.html +3 -3
- data/documentation/_build/html/ide/eclipse/how_to_convert_existing_cdt_workspace.html +3 -3
- data/documentation/_build/html/ide/eclipse/how_to_create_a_new_project_in_eclipse.html +3 -3
- data/documentation/_build/html/ide/eclipse/how_to_create_a_workspace_in_eclipse.html +3 -3
- data/documentation/_build/html/ide/eclipse/how_to_install_eclipse_plugin.html +3 -3
- data/documentation/_build/html/ide/eclipse/how_to_use_bake_in_eclipse.html +3 -3
- data/documentation/_build/html/ide/ide_integrations.html +3 -3
- data/documentation/_build/html/ide/vs/how_to_create_vs_projects.html +3 -3
- data/documentation/_build/html/ide/vs/how_to_debug_in_vs.html +3 -3
- data/documentation/_build/html/ide/vs/how_to_used_bake_in_vs.html +3 -3
- data/documentation/_build/html/ide/vs/vs.html +3 -3
- data/documentation/_build/html/ide/vs/vs_install.html +3 -3
- data/documentation/_build/html/index.html +6 -6
- data/documentation/_build/html/install/install_bake.html +3 -3
- data/documentation/_build/html/internal.html +3 -3
- data/documentation/_build/html/known_issues.html +3 -3
- data/documentation/_build/html/license.html +3 -3
- data/documentation/_build/html/performance/performance.html +3 -3
- data/documentation/_build/html/quickstart/quickstart.html +3 -3
- data/documentation/_build/html/search.html +3 -3
- data/documentation/_build/html/searchindex.js +1 -1
- data/documentation/_build/html/syntax/adapt_configs.html +3 -3
- data/documentation/_build/html/syntax/derive_configs.html +14 -3
- data/documentation/_build/html/syntax/project_meta_syntax.html +8 -8
- data/documentation/_build/html/syntax/syntax.html +4 -3
- data/documentation/_build/html/syntax/variable_substitutions.html +3 -3
- data/documentation/_build/html/tips_and_tricks/how_to_use_bake_with_cygwin.html +3 -3
- data/documentation/_build/html/tips_and_tricks/static_code_analysis.html +3 -3
- data/documentation/_build/html/tips_and_tricks/the_bakery.html +3 -3
- data/documentation/_build/html/tips_and_tricks/the_clang.html +3 -3
- data/documentation/_build/html/tips_and_tricks/tips_and_tricks.html +3 -3
- data/documentation/_build/html/why_bake/why_bake.html +5 -5
- data/lib/bake/config/loader.rb +6 -2
- data/lib/bake/mergeConfig.rb +9 -9
- data/lib/bake/model/metamodel.rb +2 -2
- data/lib/bake/options/options.rb +1 -1
- data/lib/bake/subst.rb +6 -5
- data/lib/bakery/options/options.rb +2 -2
- data/lib/blocks/block.rb +12 -7
- data/lib/blocks/compile.rb +12 -3
- data/lib/blocks/library.rb +17 -10
- data/lib/common/options/parser.rb +29 -7
- data/lib/common/version.rb +1 -1
- data/lib/vs/options.rb +1 -1
- metadata +2 -2
@@ -42,8 +42,8 @@ module Bake
|
|
42
42
|
puts "Note: all parameters except -b, -m and -h will be passed to bake - see bake help for more options."
|
43
43
|
end
|
44
44
|
|
45
|
-
def parse_options()
|
46
|
-
parse_internal(true)
|
45
|
+
def parse_options(bakeOptions)
|
46
|
+
parse_internal(true, bakeOptions)
|
47
47
|
set_collection_dir(Dir.pwd) if @collection_dir.nil?
|
48
48
|
if @roots.length == 0
|
49
49
|
@roots = @def_roots
|
data/lib/blocks/block.rb
CHANGED
@@ -15,7 +15,7 @@ module Bake
|
|
15
15
|
|
16
16
|
class Block
|
17
17
|
|
18
|
-
attr_reader :lib_elements, :projectDir, :library, :config, :projectName
|
18
|
+
attr_reader :lib_elements, :projectDir, :library, :config, :projectName, :warnConvValid
|
19
19
|
attr_accessor :visited, :inDeps, :result, :circularCheck
|
20
20
|
|
21
21
|
def startupSteps
|
@@ -70,17 +70,20 @@ module Bake
|
|
70
70
|
@lib_elements = Bake::LibElements.calcLibElements(self)
|
71
71
|
end
|
72
72
|
|
73
|
-
def convPath(dir, elem=nil)
|
73
|
+
def convPath(dir, elem=nil, warnIfLocal=false)
|
74
74
|
if dir.respond_to?("name")
|
75
75
|
d = dir.name
|
76
76
|
elem = dir
|
77
77
|
else
|
78
78
|
d = dir
|
79
79
|
end
|
80
|
+
|
81
|
+
@warnConvValid = false
|
80
82
|
|
81
83
|
return d if Bake.options.no_autodir
|
82
84
|
|
83
85
|
inc = d.split("/")
|
86
|
+
res = nil
|
84
87
|
if (inc[0] == @projectName)
|
85
88
|
res = inc[1..-1].join("/") # within self
|
86
89
|
res = "." if res == ""
|
@@ -92,15 +95,11 @@ module Bake
|
|
92
95
|
else
|
93
96
|
if (inc[0] != "..")
|
94
97
|
return d if File.exists?(@projectDir + "/" + d) # e.g. "include"
|
95
|
-
|
96
98
|
# check if dir exists without Project.meta entry
|
97
99
|
Bake.options.roots.each do |r|
|
98
100
|
absIncDir = r+"/"+d
|
99
101
|
if File.exists?(absIncDir)
|
100
102
|
res = File.rel_from_to_project(@projectDir,absIncDir,false)
|
101
|
-
if not res.nil?
|
102
|
-
return res
|
103
|
-
end
|
104
103
|
end
|
105
104
|
end
|
106
105
|
else
|
@@ -109,8 +108,14 @@ module Bake
|
|
109
108
|
end
|
110
109
|
end
|
111
110
|
|
112
|
-
res
|
111
|
+
if res.nil? # relative from self as last resort
|
112
|
+
warnIfLocal = false # no path magic -> no warning
|
113
|
+
res = d
|
114
|
+
end
|
113
115
|
end
|
116
|
+
|
117
|
+
@warnConvValid = File.exists?(@projectDir + "/" + d) if warnIfLocal # only warn if path magic hides local path
|
118
|
+
|
114
119
|
res
|
115
120
|
end
|
116
121
|
|
data/lib/blocks/compile.rb
CHANGED
@@ -243,6 +243,10 @@ module Bake
|
|
243
243
|
|
244
244
|
calcSources
|
245
245
|
calcObjects
|
246
|
+
|
247
|
+
@incWarns.each do |x|
|
248
|
+
Bake.formatter.printInfo("IncludeDir '#{x[0].name}' will be converted to '#{x[1]}' although local path exists. If not intended, use './#{x[0].name}'.", x[0])
|
249
|
+
end if Bake.options.verbose >= 1
|
246
250
|
|
247
251
|
@error_strings = {}
|
248
252
|
|
@@ -424,18 +428,23 @@ module Bake
|
|
424
428
|
return Bake.options.roots.map { |r| File.rel_from_to_project(@projectDir,r,false) }
|
425
429
|
end
|
426
430
|
|
427
|
-
i = orgBlock.convPath(inc)
|
431
|
+
i = orgBlock.convPath(inc,nil,true)
|
428
432
|
if orgBlock != @block
|
429
433
|
if not File.is_absolute?(i)
|
430
434
|
i = File.rel_from_to_project(@projectDir,orgBlock.config.parent.get_project_dir) + i
|
431
435
|
end
|
432
436
|
end
|
433
437
|
|
434
|
-
Pathname.new(i).cleanpath
|
438
|
+
x = Pathname.new(i).cleanpath
|
439
|
+
if orgBlock.warnConvValid
|
440
|
+
@incWarns << [inc, x]
|
441
|
+
end
|
442
|
+
x
|
435
443
|
end
|
436
444
|
|
437
445
|
def calcIncludes
|
438
|
-
|
446
|
+
@incWarns = []
|
447
|
+
|
439
448
|
@include_list = @config.includeDir.uniq.map do |dir|
|
440
449
|
mapInclude(dir, @block)
|
441
450
|
end
|
data/lib/blocks/library.rb
CHANGED
@@ -6,21 +6,28 @@ module Bake
|
|
6
6
|
|
7
7
|
class Library < BlockBase
|
8
8
|
|
9
|
-
attr_reader :compileBlock
|
9
|
+
attr_reader :compileBlock, :archive_name
|
10
10
|
|
11
11
|
def initialize(block, config, referencedConfigs, tcs, compileBlock)
|
12
12
|
super(block,config, referencedConfigs, tcs)
|
13
13
|
@compileBlock = compileBlock
|
14
14
|
|
15
15
|
block.set_library(self)
|
16
|
+
|
17
|
+
calcArtifactName
|
16
18
|
end
|
17
19
|
|
18
|
-
def
|
19
|
-
|
20
|
+
def calcArtifactName
|
21
|
+
if not @config.artifactName.nil? and @config.artifactName.name != ""
|
22
|
+
baseFilename = @config.artifactName.name
|
23
|
+
else
|
24
|
+
baseFilename = "lib#{@projectName}.a"
|
25
|
+
end
|
26
|
+
@archive_name ||= File.join([@output_dir, baseFilename])
|
20
27
|
end
|
21
28
|
|
22
29
|
def calcCmdlineFile()
|
23
|
-
archive_name + ".cmdline"
|
30
|
+
@archive_name + ".cmdline"
|
24
31
|
end
|
25
32
|
|
26
33
|
def ignore?
|
@@ -29,9 +36,9 @@ module Bake
|
|
29
36
|
|
30
37
|
def needed?
|
31
38
|
# lib
|
32
|
-
return "because library does not exist" if not File.exists?(archive_name)
|
39
|
+
return "because library does not exist" if not File.exists?(@archive_name)
|
33
40
|
|
34
|
-
aTime = File.mtime(archive_name)
|
41
|
+
aTime = File.mtime(@archive_name)
|
35
42
|
|
36
43
|
# sources
|
37
44
|
@compileBlock.objects.each do |obj|
|
@@ -67,20 +74,20 @@ module Bake
|
|
67
74
|
cmd += archiver[:ARCHIVE_FLAGS].split(" ")
|
68
75
|
|
69
76
|
if archiver[:ARCHIVE_FLAGS_SPACE]
|
70
|
-
cmd << archive_name
|
77
|
+
cmd << @archive_name
|
71
78
|
else
|
72
|
-
cmd[cmd.length-1] += archive_name
|
79
|
+
cmd[cmd.length-1] += @archive_name
|
73
80
|
end
|
74
81
|
|
75
82
|
cmd += @compileBlock.objects
|
76
83
|
|
77
84
|
return true if cmdLineCheck and BlockBase.isCmdLineEqual?(cmd, cmdLineFile)
|
78
85
|
|
79
|
-
BlockBase.prepareOutput(archive_name)
|
86
|
+
BlockBase.prepareOutput(@archive_name)
|
80
87
|
|
81
88
|
BlockBase.writeCmdLineFile(cmd, cmdLineFile)
|
82
89
|
success, consoleOutput = ProcessHelper.run(cmd, false, false)
|
83
|
-
process_result(cmd, consoleOutput, archiver[:ERROR_PARSER], "Creating #{archive_name}", reason, success)
|
90
|
+
process_result(cmd, consoleOutput, archiver[:ERROR_PARSER], "Creating #{@archive_name}", reason, success)
|
84
91
|
|
85
92
|
check_config_file()
|
86
93
|
return success
|
@@ -24,25 +24,47 @@ module Bake
|
|
24
24
|
opt.block
|
25
25
|
end
|
26
26
|
|
27
|
-
def
|
27
|
+
def valid?(argument)
|
28
|
+
@arguments.include?argument
|
29
|
+
end
|
30
|
+
|
31
|
+
def has_parameter?(argument)
|
32
|
+
return false unless valid?(argument)
|
33
|
+
@arguments[argument].parameters.length == 1
|
34
|
+
end
|
35
|
+
|
36
|
+
def parse_internal(ignore_invalid, subOptions = nil)
|
28
37
|
pos = 0
|
29
38
|
begin
|
30
39
|
while pos < @argv.length do
|
31
|
-
|
32
|
-
|
40
|
+
arg = @argv[pos]
|
41
|
+
if not valid?arg
|
42
|
+
|
43
|
+
# used in bake config, must be passed from bakery to bake
|
44
|
+
if subOptions and subOptions.valid?arg
|
45
|
+
if subOptions.has_parameter?(arg)
|
46
|
+
if pos+1 < @argv.length and @argv[pos+1][0] != "-"
|
47
|
+
pos = pos + 1
|
48
|
+
else
|
49
|
+
raise "Argument for option #{arg} missing"
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
index = arg.index('-')
|
33
55
|
if index != nil and index == 0
|
34
|
-
raise "Option #{
|
56
|
+
raise "Option #{arg} unknown" if not ignore_invalid
|
35
57
|
else
|
36
|
-
@arguments[""].call(
|
58
|
+
@arguments[""].call(arg) # default paramter without "-"
|
37
59
|
end
|
38
60
|
else
|
39
|
-
option = @arguments[
|
61
|
+
option = @arguments[arg]
|
40
62
|
if option.parameters.length == 1
|
41
63
|
if pos+1 < @argv.length and @argv[pos+1][0] != "-"
|
42
64
|
option.call(@argv[pos+1])
|
43
65
|
pos = pos + 1
|
44
66
|
else
|
45
|
-
raise "Argument for option #{
|
67
|
+
raise "Argument for option #{arg} missing"
|
46
68
|
end
|
47
69
|
else
|
48
70
|
option.call()
|
data/lib/common/version.rb
CHANGED
data/lib/vs/options.rb
CHANGED
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.15.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: 2016-
|
11
|
+
date: 2016-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rtext
|