bake-toolkit 2.70.1 → 2.72.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/lib/adapt/config/loader.rb +1 -1
- data/lib/bake/cache.rb +2 -2
- data/lib/bake/libElement.rb +2 -2
- data/lib/bake/model/loader.rb +1 -1
- data/lib/bake/options/create.rb +1 -1
- data/lib/bake/options/options.rb +7 -4
- data/lib/bake/options/usage.rb +4 -1
- data/lib/bakeqac/options/options.rb +4 -4
- data/lib/bakery/model/loader.rb +56 -56
- data/lib/bakery/options/options.rb +106 -106
- data/lib/blocks/block.rb +3 -3
- data/lib/blocks/blockBase.rb +3 -3
- data/lib/blocks/compile.rb +4 -4
- data/lib/blocks/executable.rb +5 -5
- data/lib/blocks/library.rb +4 -4
- data/lib/blocks/makefile.rb +1 -1
- data/lib/blocks/showIncludes.rb +4 -4
- data/lib/common/options/finder.rb +1 -1
- data/lib/common/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bcfee442bc92aa4c2c56199a5828ead8044dceadd34a4d7be67addc58f91bc44
|
4
|
+
data.tar.gz: 56887689de79a09756c04214ab696688c52c827310e392563abb51490c583f6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b081a75cc9d44b832df446fcf6ee548babdacac87a3c96300f5ac7ee290e3b5fcb0111eb51ad884ce78b67b9e807236cb2b8fd52ebdaf761982d8532137efef
|
7
|
+
data.tar.gz: 68cc7ca438a0633a09cf0b95df002695fffa6bb7f860dfa5c9ed76e2289d707bcb985b7fdb6ac5af2f671ff83fa3e3dd87920b234113e56a2edf09b9ec3c1616
|
data/lib/adapt/config/loader.rb
CHANGED
@@ -70,7 +70,7 @@ module Bake
|
|
70
70
|
end
|
71
71
|
Bake.options.adapt.each do |a|
|
72
72
|
adaptBaseName = File.expand_path(a.gsub(/\(.*\)/,"") + "/Adapt.meta")
|
73
|
-
potentialAdapts << adaptBaseName if File.
|
73
|
+
potentialAdapts << adaptBaseName if File.exist?adaptBaseName
|
74
74
|
end
|
75
75
|
potentialAdapts.concat(Root.search_to_depth(r, "Adapt.meta", root.depth))
|
76
76
|
end
|
data/lib/bake/cache.rb
CHANGED
@@ -64,7 +64,7 @@ module Bake
|
|
64
64
|
puts "Cache: Checking if referenced configs are up to date..." if Bake.options.debug
|
65
65
|
cache.referencedConfigs.each do |pname,configs|
|
66
66
|
configs.each do |config|
|
67
|
-
fileExists = File.
|
67
|
+
fileExists = File.exist?(config.file_name)
|
68
68
|
puts "Cache: Checking if #{config.file_name} exists: #{fileExists}" if Bake.options.debug
|
69
69
|
if not fileExists
|
70
70
|
Bake.options.nocache = true
|
@@ -97,7 +97,7 @@ module Bake
|
|
97
97
|
if (cache != nil)
|
98
98
|
cache.adapt_filenames.each do |fHash|
|
99
99
|
f = fHash[:file]
|
100
|
-
fileExists = File.
|
100
|
+
fileExists = File.exist?(f)
|
101
101
|
puts "Cache: Checking if #{f} exists: #{fileExists}" if Bake.options.debug
|
102
102
|
if !fileExists
|
103
103
|
Bake.formatter.printInfo("Info: #{f} does not exist anymore, reloading meta information")
|
data/lib/bake/libElement.rb
CHANGED
@@ -56,7 +56,7 @@ module Bake
|
|
56
56
|
cb = block.library.compileBlock
|
57
57
|
if (block.prebuild and File.exist?adaptedPath) or
|
58
58
|
(!cb.nil? and !(cb.calcSources(true, true) - cb.source_files_ignored_in_lib).empty?)
|
59
|
-
if Bake.options.
|
59
|
+
if Bake.options.abs_path_in
|
60
60
|
adaptedPath = File.expand_path(adaptedPath, @projectDir)
|
61
61
|
end
|
62
62
|
@@linker_libs_array << adaptedPath
|
@@ -70,7 +70,7 @@ module Bake
|
|
70
70
|
cb.object_files_ignored_in_lib.each do |ldirect|
|
71
71
|
adaptedPath, prefix = adaptPath(ldirect, block, prefix)
|
72
72
|
if (!block.prebuild or File.exist?adaptedPath)
|
73
|
-
if Bake.options.
|
73
|
+
if Bake.options.abs_path_in
|
74
74
|
adaptedPath = File.expand_path(adaptedPath, @projectDir)
|
75
75
|
end
|
76
76
|
@@linker_libs_array << adaptedPath
|
data/lib/bake/model/loader.rb
CHANGED
data/lib/bake/options/create.rb
CHANGED
data/lib/bake/options/options.rb
CHANGED
@@ -22,7 +22,7 @@ module Bake
|
|
22
22
|
attr_reader :vars, :include_filter_args # map
|
23
23
|
attr_reader :verbose
|
24
24
|
attr_reader :filelist # set
|
25
|
-
attr_reader :
|
25
|
+
attr_reader :abs_path_in, :abs_path_out
|
26
26
|
attr_reader :roots # Root array
|
27
27
|
attr_reader :diabCaseCheck
|
28
28
|
attr_reader :defines
|
@@ -50,7 +50,8 @@ module Bake
|
|
50
50
|
@analyze = false
|
51
51
|
@eclipseOrder = false
|
52
52
|
@showConfigs = false
|
53
|
-
@
|
53
|
+
@abs_path_in = false
|
54
|
+
@abs_path_out = false
|
54
55
|
@prepro = false
|
55
56
|
@stopOnFirstError = false
|
56
57
|
@verbose = 1
|
@@ -141,7 +142,9 @@ module Bake
|
|
141
142
|
add_option(["--dot-project-level", ], lambda { @dot = true; @dotShowProjOnly = true })
|
142
143
|
add_option(["--do", "--include_filter" ], lambda { |x| set_filter(x) })
|
143
144
|
add_option(["--omit", "--exclude_filter" ], lambda { |x| @exclude_filter << x })
|
144
|
-
add_option(["--abs-paths", "--show_abs_paths" ], lambda { @
|
145
|
+
add_option(["--abs-paths", "--show_abs_paths" ], lambda { @abs_path_in = @abs_path_out = true })
|
146
|
+
add_option(["--abs-paths-in", "--show_abs_paths" ], lambda { @abs_path_in = true })
|
147
|
+
add_option(["--abs-paths-out", "--show_abs_paths" ], lambda { @abs_path_out = true })
|
145
148
|
add_option(["--prebuild" ], lambda { @prebuild = true })
|
146
149
|
add_option(["--Wparse" ], lambda { @wparse = true })
|
147
150
|
|
@@ -293,7 +296,7 @@ module Bake
|
|
293
296
|
end
|
294
297
|
|
295
298
|
def check_valid_dir(dir)
|
296
|
-
if not File.
|
299
|
+
if not File.exist?(dir)
|
297
300
|
Bake.formatter.printError("Error: Directory #{dir} does not exist")
|
298
301
|
ExitHelper.exit(1)
|
299
302
|
end
|
data/lib/bake/options/usage.rb
CHANGED
@@ -48,7 +48,10 @@ module Bake
|
|
48
48
|
puts " 'PRE', 'POST', 'STARTUP', 'EXIT' or 'CLEAN' includes all according steps."
|
49
49
|
puts " --omit <name> Excludes elements with this filter name (can be used multiple times)."
|
50
50
|
puts " 'PRE', 'POST', 'STARTUP', 'EXIT' or 'CLEAN' excludes all according steps."
|
51
|
-
puts " --abs-paths
|
51
|
+
puts " --abs-paths Relative filename paths are converted to absolute paths for compiler commands and output."
|
52
|
+
puts " --abs-paths-in Relative filename paths are converted to absolute paths for compiler commands."
|
53
|
+
puts " Depending on the compiler this might have also effects on the raw output of the compiler."
|
54
|
+
puts " --abs-paths-out Relative filename paths are converted to absolute paths for compiler output."
|
52
55
|
puts " --Wparse The error parser result is also taken into account, not only the return value of compiler, archiver and linker."
|
53
56
|
puts " --no-autodir Disable auto completion of paths like in IncludeDir"
|
54
57
|
puts " --set <key>=<value> Sets a variable. Overwrites variables defined in Project.metas (can be used multiple times)."
|
@@ -103,7 +103,7 @@ module Bake
|
|
103
103
|
end
|
104
104
|
|
105
105
|
def check_valid_dir(dir)
|
106
|
-
if not File.
|
106
|
+
if not File.exist?(dir)
|
107
107
|
Bake.formatter.printError("Error: Directory #{dir} does not exist")
|
108
108
|
ExitHelper.exit(1)
|
109
109
|
end
|
@@ -251,16 +251,16 @@ module Bake
|
|
251
251
|
end
|
252
252
|
|
253
253
|
@cct.each do |cct|
|
254
|
-
if !File.
|
254
|
+
if !File.exist?(cct)
|
255
255
|
Bake.formatter.printError("Error: cct file not found: #{cct}")
|
256
256
|
ExitHelper.exit(1)
|
257
257
|
end
|
258
258
|
end
|
259
|
-
if !File.
|
259
|
+
if !File.exist?(@acf)
|
260
260
|
Bake.formatter.printError("Error: acf file not found: #{@acf}")
|
261
261
|
ExitHelper.exit(1)
|
262
262
|
end
|
263
|
-
if !File.
|
263
|
+
if !File.exist?(@rcf)
|
264
264
|
Bake.formatter.printError("Error: rcf file not found: #{@rcf}")
|
265
265
|
ExitHelper.exit(1)
|
266
266
|
end
|
data/lib/bakery/model/loader.rb
CHANGED
@@ -1,57 +1,57 @@
|
|
1
|
-
require_relative 'metamodel'
|
2
|
-
require_relative 'language'
|
3
|
-
require_relative '../../common/version'
|
4
|
-
|
5
|
-
require 'rgen/environment'
|
6
|
-
require 'rgen/fragment/fragmented_model'
|
7
|
-
|
8
|
-
require 'rtext/default_loader'
|
9
|
-
|
10
|
-
require_relative '../../common/ext/rgen'
|
11
|
-
require_relative '../../common/exit_helper'
|
12
|
-
require_relative '../../bake/toolchain/colorizing_formatter'
|
13
|
-
|
14
|
-
module Bake
|
15
|
-
|
16
|
-
class BakeryLoader
|
17
|
-
|
18
|
-
attr_reader :model
|
19
|
-
|
20
|
-
def initialize
|
21
|
-
@env = RGen::Environment.new
|
22
|
-
@model = RGen::Fragment::FragmentedModel.new(:env => @env)
|
23
|
-
end
|
24
|
-
|
25
|
-
def load(filename)
|
26
|
-
|
27
|
-
sumErrors = 0
|
28
|
-
|
29
|
-
if not File.
|
30
|
-
Bake.formatter.printError("Error: #{filename} does not exist")
|
31
|
-
ExitHelper.exit(1)
|
32
|
-
end
|
33
|
-
|
34
|
-
loader = RText::DefaultLoader.new(
|
35
|
-
Bake::BakeryLanguage,
|
36
|
-
@model,
|
37
|
-
:file_provider => proc { [filename] },
|
38
|
-
:cache => @DumpFileCache)
|
39
|
-
loader.load()
|
40
|
-
|
41
|
-
f = @model.fragments[0]
|
42
|
-
|
43
|
-
f.data[:problems].each do |p|
|
44
|
-
Bake.formatter.printError(p.message, p.file, p.line)
|
45
|
-
end
|
46
|
-
|
47
|
-
if f.data[:problems].length > 0
|
48
|
-
ExitHelper.exit(1)
|
49
|
-
end
|
50
|
-
|
51
|
-
return @env
|
52
|
-
|
53
|
-
end
|
54
|
-
|
55
|
-
|
56
|
-
end
|
1
|
+
require_relative 'metamodel'
|
2
|
+
require_relative 'language'
|
3
|
+
require_relative '../../common/version'
|
4
|
+
|
5
|
+
require 'rgen/environment'
|
6
|
+
require 'rgen/fragment/fragmented_model'
|
7
|
+
|
8
|
+
require 'rtext/default_loader'
|
9
|
+
|
10
|
+
require_relative '../../common/ext/rgen'
|
11
|
+
require_relative '../../common/exit_helper'
|
12
|
+
require_relative '../../bake/toolchain/colorizing_formatter'
|
13
|
+
|
14
|
+
module Bake
|
15
|
+
|
16
|
+
class BakeryLoader
|
17
|
+
|
18
|
+
attr_reader :model
|
19
|
+
|
20
|
+
def initialize
|
21
|
+
@env = RGen::Environment.new
|
22
|
+
@model = RGen::Fragment::FragmentedModel.new(:env => @env)
|
23
|
+
end
|
24
|
+
|
25
|
+
def load(filename)
|
26
|
+
|
27
|
+
sumErrors = 0
|
28
|
+
|
29
|
+
if not File.exist?filename
|
30
|
+
Bake.formatter.printError("Error: #{filename} does not exist")
|
31
|
+
ExitHelper.exit(1)
|
32
|
+
end
|
33
|
+
|
34
|
+
loader = RText::DefaultLoader.new(
|
35
|
+
Bake::BakeryLanguage,
|
36
|
+
@model,
|
37
|
+
:file_provider => proc { [filename] },
|
38
|
+
:cache => @DumpFileCache)
|
39
|
+
loader.load()
|
40
|
+
|
41
|
+
f = @model.fragments[0]
|
42
|
+
|
43
|
+
f.data[:problems].each do |p|
|
44
|
+
Bake.formatter.printError(p.message, p.file, p.line)
|
45
|
+
end
|
46
|
+
|
47
|
+
if f.data[:problems].length > 0
|
48
|
+
ExitHelper.exit(1)
|
49
|
+
end
|
50
|
+
|
51
|
+
return @env
|
52
|
+
|
53
|
+
end
|
54
|
+
|
55
|
+
|
56
|
+
end
|
57
57
|
end
|
@@ -1,106 +1,106 @@
|
|
1
|
-
require_relative '../../bake/toolchain/colorizing_formatter'
|
2
|
-
require_relative '../../common/options/parser'
|
3
|
-
require_relative '../../common/options/finder'
|
4
|
-
require_relative '../../common/root'
|
5
|
-
|
6
|
-
module Bake
|
7
|
-
|
8
|
-
class BakeryOptions < Parser
|
9
|
-
attr_reader :collection_name, :collection_dir # String
|
10
|
-
attr_reader :roots # Root list
|
11
|
-
attr_reader :color, :error # Boolean
|
12
|
-
attr_reader :socket # Fixnum
|
13
|
-
|
14
|
-
def initialize(argv)
|
15
|
-
super(argv)
|
16
|
-
|
17
|
-
@collection_name = ""
|
18
|
-
@collection_dir = nil
|
19
|
-
@color = nil
|
20
|
-
@error = false
|
21
|
-
@roots = []
|
22
|
-
@socket = 0
|
23
|
-
|
24
|
-
add_option(["-b", "" ], lambda { |x| set_collection_name(x) })
|
25
|
-
add_option(["-m" ], lambda { |x| @collection_dir = x })
|
26
|
-
add_option(["-r" ], lambda { @error = true })
|
27
|
-
add_option(["-a" ], lambda { |x| Bake.formatter.setColorScheme(x.to_sym) })
|
28
|
-
add_option(["-w" ], lambda { |x| set_root(x) })
|
29
|
-
add_option(["--socket" ], lambda { |x| @socket = String === x ? x.to_i : x })
|
30
|
-
add_option(["-h", "--help"], lambda { usage; ExitHelper.exit(0) })
|
31
|
-
end
|
32
|
-
|
33
|
-
def usage
|
34
|
-
puts "\nUsage: bake <name> [options]"
|
35
|
-
puts " [-b] <name> Name of the collection to build."
|
36
|
-
puts " -m <dir> Directory containing the collection file (default is current directory)."
|
37
|
-
puts " -r Stop on first error."
|
38
|
-
puts " -a <scheme> Use ansi color sequences (console must support it). Possible values are 'white', 'black' and 'none' (default)."
|
39
|
-
puts " -h, --help Print this help."
|
40
|
-
puts " -w <root>[,<depth>] Add a workspace root (can be used multiple times). Additionally the search depth can be specified (>=0)."
|
41
|
-
puts " If no root is specified, the parent directory of Collection.meta is added automatically."
|
42
|
-
puts " --socket <num> Set socket for sending errors, receiving commands, etc. - used by e.g. Eclipse."
|
43
|
-
puts "Note: all parameters except -b, -m and -h will be passed to bake - see bake help for more options."
|
44
|
-
end
|
45
|
-
|
46
|
-
def parse_options(bakeOptions)
|
47
|
-
parse_internal(true, bakeOptions)
|
48
|
-
|
49
|
-
searchDir = @collection_dir.nil? ? Dir.pwd : @collection_dir
|
50
|
-
dir = Bake.findDirOfFileToRoot(searchDir,"Collection.meta")
|
51
|
-
if dir
|
52
|
-
set_collection_dir(dir)
|
53
|
-
else
|
54
|
-
Bake.formatter.printError("Error: Collection.meta not found in #{searchDir} or upwards")
|
55
|
-
ExitHelper.exit(1)
|
56
|
-
end
|
57
|
-
|
58
|
-
def_roots = Root.calc_roots_bake(@collection_dir)
|
59
|
-
@roots += def_roots
|
60
|
-
|
61
|
-
if @roots.empty?
|
62
|
-
@roots = []
|
63
|
-
@roots = Root.calc_def_roots(@collection_dir)
|
64
|
-
end
|
65
|
-
|
66
|
-
@roots = Root.uniq(@roots)
|
67
|
-
end
|
68
|
-
|
69
|
-
def check_valid_dir(dir)
|
70
|
-
if not File.
|
71
|
-
Bake.formatter.printError("Error: Directory #{dir} does not exist")
|
72
|
-
ExitHelper.exit(1)
|
73
|
-
end
|
74
|
-
if not File.directory?(dir)
|
75
|
-
Bake.formatter.printError("Error: #{dir} is not a directory")
|
76
|
-
ExitHelper.exit(1)
|
77
|
-
end
|
78
|
-
end
|
79
|
-
|
80
|
-
def set_collection_name(collection_name)
|
81
|
-
if not @collection_name.empty?
|
82
|
-
Bake.formatter.printError("Error: Cannot set collection name '#{collection_name}', because collection name is already set to '#{@collection_name}'")
|
83
|
-
ExitHelper.exit(1)
|
84
|
-
end
|
85
|
-
@collection_name = collection_name
|
86
|
-
end
|
87
|
-
|
88
|
-
def set_collection_dir(dir)
|
89
|
-
check_valid_dir(dir)
|
90
|
-
@collection_dir = File.expand_path(dir.gsub(/[\\]/,'/'))
|
91
|
-
end
|
92
|
-
|
93
|
-
def set_root(dir)
|
94
|
-
if File.file?(dir)
|
95
|
-
@roots += Root.calc_roots_bake(dir)
|
96
|
-
else
|
97
|
-
root = Root.extract_depth(dir)
|
98
|
-
check_valid_dir(root.dir)
|
99
|
-
root.dir = File.expand_path(root.dir.gsub(/[\\]/,'/'))
|
100
|
-
@roots << root
|
101
|
-
end
|
102
|
-
end
|
103
|
-
|
104
|
-
end
|
105
|
-
|
106
|
-
end
|
1
|
+
require_relative '../../bake/toolchain/colorizing_formatter'
|
2
|
+
require_relative '../../common/options/parser'
|
3
|
+
require_relative '../../common/options/finder'
|
4
|
+
require_relative '../../common/root'
|
5
|
+
|
6
|
+
module Bake
|
7
|
+
|
8
|
+
class BakeryOptions < Parser
|
9
|
+
attr_reader :collection_name, :collection_dir # String
|
10
|
+
attr_reader :roots # Root list
|
11
|
+
attr_reader :color, :error # Boolean
|
12
|
+
attr_reader :socket # Fixnum
|
13
|
+
|
14
|
+
def initialize(argv)
|
15
|
+
super(argv)
|
16
|
+
|
17
|
+
@collection_name = ""
|
18
|
+
@collection_dir = nil
|
19
|
+
@color = nil
|
20
|
+
@error = false
|
21
|
+
@roots = []
|
22
|
+
@socket = 0
|
23
|
+
|
24
|
+
add_option(["-b", "" ], lambda { |x| set_collection_name(x) })
|
25
|
+
add_option(["-m" ], lambda { |x| @collection_dir = x })
|
26
|
+
add_option(["-r" ], lambda { @error = true })
|
27
|
+
add_option(["-a" ], lambda { |x| Bake.formatter.setColorScheme(x.to_sym) })
|
28
|
+
add_option(["-w" ], lambda { |x| set_root(x) })
|
29
|
+
add_option(["--socket" ], lambda { |x| @socket = String === x ? x.to_i : x })
|
30
|
+
add_option(["-h", "--help"], lambda { usage; ExitHelper.exit(0) })
|
31
|
+
end
|
32
|
+
|
33
|
+
def usage
|
34
|
+
puts "\nUsage: bake <name> [options]"
|
35
|
+
puts " [-b] <name> Name of the collection to build."
|
36
|
+
puts " -m <dir> Directory containing the collection file (default is current directory)."
|
37
|
+
puts " -r Stop on first error."
|
38
|
+
puts " -a <scheme> Use ansi color sequences (console must support it). Possible values are 'white', 'black' and 'none' (default)."
|
39
|
+
puts " -h, --help Print this help."
|
40
|
+
puts " -w <root>[,<depth>] Add a workspace root (can be used multiple times). Additionally the search depth can be specified (>=0)."
|
41
|
+
puts " If no root is specified, the parent directory of Collection.meta is added automatically."
|
42
|
+
puts " --socket <num> Set socket for sending errors, receiving commands, etc. - used by e.g. Eclipse."
|
43
|
+
puts "Note: all parameters except -b, -m and -h will be passed to bake - see bake help for more options."
|
44
|
+
end
|
45
|
+
|
46
|
+
def parse_options(bakeOptions)
|
47
|
+
parse_internal(true, bakeOptions)
|
48
|
+
|
49
|
+
searchDir = @collection_dir.nil? ? Dir.pwd : @collection_dir
|
50
|
+
dir = Bake.findDirOfFileToRoot(searchDir,"Collection.meta")
|
51
|
+
if dir
|
52
|
+
set_collection_dir(dir)
|
53
|
+
else
|
54
|
+
Bake.formatter.printError("Error: Collection.meta not found in #{searchDir} or upwards")
|
55
|
+
ExitHelper.exit(1)
|
56
|
+
end
|
57
|
+
|
58
|
+
def_roots = Root.calc_roots_bake(@collection_dir)
|
59
|
+
@roots += def_roots
|
60
|
+
|
61
|
+
if @roots.empty?
|
62
|
+
@roots = []
|
63
|
+
@roots = Root.calc_def_roots(@collection_dir)
|
64
|
+
end
|
65
|
+
|
66
|
+
@roots = Root.uniq(@roots)
|
67
|
+
end
|
68
|
+
|
69
|
+
def check_valid_dir(dir)
|
70
|
+
if not File.exist?(dir)
|
71
|
+
Bake.formatter.printError("Error: Directory #{dir} does not exist")
|
72
|
+
ExitHelper.exit(1)
|
73
|
+
end
|
74
|
+
if not File.directory?(dir)
|
75
|
+
Bake.formatter.printError("Error: #{dir} is not a directory")
|
76
|
+
ExitHelper.exit(1)
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
def set_collection_name(collection_name)
|
81
|
+
if not @collection_name.empty?
|
82
|
+
Bake.formatter.printError("Error: Cannot set collection name '#{collection_name}', because collection name is already set to '#{@collection_name}'")
|
83
|
+
ExitHelper.exit(1)
|
84
|
+
end
|
85
|
+
@collection_name = collection_name
|
86
|
+
end
|
87
|
+
|
88
|
+
def set_collection_dir(dir)
|
89
|
+
check_valid_dir(dir)
|
90
|
+
@collection_dir = File.expand_path(dir.gsub(/[\\]/,'/'))
|
91
|
+
end
|
92
|
+
|
93
|
+
def set_root(dir)
|
94
|
+
if File.file?(dir)
|
95
|
+
@roots += Root.calc_roots_bake(dir)
|
96
|
+
else
|
97
|
+
root = Root.extract_depth(dir)
|
98
|
+
check_valid_dir(root.dir)
|
99
|
+
root.dir = File.expand_path(root.dir.gsub(/[\\]/,'/'))
|
100
|
+
@roots << root
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
end
|
105
|
+
|
106
|
+
end
|
data/lib/blocks/block.rb
CHANGED
@@ -142,14 +142,14 @@ module Bake
|
|
142
142
|
Bake.formatter.printInfo("\"#{d}\" uses path magic in IncludeDir, please use a Dependency to \"#{inc[0]}\" instead", elem) if warnIfLocal
|
143
143
|
end
|
144
144
|
|
145
|
-
if File.
|
145
|
+
if File.exist?(@projectDir + "/" + d) # prio 2: local, e.g. "include"
|
146
146
|
res << d
|
147
147
|
end
|
148
148
|
|
149
149
|
# prio 3: check if dir exists without Project.meta entry
|
150
150
|
Bake.options.roots.each do |r|
|
151
151
|
absIncDir = r.dir+"/"+d
|
152
|
-
if File.
|
152
|
+
if File.exist?(absIncDir)
|
153
153
|
res << File.rel_from_to_project(@projectDir,absIncDir,false)
|
154
154
|
Bake.formatter.printInfo("\"#{d}\" uses path magic in IncludeDir, please create a Project.meta in \"#{absIncDir}\" or upwards and use a Dependency instead", elem) if warnIfLocal && res.length == 1
|
155
155
|
end
|
@@ -601,7 +601,7 @@ module Bake
|
|
601
601
|
if @tcs[:OUTPUT_DIR_POSTFIX] != nil
|
602
602
|
@output_dir = @output_dir + @tcs[:OUTPUT_DIR_POSTFIX]
|
603
603
|
end
|
604
|
-
if Bake.options.
|
604
|
+
if Bake.options.abs_path_in
|
605
605
|
@output_dir = File.expand_path(@output_dir, @projectDir)
|
606
606
|
end
|
607
607
|
end
|
data/lib/blocks/blockBase.rb
CHANGED
@@ -15,7 +15,7 @@ module Bake
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def check_config_file()
|
18
|
-
if File.
|
18
|
+
if File.exist?(@config.file_name) and File.mtime(@config.file_name) > @config_date
|
19
19
|
begin
|
20
20
|
FileUtils.touch(@config.file_name) if !Bake.options.dry
|
21
21
|
rescue Exception=>e
|
@@ -30,7 +30,7 @@ module Bake
|
|
30
30
|
return if Bake.options.dry
|
31
31
|
filename = File.expand_path(filename, @projectDir)
|
32
32
|
begin
|
33
|
-
if File.
|
33
|
+
if File.exist?(filename)
|
34
34
|
FileUtils.rm(filename)
|
35
35
|
else
|
36
36
|
FileUtils::mkdir_p(File.dirname(filename))
|
@@ -136,7 +136,7 @@ module Bake
|
|
136
136
|
end
|
137
137
|
|
138
138
|
console_output = x[0]
|
139
|
-
console_output = console_output_full if Bake.options.
|
139
|
+
console_output = console_output_full if Bake.options.abs_path_out
|
140
140
|
|
141
141
|
ret = error_descs.any? { |e| e.severity == ErrorParser::SEVERITY_ERROR }
|
142
142
|
|
data/lib/blocks/compile.rb
CHANGED
@@ -254,7 +254,7 @@ module Bake
|
|
254
254
|
if Bake.options.cc2j_filename
|
255
255
|
cmdJson = cmd.is_a?(Array) ? cmd.join(' ') : cmd
|
256
256
|
srcFilePath = source
|
257
|
-
if Bake.options.
|
257
|
+
if Bake.options.abs_path_in
|
258
258
|
srcFilePath = File.join(@projectDir, srcFilePath) if !File.is_absolute?(srcFilePath)
|
259
259
|
cmdJson[source] = srcFilePath
|
260
260
|
end
|
@@ -529,7 +529,7 @@ module Bake
|
|
529
529
|
if not type.nil?
|
530
530
|
object = get_object_file(source)
|
531
531
|
|
532
|
-
if Bake.options.
|
532
|
+
if Bake.options.abs_path_in
|
533
533
|
object = File.expand_path(object, @projectDir)
|
534
534
|
source = File.expand_path(source, @projectDir)
|
535
535
|
end
|
@@ -586,7 +586,7 @@ module Bake
|
|
586
586
|
end
|
587
587
|
res.each do |f|
|
588
588
|
singleFile = res.length == 1 && res[0] == pr
|
589
|
-
fTcs = (Bake.options.
|
589
|
+
fTcs = (Bake.options.abs_path_in ? File.expand_path(f, @projectDir) : f)
|
590
590
|
if ((!@fileTcs.has_key?(fTcs)) || singleFile)
|
591
591
|
@fileTcs[fTcs] = icf
|
592
592
|
end
|
@@ -642,7 +642,7 @@ module Bake
|
|
642
642
|
block.bes.each do |be|
|
643
643
|
if Metamodel::IncludeDir === be
|
644
644
|
if be.inherit == true || block == @block
|
645
|
-
if Bake.options.
|
645
|
+
if Bake.options.abs_path_in
|
646
646
|
mappedInc = be.name
|
647
647
|
else
|
648
648
|
mappedInc = File.rel_from_to_project(@projectDir,be.name,false)
|
data/lib/blocks/executable.rb
CHANGED
@@ -43,7 +43,7 @@ module Bake
|
|
43
43
|
baseFilename += ".#{@config.artifactExtension.name}"
|
44
44
|
end
|
45
45
|
@exe_name ||= File.join([@block.output_dir, baseFilename])
|
46
|
-
if Bake.options.
|
46
|
+
if Bake.options.abs_path_in
|
47
47
|
@exe_name = File.expand_path(@exe_name, @projectDir)
|
48
48
|
end
|
49
49
|
return @exe_name
|
@@ -77,25 +77,25 @@ module Bake
|
|
77
77
|
return "because linkOnly was specified" if Bake.options.linkOnly
|
78
78
|
|
79
79
|
# exe
|
80
|
-
return "because executable does not exist" if not File.
|
80
|
+
return "because executable does not exist" if not File.exist?(@exe_name)
|
81
81
|
|
82
82
|
eTime = File.mtime(@exe_name)
|
83
83
|
|
84
84
|
# linkerscript
|
85
85
|
if @linker_script
|
86
|
-
return "because linker script does not exist - will most probably result in an error" if not File.
|
86
|
+
return "because linker script does not exist - will most probably result in an error" if not File.exist?(@linker_script)
|
87
87
|
return "because linker script is newer than executable" if eTime < File.mtime(@linker_script)
|
88
88
|
end
|
89
89
|
|
90
90
|
# sources
|
91
91
|
@compileBlock.objects.each do |obj|
|
92
|
-
return "because object #{obj} does not exist" if not File.
|
92
|
+
return "because object #{obj} does not exist" if not File.exist?(obj)
|
93
93
|
return "because object #{obj} is newer than executable" if eTime < File.mtime(obj)
|
94
94
|
end if @compileBlock
|
95
95
|
|
96
96
|
# libs
|
97
97
|
libs.each do |lib|
|
98
|
-
return "because library #{lib} does not exist" if not File.
|
98
|
+
return "because library #{lib} does not exist" if not File.exist?(lib)
|
99
99
|
return "because library #{lib} is newer than executable" if eTime < File.mtime(lib)
|
100
100
|
end
|
101
101
|
false
|
data/lib/blocks/library.rb
CHANGED
@@ -34,7 +34,7 @@ module Bake
|
|
34
34
|
baseFilename += ".#{@config.artifactExtension.name}"
|
35
35
|
end
|
36
36
|
@archive_name ||= File.join([@block.output_dir, baseFilename])
|
37
|
-
if Bake.options.
|
37
|
+
if Bake.options.abs_path_in
|
38
38
|
@archive_name = File.expand_path(@archive_name, @projectDir)
|
39
39
|
end
|
40
40
|
return @archive_name
|
@@ -52,13 +52,13 @@ module Bake
|
|
52
52
|
Dir.mutex.synchronize do
|
53
53
|
Dir.chdir(@projectDir) do
|
54
54
|
# lib
|
55
|
-
return "because library does not exist" if not File.
|
55
|
+
return "because library does not exist" if not File.exist?(@archive_name)
|
56
56
|
|
57
57
|
aTime = File.mtime(@archive_name)
|
58
58
|
|
59
59
|
# sources
|
60
60
|
@objects.each do |obj|
|
61
|
-
return "because object #{obj} does not exist" if not File.
|
61
|
+
return "because object #{obj} does not exist" if not File.exist?(obj)
|
62
62
|
return "because object #{obj} is newer than executable" if aTime < File.mtime(obj)
|
63
63
|
end
|
64
64
|
end
|
@@ -87,7 +87,7 @@ module Bake
|
|
87
87
|
@objects.concat(Dir.glob_dir("#{@block.output_dir}/**/*#{e}", @projectDir))
|
88
88
|
end
|
89
89
|
if @objects.empty?
|
90
|
-
if !File.
|
90
|
+
if !File.exist?(File.expand_path(@archive_name, @projectDir))
|
91
91
|
SyncOut.mutex.synchronize do
|
92
92
|
puts "No object files, library won't be created" if Bake.options.verbose >= 2
|
93
93
|
end
|
data/lib/blocks/makefile.rb
CHANGED
data/lib/blocks/showIncludes.rb
CHANGED
@@ -22,7 +22,7 @@ module Bake
|
|
22
22
|
print projName
|
23
23
|
incs = []
|
24
24
|
blocks.each do |block|
|
25
|
-
if Bake.options.
|
25
|
+
if Bake.options.abs_path_in
|
26
26
|
incs += block.include_list.map { |i| File.expand_path(i, block.projectDir) }
|
27
27
|
else
|
28
28
|
incs += block.include_list
|
@@ -49,7 +49,7 @@ module Bake
|
|
49
49
|
|
50
50
|
iname = mainBlock.convPath(iinc)
|
51
51
|
if iname != ""
|
52
|
-
if not File.
|
52
|
+
if not File.exist?(iname)
|
53
53
|
Bake.formatter.printError("InternalIncludes file #{iname} does not exist", iinc)
|
54
54
|
ExitHelper.exit(1)
|
55
55
|
end
|
@@ -74,7 +74,7 @@ module Bake
|
|
74
74
|
if (c.internalDefines)
|
75
75
|
dname = mainBlock.convPath(c.internalDefines)
|
76
76
|
if dname != ""
|
77
|
-
if not File.
|
77
|
+
if not File.exist?(dname)
|
78
78
|
Bake.formatter.printError("InternalDefines file #{dname} does not exist", c.internalDefines)
|
79
79
|
ExitHelper.exit(1)
|
80
80
|
end
|
@@ -103,7 +103,7 @@ module Bake
|
|
103
103
|
block.calcIncludes
|
104
104
|
block.calcDefines
|
105
105
|
block.calcFlags
|
106
|
-
if Bake.options.
|
106
|
+
if Bake.options.abs_path_in
|
107
107
|
blockIncs += block.include_list.map { |i| File.expand_path(i, block.projectDir) }
|
108
108
|
else
|
109
109
|
blockIncs += block.include_list
|
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.
|
4
|
+
version: 2.72.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: 2023-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rtext
|
@@ -286,7 +286,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
286
286
|
- !ruby/object:Gem::Version
|
287
287
|
version: '0'
|
288
288
|
requirements: []
|
289
|
-
rubygems_version: 3.2
|
289
|
+
rubygems_version: 3.4.2
|
290
290
|
signing_key:
|
291
291
|
specification_version: 4
|
292
292
|
summary: Build tool to compile C/C++ projects fast and easy.
|