bake-toolkit 2.42.2 → 2.42.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bake/libElement.rb +3 -1
- data/lib/bake/options/options.rb +6 -2
- data/lib/bake/options/usage.rb +2 -1
- data/lib/blocks/block.rb +1 -1
- data/lib/common/options/parser.rb +111 -111
- data/lib/common/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db7a56decb2a548940290f127a619920e3904e32
|
4
|
+
data.tar.gz: aee111f1f448b858250af2102509e89360d93412
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b548504948bba8662e3c239f72cb1f4e81edf0df45e3bbd5304fe3ca745694581809f66f79f4a888954f9ed44e4d681c5d542f80bd61888992d7b39f686f1f9
|
7
|
+
data.tar.gz: d25bad6ab99a8268a55e300583ad4adc3a189174ad84ce123ef24620d5921081dae00adaca7d7501eaeb3e240cc0b147a27c29787a839bf334a9730638bc7131
|
data/lib/bake/libElement.rb
CHANGED
@@ -25,6 +25,7 @@ module Bake
|
|
25
25
|
@@projectDir = block.projectDir
|
26
26
|
@@source_libraries = []
|
27
27
|
@@linker_libs_array = []
|
28
|
+
@@withpath = []
|
28
29
|
|
29
30
|
levels = @@linker[:LINK_ONLY_DIRECT_DEPS] ? 1 : -1
|
30
31
|
collect_recursive(block, levels)
|
@@ -42,7 +43,7 @@ module Bake
|
|
42
43
|
@@linker_libs_array.reverse!
|
43
44
|
end
|
44
45
|
|
45
|
-
return [@@source_libraries, @@linker_libs_array]
|
46
|
+
return [@@source_libraries + @@withpath, @@linker_libs_array]
|
46
47
|
end
|
47
48
|
|
48
49
|
def self.adaptPath(path, block, prefix)
|
@@ -90,6 +91,7 @@ module Bake
|
|
90
91
|
when LibElement::LIB_WITH_PATH
|
91
92
|
adaptedPath, prefix = adaptPath(elem.value, block, prefix)
|
92
93
|
@@linker_libs_array << adaptedPath
|
94
|
+
@@withpath << adaptedPath
|
93
95
|
when LibElement::SEARCH_PATH
|
94
96
|
adaptedPath, prefix = adaptPath(elem.value, block, prefix)
|
95
97
|
lpf = "#{@@linker[:LIB_PATH_FLAG]}#{adaptedPath}"
|
data/lib/bake/options/options.rb
CHANGED
@@ -21,7 +21,7 @@ module Bake
|
|
21
21
|
attr_accessor :build_config, :nocache, :analyze, :eclipseOrder, :envToolchain, :showConfigs
|
22
22
|
attr_reader :main_dir, :project, :filename, :main_project_name, :buildDirDelimiter, :dot, :cc2j_filename # String
|
23
23
|
attr_reader :include_filter, :exclude_filter, :adapt # String List
|
24
|
-
attr_reader :conversion_info, :stopOnFirstError, :clean, :rebuild, :show_includes, :show_includes_and_defines, :projectPaths, :qac, :dry, :syncedOutput, :debug_threads # Boolean
|
24
|
+
attr_reader :conversion_info, :stopOnFirstError, :clean, :rebuild, :show_includes, :show_includes_and_defines, :projectPaths, :qac, :dry, :syncedOutput, :debug_threads, :skipBuildingLine # Boolean
|
25
25
|
attr_reader :linkOnly, :compileOnly, :no_autodir, :clobber, :docu, :debug, :prepro, :oldLinkOrder, :prebuild, :printTime, :json, :wparse # Boolean
|
26
26
|
attr_reader :threads, :socket # Fixnum
|
27
27
|
attr_reader :vars, :include_filter_args # map
|
@@ -34,6 +34,7 @@ module Bake
|
|
34
34
|
def initialize(argv)
|
35
35
|
super(argv)
|
36
36
|
|
37
|
+
@skipBuildingLine = false
|
37
38
|
@debug_threads = false
|
38
39
|
@dry = false
|
39
40
|
@filelist = nil
|
@@ -113,6 +114,7 @@ module Bake
|
|
113
114
|
add_option(["--debug" ], lambda { @debug = true })
|
114
115
|
add_option(["--debug-threads" ], lambda { @debug_threads = true })
|
115
116
|
add_option(["--set" ], lambda { |x| set_set(x) })
|
117
|
+
add_option(["-nb" ], lambda { @skipBuildingLine = true })
|
116
118
|
|
117
119
|
add_option(["--clobber" ], lambda { @clobber = true; @clean = true })
|
118
120
|
add_option(["--ignore-cache", "--ignore_cache" ], lambda { @nocache = true })
|
@@ -293,7 +295,9 @@ module Bake
|
|
293
295
|
end
|
294
296
|
|
295
297
|
def set_adapt(name)
|
296
|
-
|
298
|
+
name.split(",").each do |n|
|
299
|
+
@adapt << n if not @adapt.include?n
|
300
|
+
end
|
297
301
|
end
|
298
302
|
|
299
303
|
def checkNum(num)
|
data/lib/bake/options/usage.rb
CHANGED
@@ -47,7 +47,7 @@ module Bake
|
|
47
47
|
puts " --Wparse The error parser result is also taken into account, not only the return value of compiler, archiver and linker."
|
48
48
|
puts " --no-autodir Disable auto completion of paths like in IncludeDir"
|
49
49
|
puts " --set <key>=<value> Sets a variable. Overwrites variables defined in Project.metas (can be used multiple times)."
|
50
|
-
puts " --adapt <name> Specifies an adapt project to manipulate the configs (can be used multiple times)"
|
50
|
+
puts " --adapt <name> Specifies an adapt project to manipulate the configs (can be used multiple times, or --adapt <name1,name2,...>)"
|
51
51
|
puts " --incs-and-defs=json Prints includes and defines of all projects in json format"
|
52
52
|
puts " --incs-and-defs=bake Used by IDEs plugins"
|
53
53
|
puts " --conversion-info Prints infos for an external tool which converts bake configs for other build systems"
|
@@ -56,6 +56,7 @@ module Bake
|
|
56
56
|
puts " --prebuild Does not build configs which are marked as 'prebuild', this feature is used for distributions."
|
57
57
|
puts " --compilation-db [<fn>] Writes compilation information into filename fn in json format, default for fn is compilation-db.json"
|
58
58
|
puts " --create exe|lib|custom Creates a project with exe, lib or custom template"
|
59
|
+
puts " --nb Suppresses the lines \"**** Building x of y: name (config) ****"
|
59
60
|
puts " --link-2-17 DEPRECATED: Using link order of libraries which was used until bake 2.17"
|
60
61
|
puts " --build_ DEPRECATED: build directories will be build_<name> instead of build/<name>"
|
61
62
|
puts " --version Print version."
|
data/lib/blocks/block.rb
CHANGED
@@ -418,7 +418,7 @@ module Bake
|
|
418
418
|
SyncOut.mutex.synchronize do
|
419
419
|
@outputStep = nil
|
420
420
|
SyncOut.startStream() if Bake.options.syncedOutput
|
421
|
-
if Bake.options.verbose >= 2 || (isBuildBlock? && Bake.options.verbose >= 1)
|
421
|
+
if !Bake.options.skipBuildingLine && (Bake.options.verbose >= 2 || (isBuildBlock? && Bake.options.verbose >= 1))
|
422
422
|
typeStr = "Building"
|
423
423
|
if @prebuild
|
424
424
|
typeStr = "Using"
|
@@ -1,112 +1,112 @@
|
|
1
|
-
require 'bake/toolchain/colorizing_formatter'
|
2
|
-
require 'common/exit_helper'
|
3
|
-
|
4
|
-
module Bake
|
5
|
-
|
6
|
-
class Parser
|
7
|
-
|
8
|
-
def initialize(argv)
|
9
|
-
@arguments = {}
|
10
|
-
@argv = argv
|
11
|
-
end
|
12
|
-
|
13
|
-
#def add_option(opt)
|
14
|
-
# @arguments[opt.param] = opt
|
15
|
-
#end
|
16
|
-
|
17
|
-
def add_option(params, block)
|
18
|
-
params.each { |p| @arguments[p] = block }
|
19
|
-
end
|
20
|
-
|
21
|
-
def valid?(argument)
|
22
|
-
@arguments.any? { |a, b|
|
23
|
-
argument == a || (a != "" && argument.start_with?(a) && (!b || (b.parameters.length==3 && argument[a.length..-1].scan(/\A\d*\z/).length > 0)))
|
24
|
-
}
|
25
|
-
end
|
26
|
-
|
27
|
-
def get_block(argument)
|
28
|
-
arg = nil
|
29
|
-
block = nil
|
30
|
-
@arguments.each do |a, b|
|
31
|
-
if argument.start_with?(a) && a != ""
|
32
|
-
return [b, nil] if a == argument
|
33
|
-
if b && b.parameters.length==3 && argument[a.length..-1].scan(/\A\d*\z/).length > 0
|
34
|
-
block = b
|
35
|
-
arg = argument[a.length..-1]
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
return [block, arg]
|
40
|
-
end
|
41
|
-
|
42
|
-
def has_parameter?(argument)
|
43
|
-
b, inPlaceArg = get_block(argument)
|
44
|
-
return false unless b
|
45
|
-
return false if inPlaceArg
|
46
|
-
b.parameters.length >= 1
|
47
|
-
end
|
48
|
-
|
49
|
-
def parse_internal(ignore_invalid, subOptions = nil)
|
50
|
-
pos = 0
|
51
|
-
begin
|
52
|
-
while pos < @argv.length do
|
53
|
-
arg = @argv[pos]
|
54
|
-
if not valid?arg
|
55
|
-
|
56
|
-
# used in bake config, must be passed from bakery to bake
|
57
|
-
if subOptions and subOptions.valid?arg
|
58
|
-
if subOptions.has_parameter?(arg)
|
59
|
-
if pos+1 < @argv.length and @argv[pos+1][0] != "-"
|
60
|
-
pos = pos + 1
|
61
|
-
else
|
62
|
-
raise "Argument for option #{arg} missing"
|
63
|
-
end
|
64
|
-
end
|
65
|
-
end
|
66
|
-
|
67
|
-
index = arg.index('-')
|
68
|
-
if index != nil and index == 0
|
69
|
-
raise "Option #{arg} unknown" if not ignore_invalid
|
70
|
-
else
|
71
|
-
@arguments[""].call(arg) # default parameter without "-"
|
72
|
-
end
|
73
|
-
else
|
74
|
-
option, inPlaceArg = get_block(arg)
|
75
|
-
hasArgument = (pos+1 < @argv.length and @argv[pos+1][0] != "-")
|
76
|
-
if option.parameters.length == 3 && (hasArgument || inPlaceArg)
|
77
|
-
if inPlaceArg
|
78
|
-
option.call(inPlaceArg, nil, nil)
|
79
|
-
else
|
80
|
-
option.call(@argv[pos+1], nil, nil) # do not use inplace value
|
81
|
-
pos = pos + 1
|
82
|
-
end
|
83
|
-
elsif option.parameters.length == 2
|
84
|
-
if hasArgument
|
85
|
-
option.call(@argv[pos+1], nil) # do not use default value
|
86
|
-
pos = pos + 1
|
87
|
-
else
|
88
|
-
option.call(nil, nil) # use default value
|
89
|
-
end
|
90
|
-
elsif option.parameters.length == 1 && hasArgument
|
91
|
-
option.call(@argv[pos+1])
|
92
|
-
pos = pos + 1
|
93
|
-
elsif option.parameters.length == 0
|
94
|
-
option.call()
|
95
|
-
else
|
96
|
-
raise "Argument for option #{arg} missing"
|
97
|
-
end
|
98
|
-
end
|
99
|
-
pos = pos + 1
|
100
|
-
end
|
101
|
-
rescue SystemExit => e
|
102
|
-
raise
|
103
|
-
rescue Exception => e
|
104
|
-
Bake.formatter.printError("Error: " + e.message)
|
105
|
-
ExitHelper.exit(1)
|
106
|
-
end
|
107
|
-
|
108
|
-
end
|
109
|
-
|
110
|
-
end
|
111
|
-
|
1
|
+
require 'bake/toolchain/colorizing_formatter'
|
2
|
+
require 'common/exit_helper'
|
3
|
+
|
4
|
+
module Bake
|
5
|
+
|
6
|
+
class Parser
|
7
|
+
|
8
|
+
def initialize(argv)
|
9
|
+
@arguments = {}
|
10
|
+
@argv = argv
|
11
|
+
end
|
12
|
+
|
13
|
+
#def add_option(opt)
|
14
|
+
# @arguments[opt.param] = opt
|
15
|
+
#end
|
16
|
+
|
17
|
+
def add_option(params, block)
|
18
|
+
params.each { |p| @arguments[p] = block }
|
19
|
+
end
|
20
|
+
|
21
|
+
def valid?(argument)
|
22
|
+
@arguments.any? { |a, b|
|
23
|
+
argument == a || (a != "" && argument.start_with?(a) && (!b || (b.parameters.length==3 && argument[a.length..-1].scan(/\A\d*\z/).length > 0)))
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
def get_block(argument)
|
28
|
+
arg = nil
|
29
|
+
block = nil
|
30
|
+
@arguments.each do |a, b|
|
31
|
+
if argument.start_with?(a) && a != ""
|
32
|
+
return [b, nil] if a == argument
|
33
|
+
if b && b.parameters.length==3 && argument[a.length..-1].scan(/\A\d*\z/).length > 0
|
34
|
+
block = b
|
35
|
+
arg = argument[a.length..-1]
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
return [block, arg]
|
40
|
+
end
|
41
|
+
|
42
|
+
def has_parameter?(argument)
|
43
|
+
b, inPlaceArg = get_block(argument)
|
44
|
+
return false unless b
|
45
|
+
return false if inPlaceArg
|
46
|
+
b.parameters.length >= 1
|
47
|
+
end
|
48
|
+
|
49
|
+
def parse_internal(ignore_invalid, subOptions = nil)
|
50
|
+
pos = 0
|
51
|
+
begin
|
52
|
+
while pos < @argv.length do
|
53
|
+
arg = @argv[pos]
|
54
|
+
if not valid?arg
|
55
|
+
|
56
|
+
# used in bake config, must be passed from bakery to bake
|
57
|
+
if subOptions and subOptions.valid?arg
|
58
|
+
if subOptions.has_parameter?(arg)
|
59
|
+
if pos+1 < @argv.length and @argv[pos+1][0] != "-"
|
60
|
+
pos = pos + 1
|
61
|
+
else
|
62
|
+
raise "Argument for option #{arg} missing"
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
index = arg.index('-')
|
68
|
+
if index != nil and index == 0
|
69
|
+
raise "Option #{arg} unknown" if not ignore_invalid
|
70
|
+
else
|
71
|
+
@arguments[""].call(arg) # default parameter without "-"
|
72
|
+
end
|
73
|
+
else
|
74
|
+
option, inPlaceArg = get_block(arg)
|
75
|
+
hasArgument = (pos+1 < @argv.length and @argv[pos+1][0] != "-")
|
76
|
+
if option.parameters.length == 3 && (hasArgument || inPlaceArg)
|
77
|
+
if inPlaceArg
|
78
|
+
option.call(inPlaceArg, nil, nil)
|
79
|
+
else
|
80
|
+
option.call(@argv[pos+1], nil, nil) # do not use inplace value
|
81
|
+
pos = pos + 1
|
82
|
+
end
|
83
|
+
elsif option.parameters.length == 2
|
84
|
+
if hasArgument
|
85
|
+
option.call(@argv[pos+1], nil) # do not use default value
|
86
|
+
pos = pos + 1
|
87
|
+
else
|
88
|
+
option.call(nil, nil) # use default value
|
89
|
+
end
|
90
|
+
elsif option.parameters.length == 1 && hasArgument
|
91
|
+
option.call(@argv[pos+1])
|
92
|
+
pos = pos + 1
|
93
|
+
elsif option.parameters.length == 0
|
94
|
+
option.call()
|
95
|
+
else
|
96
|
+
raise "Argument for option #{arg} missing"
|
97
|
+
end
|
98
|
+
end
|
99
|
+
pos = pos + 1
|
100
|
+
end
|
101
|
+
rescue SystemExit => e
|
102
|
+
raise
|
103
|
+
rescue Exception => e
|
104
|
+
Bake.formatter.printError("Error: " + e.message)
|
105
|
+
ExitHelper.exit(1)
|
106
|
+
end
|
107
|
+
|
108
|
+
end
|
109
|
+
|
110
|
+
end
|
111
|
+
|
112
112
|
end
|
data/lib/common/version.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.42.
|
4
|
+
version: 2.42.3
|
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: 2018-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rtext
|