bake-toolkit 2.46.0 → 2.47.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/bake +46 -46
- data/bin/bake-doc +1 -1
- data/bin/bake-format +1 -1
- data/bin/bakeclean +1 -1
- data/bin/bakeqac +9 -9
- data/bin/bakery +11 -11
- data/lib/adapt/config/loader.rb +2 -2
- data/lib/bake/cache.rb +5 -5
- data/lib/bake/config/loader.rb +3 -3
- data/lib/bake/mergeConfig.rb +1 -1
- data/lib/bake/model/language.rb +1 -4
- data/lib/bake/model/loader.rb +6 -6
- data/lib/bake/model/metamodel.rb +21 -0
- data/lib/bake/model/metamodel_ext.rb +2 -2
- data/lib/bake/options/create.rb +1 -1
- data/lib/bake/options/options.rb +24 -16
- data/lib/bake/options/showDoc.rb +1 -1
- data/lib/bake/options/usage.rb +3 -1
- data/lib/bake/subst.rb +14 -13
- data/lib/bake/toolchain/clang.rb +5 -5
- data/lib/bake/toolchain/clang_analyze.rb +2 -2
- data/lib/bake/toolchain/diab.rb +4 -4
- data/lib/bake/toolchain/errorparser/diab_compiler_error_parser.rb +1 -1
- data/lib/bake/toolchain/errorparser/diab_linker_error_parser.rb +1 -1
- data/lib/bake/toolchain/errorparser/gcc_compiler_error_parser.rb +1 -1
- data/lib/bake/toolchain/errorparser/gcc_linker_error_parser.rb +1 -1
- data/lib/bake/toolchain/errorparser/greenhills_compiler_error_parser.rb +1 -1
- data/lib/bake/toolchain/errorparser/greenhills_linker_error_parser.rb +1 -1
- data/lib/bake/toolchain/errorparser/keil_compiler_error_parser.rb +1 -1
- data/lib/bake/toolchain/errorparser/keil_linker_error_parser.rb +1 -1
- data/lib/bake/toolchain/errorparser/msvc_compiler_error_parser.rb +1 -1
- data/lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb +1 -1
- data/lib/bake/toolchain/errorparser/tasking_compiler_error_parser.rb +1 -1
- data/lib/bake/toolchain/errorparser/tasking_linker_error_parser.rb +1 -1
- data/lib/bake/toolchain/errorparser/ti_compiler_error_parser.rb +1 -1
- data/lib/bake/toolchain/errorparser/ti_linker_error_parser.rb +1 -1
- data/lib/bake/toolchain/gcc.rb +9 -5
- data/lib/bake/toolchain/gcc_env.rb +5 -5
- data/lib/bake/toolchain/greenhills.rb +4 -4
- data/lib/bake/toolchain/keil.rb +5 -5
- data/lib/bake/toolchain/msvc.rb +5 -5
- data/lib/bake/toolchain/provider.rb +10 -10
- data/lib/bake/toolchain/tasking.rb +4 -4
- data/lib/bake/toolchain/ti.rb +5 -5
- data/lib/bake/util.rb +5 -6
- data/lib/bakeclean/options/options.rb +2 -2
- data/lib/bakeqac/options/options.rb +4 -4
- data/lib/bakery/model/language.rb +1 -1
- data/lib/bakery/model/loader.rb +5 -5
- data/lib/bakery/options/options.rb +4 -4
- data/lib/bakery/toBake.rb +1 -1
- data/lib/blocks/block.rb +4 -4
- data/lib/blocks/blockBase.rb +0 -11
- data/lib/blocks/commandLine.rb +2 -2
- data/lib/blocks/compile.rb +69 -29
- data/lib/blocks/convert.rb +1 -1
- data/lib/blocks/docu.rb +1 -1
- data/lib/blocks/executable.rb +1 -1
- data/lib/blocks/fileutil.rb +62 -0
- data/lib/blocks/library.rb +1 -1
- data/lib/blocks/makefile.rb +1 -1
- data/lib/blocks/showIncludes.rb +4 -4
- data/lib/blocks/sleep.rb +41 -0
- data/lib/common/cleanup.rb +1 -1
- data/lib/common/crc32.rb +1 -1
- data/lib/common/ext/file.rb +1 -1
- data/lib/common/ext/stdout.rb +1 -1
- data/lib/common/ide_interface.rb +2 -2
- data/lib/common/options/parser.rb +2 -2
- data/lib/common/version.rb +1 -1
- data/lib/multithread/job.rb +1 -1
- data/lib/tocxx.rb +124 -102
- metadata +5 -6
- data/bin/createVSProjects +0 -214
- data/lib/vs/options.rb +0 -69
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.47.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: 2018-
|
11
|
+
date: 2018-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rtext
|
@@ -141,7 +141,6 @@ email: alexander.schaal@esrlabs.com
|
|
141
141
|
executables:
|
142
142
|
- bake
|
143
143
|
- bakery
|
144
|
-
- createVSProjects
|
145
144
|
- bake-doc
|
146
145
|
- bakeqac
|
147
146
|
- bakeclean
|
@@ -156,7 +155,6 @@ files:
|
|
156
155
|
- bin/bakeclean
|
157
156
|
- bin/bakeqac
|
158
157
|
- bin/bakery
|
159
|
-
- bin/createVSProjects
|
160
158
|
- lib/adapt/config/loader.rb
|
161
159
|
- lib/bake/cache.rb
|
162
160
|
- lib/bake/config/checks.rb
|
@@ -219,10 +217,12 @@ files:
|
|
219
217
|
- lib/blocks/convert.rb
|
220
218
|
- lib/blocks/docu.rb
|
221
219
|
- lib/blocks/executable.rb
|
220
|
+
- lib/blocks/fileutil.rb
|
222
221
|
- lib/blocks/has_execute_command.rb
|
223
222
|
- lib/blocks/library.rb
|
224
223
|
- lib/blocks/makefile.rb
|
225
224
|
- lib/blocks/showIncludes.rb
|
225
|
+
- lib/blocks/sleep.rb
|
226
226
|
- lib/common/abortException.rb
|
227
227
|
- lib/common/cleanup.rb
|
228
228
|
- lib/common/crc32.rb
|
@@ -241,7 +241,6 @@ files:
|
|
241
241
|
- lib/format/bake_format.rb
|
242
242
|
- lib/multithread/job.rb
|
243
243
|
- lib/tocxx.rb
|
244
|
-
- lib/vs/options.rb
|
245
244
|
- license.txt
|
246
245
|
homepage:
|
247
246
|
licenses:
|
@@ -257,7 +256,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
257
256
|
requirements:
|
258
257
|
- - '>='
|
259
258
|
- !ruby/object:Gem::Version
|
260
|
-
version: '
|
259
|
+
version: '2.0'
|
261
260
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
262
261
|
requirements:
|
263
262
|
- - '>='
|
data/bin/createVSProjects
DELETED
@@ -1,214 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
$:.unshift(File.dirname(__FILE__)+"/../lib")
|
3
|
-
|
4
|
-
require "securerandom"
|
5
|
-
require "vs/options"
|
6
|
-
require 'common/version'
|
7
|
-
|
8
|
-
Bake::Version.printBakeVersion
|
9
|
-
|
10
|
-
module Bake
|
11
|
-
|
12
|
-
PATH = 0
|
13
|
-
UUID = 1
|
14
|
-
|
15
|
-
def self.writeProjects(f,projects)
|
16
|
-
projects.each do |k,v|
|
17
|
-
f.puts "Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"" + k + "\", \"" + v[PATH] + "/" + k + ".vcxproj\", \"{" + v[UUID] + "}\""
|
18
|
-
f.puts "EndProject"
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
def self.writeCfg(f,projects)
|
23
|
-
projects.each do |k,v|
|
24
|
-
f.puts " {" + v[UUID] + "}.bake|Win32.ActiveCfg = bake|Win32"
|
25
|
-
f.puts " {" + v[UUID] + "}.bake|Win32.Build.0 = bake|Win32"
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
@options = VsOptions.new(ARGV)
|
30
|
-
@options.parse_options
|
31
|
-
|
32
|
-
version = "13.00"
|
33
|
-
toolset = "v120"
|
34
|
-
if @options.version == "2010"
|
35
|
-
version = "11.00"
|
36
|
-
toolset = "v100"
|
37
|
-
elsif @options.version == "2012"
|
38
|
-
version = "12.00"
|
39
|
-
toolset = "v110"
|
40
|
-
end
|
41
|
-
|
42
|
-
|
43
|
-
slnFilename = @options.roots[0] + "/" + File.basename(@options.roots[0]) + ".sln"
|
44
|
-
appendProjects = (File.exist?(slnFilename) and @options.rewriteSolution)
|
45
|
-
|
46
|
-
puts "Scanning for bake projects...."
|
47
|
-
|
48
|
-
projects = {}
|
49
|
-
@options.roots.each do |r|
|
50
|
-
Dir.glob(r + "/**/Project.meta").each do |m|
|
51
|
-
projects[File.basename(File.dirname(m))] = [File.dirname(m), SecureRandom.uuid.upcase]
|
52
|
-
end
|
53
|
-
end
|
54
|
-
|
55
|
-
#if not @options.rewriteProjects
|
56
|
-
# projects.delete_if { |k,v| File.exist?(v[PATH]+"/"+k+".vcxproj") or File.exist?(v[PATH]+"/"+k+".vcxproj.filters") }
|
57
|
-
#end
|
58
|
-
|
59
|
-
@options.rewriteSolution = true unless File.exist?(slnFilename)
|
60
|
-
|
61
|
-
slnText = ""
|
62
|
-
if not @options.rewriteSolution
|
63
|
-
pattern = /Project.*[\\\/]([^\\\/]*)\.vcxproj/
|
64
|
-
slnText=File.open(slnFilename).read
|
65
|
-
slnText.gsub!(/\r\n?/, "\n")
|
66
|
-
slnText.each_line do |line|
|
67
|
-
x = line.match(pattern)
|
68
|
-
projects.delete(x[1]) if x
|
69
|
-
end
|
70
|
-
end
|
71
|
-
|
72
|
-
if projects.length == 0
|
73
|
-
puts "Nothing to do."
|
74
|
-
exit(0)
|
75
|
-
end
|
76
|
-
|
77
|
-
if not @options.rewriteSolution
|
78
|
-
|
79
|
-
puts "Adding new projects to " + slnFilename + "... "
|
80
|
-
File.open(slnFilename, 'w') do |f|
|
81
|
-
|
82
|
-
addedProjects = false
|
83
|
-
slnText.each_line do |line|
|
84
|
-
if line.include?"Project("
|
85
|
-
writeProjects(f,projects)
|
86
|
-
addedProjects = true
|
87
|
-
end
|
88
|
-
|
89
|
-
f.puts line
|
90
|
-
|
91
|
-
if line.include?"postSolution"
|
92
|
-
writeCfg(f,projects)
|
93
|
-
end
|
94
|
-
end
|
95
|
-
|
96
|
-
end
|
97
|
-
|
98
|
-
else
|
99
|
-
|
100
|
-
puts "Rewriting " + slnFilename + "... "
|
101
|
-
File.open(slnFilename, 'w') do |f|
|
102
|
-
f.puts "Microsoft Visual Studio Solution File, Format Version " + version
|
103
|
-
|
104
|
-
writeProjects(f,projects)
|
105
|
-
|
106
|
-
f.puts "Global"
|
107
|
-
f.puts " GlobalSection(SolutionConfigurationPlatforms) = preSolution"
|
108
|
-
f.puts " bake|Win32 = bake|Win32"
|
109
|
-
f.puts " EndGlobalSection"
|
110
|
-
f.puts " GlobalSection(ProjectConfigurationPlatforms) = postSolution"
|
111
|
-
|
112
|
-
writeCfg(f,projects)
|
113
|
-
|
114
|
-
f.puts " EndGlobalSection"
|
115
|
-
f.puts " GlobalSection(SolutionProperties) = preSolution"
|
116
|
-
f.puts " HideSolutionNode = FALSE"
|
117
|
-
f.puts " EndGlobalSection"
|
118
|
-
f.puts "EndGlobal"
|
119
|
-
end
|
120
|
-
|
121
|
-
end
|
122
|
-
|
123
|
-
projects.each do |k,v|
|
124
|
-
|
125
|
-
filename = v[PATH] + "/" + k + ".vcxproj"
|
126
|
-
puts "Writing " + filename + "... "
|
127
|
-
File.open(filename, 'w') do |f|
|
128
|
-
|
129
|
-
f.puts "<?xml version=\"1.0\" encoding=\"utf-8\"?>"
|
130
|
-
f.puts "<Project DefaultTargets=\"Build\" ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">"
|
131
|
-
f.puts " <ItemGroup Label=\"ProjectConfigurations\">"
|
132
|
-
f.puts " <ProjectConfiguration Include=\"bake|Win32\">"
|
133
|
-
f.puts " <Configuration>bake</Configuration>"
|
134
|
-
f.puts " <Platform>Win32</Platform>"
|
135
|
-
f.puts " </ProjectConfiguration>"
|
136
|
-
f.puts " </ItemGroup>"
|
137
|
-
f.puts " <PropertyGroup Label=\"Globals\">"
|
138
|
-
f.puts " <Keyword>MakeFileProj</Keyword>"
|
139
|
-
f.puts " <ProjectGuid>{" + v[UUID] + "}</ProjectGuid>"
|
140
|
-
f.puts " </PropertyGroup>"
|
141
|
-
f.puts " <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />"
|
142
|
-
f.puts " <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='bake|Win32'\" Label=\"Configuration\">"
|
143
|
-
f.puts " <ConfigurationType>Makefile</ConfigurationType>"
|
144
|
-
f.puts " <PlatformToolset>" + toolset + "</PlatformToolset>"
|
145
|
-
f.puts " </PropertyGroup>"
|
146
|
-
f.puts " <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='bake|Win32'\">"
|
147
|
-
f.puts " <ExecutablePath>$(PATH)</ExecutablePath>"
|
148
|
-
f.puts " </PropertyGroup>"
|
149
|
-
f.puts " <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />"
|
150
|
-
f.puts " <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='bake|Win32'\">"
|
151
|
-
f.puts " <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />"
|
152
|
-
f.puts " </ImportGroup>"
|
153
|
-
|
154
|
-
|
155
|
-
f.puts " <ItemGroup>"
|
156
|
-
Dir.chdir(v[PATH]) do
|
157
|
-
files = Dir.glob("**/*")
|
158
|
-
files.each do |item|
|
159
|
-
if (item[0..5] != ".bake") and not File.directory?(item)
|
160
|
-
f.puts " <None Include=\"" + item + "\" />"
|
161
|
-
end
|
162
|
-
end
|
163
|
-
end
|
164
|
-
f.puts " </ItemGroup>"
|
165
|
-
|
166
|
-
f.puts " <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />"
|
167
|
-
f.puts "</Project>"
|
168
|
-
|
169
|
-
end
|
170
|
-
|
171
|
-
filename = filename + ".filters"
|
172
|
-
puts "Writing " + filename + "... "
|
173
|
-
File.open(filename, 'w') do |f|
|
174
|
-
|
175
|
-
f.puts "<?xml version=\"1.0\" encoding=\"utf-8\"?>"
|
176
|
-
f.puts "<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">"
|
177
|
-
|
178
|
-
fileList = []
|
179
|
-
f.puts " <ItemGroup>"
|
180
|
-
Dir.chdir(v[PATH]) do
|
181
|
-
files = Dir.glob("**/*")
|
182
|
-
files.each do |item|
|
183
|
-
if (item[0..5] != ".bake")
|
184
|
-
if (File.directory? item)
|
185
|
-
f.puts " <Filter Include=\"" + item.gsub(/\//,"\\") + "\" />"
|
186
|
-
else
|
187
|
-
fileList << item
|
188
|
-
end
|
189
|
-
end
|
190
|
-
end
|
191
|
-
end
|
192
|
-
f.puts " </ItemGroup>"
|
193
|
-
|
194
|
-
f.puts " <ItemGroup>"
|
195
|
-
fileList.each do |i|
|
196
|
-
if File.dirname(i) != "."
|
197
|
-
f.puts " <None Include=\"" + i + "\">"
|
198
|
-
f.puts " <Filter>" + File.dirname(i).gsub(/\//,"\\") + "</Filter>"
|
199
|
-
f.puts " </None>"
|
200
|
-
else
|
201
|
-
f.puts " <None Include=\"" + i + "\" />"
|
202
|
-
end
|
203
|
-
end
|
204
|
-
f.puts " </ItemGroup>"
|
205
|
-
|
206
|
-
f.puts "</Project>"
|
207
|
-
|
208
|
-
end
|
209
|
-
|
210
|
-
end
|
211
|
-
|
212
|
-
puts "Finished."
|
213
|
-
|
214
|
-
end
|
data/lib/vs/options.rb
DELETED
@@ -1,69 +0,0 @@
|
|
1
|
-
require "common/options/parser"
|
2
|
-
require "common/options/option"
|
3
|
-
|
4
|
-
module Bake
|
5
|
-
|
6
|
-
class VsOptions < Parser
|
7
|
-
attr_accessor :version, :roots, :rewriteSolution
|
8
|
-
|
9
|
-
def initialize(argv)
|
10
|
-
super(argv)
|
11
|
-
|
12
|
-
@version = "2012"
|
13
|
-
@rewriteSolution = false
|
14
|
-
@roots = []
|
15
|
-
|
16
|
-
add_option(["--version" ], lambda { |x| set_version(x) })
|
17
|
-
add_option(["--rewrite", "--rewrite_solution"], lambda { set_rewrite_solution })
|
18
|
-
add_option(["-w", ], lambda { |x| set_root(x) })
|
19
|
-
add_option(["-h", "--help" ], lambda { usage; ExitHelper.exit(0) })
|
20
|
-
add_option(["" ], lambda { |x| puts "Error: invalid argument #{x}"; usage; ExitHelper.exit(1) })
|
21
|
-
end
|
22
|
-
|
23
|
-
def usage
|
24
|
-
puts "\nUsage: createVSProjects [options]"
|
25
|
-
puts " -w <root> Add a workspace root. Default is current directory."
|
26
|
-
puts " This option can be used at multiple times."
|
27
|
-
puts " Solution files will be created in the first root directory."
|
28
|
-
puts " --version <year> Visual Studio version. Currently supported: 2010, 2012 (default) and 2013."
|
29
|
-
puts " --rewrite Rewrites existing solution files instead of appending new projects."
|
30
|
-
puts " -h, --help Print this help."
|
31
|
-
end
|
32
|
-
|
33
|
-
def parse_options()
|
34
|
-
parse_internal(false)
|
35
|
-
@roots << Dir.pwd if @roots.length == 0
|
36
|
-
end
|
37
|
-
|
38
|
-
def check_valid_dir(dir)
|
39
|
-
if not File.exists?(dir)
|
40
|
-
puts "Error: Directory #{dir} does not exist"
|
41
|
-
ExitHelper.exit(1)
|
42
|
-
end
|
43
|
-
if not File.directory?(dir)
|
44
|
-
puts "Error: #{dir} is not a directory"
|
45
|
-
ExitHelper.exit(1)
|
46
|
-
end
|
47
|
-
end
|
48
|
-
|
49
|
-
def set_version(v)
|
50
|
-
if v != "2010" and v != "2012" and v != "2013"
|
51
|
-
puts "Error: version must be '2010', '2012' or '2013'"
|
52
|
-
ExitHelper.exit(1)
|
53
|
-
end
|
54
|
-
@version = v
|
55
|
-
end
|
56
|
-
|
57
|
-
def set_rewrite_solution
|
58
|
-
@rewriteSolution = true
|
59
|
-
end
|
60
|
-
|
61
|
-
def set_root(dir)
|
62
|
-
check_valid_dir(dir)
|
63
|
-
r = File.expand_path(dir.gsub(/[\\]/,'/'))
|
64
|
-
@roots << r if not @roots.include?r
|
65
|
-
end
|
66
|
-
|
67
|
-
end
|
68
|
-
|
69
|
-
end
|