bake-toolkit 1.0.27 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/doc/deployDoc.bat +1 -1
- data/doc/dyk/lint.html +50 -0
- data/doc/further/change.html +6 -1
- data/doc/index.html +2 -1
- data/doc/syntax/subst.html +1 -0
- data/doc/syntax/syntax.html +10 -0
- data/lib/bake/model/metamodel.rb +6 -0
- data/lib/bake/options.rb +51 -3
- data/lib/bake/subst.rb +3 -0
- data/lib/bake/util.rb +6 -0
- data/lib/bake/version.rb +2 -2
- data/lib/tocxx.rb +38 -30
- metadata +5 -4
data/doc/deployDoc.bat
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
scp -r "./" "aschaal@esrlabs.com:/var/www/esrlabs/
|
1
|
+
scp -r "./" "aschaal@esrlabs.com:/var/www/esrlabs/wordpress2/gems/doc/bake-toolkit/"
|
2
2
|
pause
|
data/doc/dyk/lint.html
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Documentation of the bake-tookit</title>
|
5
|
+
<style type="text/css">
|
6
|
+
#rundrum {
|
7
|
+
border-width:1px;
|
8
|
+
border-style:dashed;
|
9
|
+
border-color:blue;
|
10
|
+
padding:0.2cm;
|
11
|
+
text-align:justify; }
|
12
|
+
}
|
13
|
+
</style>
|
14
|
+
</head>
|
15
|
+
<body>
|
16
|
+
<h1>Lint</h1>
|
17
|
+
|
18
|
+
<h3>General</h3>
|
19
|
+
bake can be easily used to lint source files:
|
20
|
+
<ul>
|
21
|
+
<li>"lint-nt.exe" must be in the path
|
22
|
+
<li>add "--lint" on the command line
|
23
|
+
</ul>
|
24
|
+
Example:
|
25
|
+
<pre id="rundrum"><code>bake Debug -p MyLibraryProject --lint</code></pre>
|
26
|
+
|
27
|
+
<h3>How does it work</h3>
|
28
|
+
You can lint LibraryConfigs, ExecutableConfigs and single files, but not the complete workspace. The CPP Toolchain settings
|
29
|
+
of the project are used regardless of the file type and file specific options.
|
30
|
+
|
31
|
+
It is possible to specify lnt-files with LintPolicy, but you can add every other lint command line option as well.<br>
|
32
|
+
A possible approach is to add global Lint policies in the DefaultToolchain like this:
|
33
|
+
<pre id="rundrum"><code>DefaultToolchain GCC {
|
34
|
+
...
|
35
|
+
LintPolicy "$(ProjectDir)/lint/misra.lnt"
|
36
|
+
LintPolicy "$(ProjectDir)/lint/suppressions.lnt"
|
37
|
+
}</code></pre>
|
38
|
+
|
39
|
+
<h3>Notes</h3>
|
40
|
+
In rare cases lint has problems if it has to open too many (include) files. If that is the case, use --lint_min and --lint_max command line option of bake. Example:
|
41
|
+
<pre id="rundrum"><code>bake Debug -p MyLibraryProject --lint --lint_max 50 (lints the first 51 files)
|
42
|
+
bake Debug -p MyLibraryProject --lint --lint_min 51 --lint_max 100 (lints the next 50 files)
|
43
|
+
bake Debug -p MyLibraryProject --lint --lint_min 101 (lints the rest of the files)</code></pre>
|
44
|
+
<p>
|
45
|
+
Lint in bake uses GCC includes to check system include stuff. Therefore it is required to have a working GCC installation.<br>
|
46
|
+
But you don't have to use a config with GCC toolchain. Every other toolchain is also valid.
|
47
|
+
|
48
|
+
</body>
|
49
|
+
|
50
|
+
</html>
|
data/doc/further/change.html
CHANGED
@@ -7,12 +7,17 @@
|
|
7
7
|
<body>
|
8
8
|
<h1>Changelog</h1>
|
9
9
|
|
10
|
+
March 14, 2014 - bake-toolkit 1.1.0<br>
|
11
|
+
<ul>
|
12
|
+
<li><b>Added: Lint support</b>
|
13
|
+
<li><b>Added: $(ProjectDir) variable</b>
|
14
|
+
</ul>
|
15
|
+
|
10
16
|
March 7, 2014 - bake-toolkit 1.0.27<br>
|
11
17
|
<ul>
|
12
18
|
<li><b>Cosmetic: some pictures in documentation were missing</b>
|
13
19
|
</ul>
|
14
20
|
|
15
|
-
|
16
21
|
March 5, 2014 - bake-toolkit 1.0.26<br>
|
17
22
|
<ul>
|
18
23
|
<li><b>Bugfix: in rare cases invalid characters from compiler output were not handled correctly</b>
|
data/doc/index.html
CHANGED
@@ -56,6 +56,7 @@ bake is used to build software <font color="#009900"><b>fast</b></font> and <fon
|
|
56
56
|
|
57
57
|
<h3>Did you know?</h3>
|
58
58
|
<ul>
|
59
|
+
<li><a href="dyk/lint.html">Lint</a>
|
59
60
|
<li><a href="dyk/tipps.html">Tipps and Tricks</a>
|
60
61
|
</ul>
|
61
62
|
|
@@ -71,7 +72,7 @@ bake is used to build software <font color="#009900"><b>fast</b></font> and <fon
|
|
71
72
|
|
72
73
|
<p>
|
73
74
|
<hr>
|
74
|
-
<table width="100%" border="0"><tr><td align="left">Described bake-toolkit version: 1.0
|
75
|
+
<table width="100%" border="0"><tr><td align="left">Described bake-toolkit version: 1.1.0</td><td align="right">March 14, 2014</td></tr></table>
|
75
76
|
|
76
77
|
</body>
|
77
78
|
|
data/doc/syntax/subst.html
CHANGED
@@ -23,6 +23,7 @@
|
|
23
23
|
<tr><td>$(MainProjectName)</td> <td>bootloader</td></tr>
|
24
24
|
<tr><td>$(ConfigName)</td> <td>lib</td></tr>
|
25
25
|
<tr><td>$(ProjectName)</td> <td>canDriver</td></tr>
|
26
|
+
<tr><td>$(ProjectDir)</td> <td>C:/Root/MyProject</td></tr>
|
26
27
|
<tr><td>$(OutputDir)</td> <td>Debug_bootloader</td></tr>
|
27
28
|
<tr><td>$(ArtifactName)</td> <td>bootloader_1.0.elf</td></tr>
|
28
29
|
<tr><td>$(ArtifactNameBase)</td> <td>bootloader_1.0</td></tr>
|
data/doc/syntax/syntax.html
CHANGED
@@ -117,6 +117,7 @@ z-index: 100;
|
|
117
117
|
<span class="help" onMouseover="showLibPrefixFlags()" onMouseout="notip()">LibPrefixFlags</span> <flags><br>
|
118
118
|
<span class="help" onMouseover="showLibPostfixFlags()" onMouseout="notip()">LibPostfixFlags</span> <flags><br>
|
119
119
|
}<br>
|
120
|
+
<span class="help" onMouseover="showDefaultLintPolicy()" onMouseout="notip()">LintPolicy</span> <policy><br>
|
120
121
|
}<br></span><br></span>
|
121
122
|
|
122
123
|
<span id="libExe_part"><span class="show" style="background-color:#EEEEEE;">
|
@@ -143,6 +144,7 @@ z-index: 100;
|
|
143
144
|
<span class="help" onMouseover="showLibPrefixFlags()" onMouseout="notip()">LibPrefixFlags</span> <flags>, add: <flags>, remove: <flags><br>
|
144
145
|
<span class="help" onMouseover="showLibPostfixFlags()" onMouseout="notip()">LibPostfixFlags</span> <flags>, add: <flags>, remove: <flags><br>
|
145
146
|
}<br>
|
147
|
+
<span class="help" onMouseover="showLintPolicy()" onMouseout="notip()">LintPolicy</span> <policy><br>
|
146
148
|
}<br></span><br></span>
|
147
149
|
|
148
150
|
<span id="exe_part"><span class="show" style="background-color:#EEEEEE;">
|
@@ -486,6 +488,10 @@ function showLinker() {
|
|
486
488
|
ddrivetip("Linker", "No","0..1","-","Makes sense only for ExecutableConfigs.")
|
487
489
|
}
|
488
490
|
|
491
|
+
function showLintPolicy() {
|
492
|
+
ddrivetip("LintPolicy", "No","0..n","-","lnt-file - but it can be used for any other command line option for Lint.")
|
493
|
+
}
|
494
|
+
|
489
495
|
function showDefaultFlags() {
|
490
496
|
ddrivetip("Flags", "No","0..n","-","Default flags.")
|
491
497
|
}
|
@@ -506,6 +512,10 @@ function showDefaultLinker() {
|
|
506
512
|
ddrivetip("Linker", "No","0..1","-","Default settings for the linker.")
|
507
513
|
}
|
508
514
|
|
515
|
+
function showDefaultLintPolicy() {
|
516
|
+
ddrivetip("LintPolicy", "No","0..n","-","lnt-file - but it can be used for any other command line option for Lint.")
|
517
|
+
}
|
518
|
+
|
509
519
|
function showCommand() {
|
510
520
|
ddrivetip("command", "No","-","Depending on toolchain, e.g. \"gcc\"","Change command, e.g. \"$(PATH_TO_EXE)/gcc_speciale.exe\"")
|
511
521
|
}
|
data/lib/bake/model/metamodel.rb
CHANGED
@@ -66,17 +66,23 @@ module Cxxproject
|
|
66
66
|
contains_many 'flags', Flags, 'parent'
|
67
67
|
end
|
68
68
|
|
69
|
+
class LintPolicy < ModelElement
|
70
|
+
has_attr 'name', String, :defaultValueLiteral => ""
|
71
|
+
end
|
72
|
+
|
69
73
|
class DefaultToolchain < ModelElement
|
70
74
|
has_attr 'basedOn', String, :defaultValueLiteral => ""
|
71
75
|
contains_many 'compiler', Compiler, 'parent'
|
72
76
|
contains_one 'archiver', Archiver, 'parent'
|
73
77
|
contains_one 'linker', Linker, 'parent'
|
78
|
+
contains_many 'lintPolicy', LintPolicy, 'parent'
|
74
79
|
end
|
75
80
|
|
76
81
|
class Toolchain < ModelElement
|
77
82
|
contains_many 'compiler', Compiler, 'parent'
|
78
83
|
contains_one 'archiver', Archiver, 'parent'
|
79
84
|
contains_one 'linker', Linker, 'parent'
|
85
|
+
contains_many 'lintPolicy', LintPolicy, 'parent'
|
80
86
|
end
|
81
87
|
|
82
88
|
class Person < ModelElement
|
data/lib/bake/options.rb
CHANGED
@@ -8,8 +8,8 @@ module Cxxproject
|
|
8
8
|
class Options < Parser
|
9
9
|
attr_reader :build_config, :main_dir, :project, :filename, :eclipse_version, :alias_filename # String
|
10
10
|
attr_reader :roots, :include_filter, :exclude_filter # String List
|
11
|
-
attr_reader :clean, :rebuild, :single, :verbose, :nocache, :color, :show_includes, :linkOnly, :check_uninc, :printLess, :no_autodir, :clobber # Boolean
|
12
|
-
attr_reader :threads, :socket # Fixnum
|
11
|
+
attr_reader :clean, :rebuild, :single, :verbose, :nocache, :color, :show_includes, :linkOnly, :check_uninc, :printLess, :no_autodir, :clobber, :lint, :debug # Boolean
|
12
|
+
attr_reader :threads, :socket, :lint_min, :lint_max # Fixnum
|
13
13
|
|
14
14
|
def initialize(argv)
|
15
15
|
super(argv)
|
@@ -21,6 +21,8 @@ module Cxxproject
|
|
21
21
|
@single = false
|
22
22
|
@clean = false
|
23
23
|
@clobber = false
|
24
|
+
@lint = false
|
25
|
+
@debug = false
|
24
26
|
@rebuild = false
|
25
27
|
@verbose = false
|
26
28
|
@nocache = false
|
@@ -31,6 +33,8 @@ module Cxxproject
|
|
31
33
|
@printLess = false
|
32
34
|
@no_autodir = false
|
33
35
|
@threads = 8
|
36
|
+
@lint_min = -1
|
37
|
+
@lint_max = -1
|
34
38
|
@roots = []
|
35
39
|
@socket = 0
|
36
40
|
@include_filter = []
|
@@ -54,11 +58,16 @@ module Cxxproject
|
|
54
58
|
add_option(Option.new("--prepro",false) { set_prepro })
|
55
59
|
add_option(Option.new("--link_only",false) { set_linkOnly })
|
56
60
|
add_option(Option.new("--no_autodir",false) { set_no_autodir })
|
61
|
+
add_option(Option.new("--lint",false) { set_lint })
|
62
|
+
add_option(Option.new("--lint_min",true) { |x| set_lint_min(x) })
|
63
|
+
add_option(Option.new("--lint_max",true) { |x| set_lint_max(x) })
|
57
64
|
|
58
65
|
add_option(Option.new("-v0",false) { set_v(0) })
|
59
66
|
add_option(Option.new("-v1",false) { set_v(1) })
|
60
67
|
add_option(Option.new("-v2",false) { set_v(2) })
|
61
68
|
|
69
|
+
add_option(Option.new("--debug",false) { set_debug })
|
70
|
+
|
62
71
|
add_option(Option.new("--clobber",false) { set_clobber })
|
63
72
|
add_option(Option.new("--ignore_cache",false) { set_nocache })
|
64
73
|
add_option(Option.new("--threads",true) { |x| set_threads(x) })
|
@@ -95,7 +104,12 @@ module Cxxproject
|
|
95
104
|
puts " --rebuild Clean before build."
|
96
105
|
puts " --clobber Clean the file/project (same as option -c) AND the bake cache files."
|
97
106
|
puts " --prepro Stop after preprocessor."
|
98
|
-
puts " --link_only Only link executable - doesn't update objects and archives or start PreSteps and PostSteps"
|
107
|
+
puts " --link_only Only link executable - doesn't update objects and archives or start PreSteps and PostSteps."
|
108
|
+
puts " --lint Performs Lint checks instead of compiling sources. Works currently only with"
|
109
|
+
puts " GCC toolchain in project and file scope."
|
110
|
+
puts " --lint_min <num> If number of files in a project is too large for lint to handle, it is possible"
|
111
|
+
puts " to specify only a part of the file list to lint (default -1)."
|
112
|
+
puts " --lint_max <num> See above (default -1)."
|
99
113
|
puts " --ignore_cache Rereads the original meta files - usefull if workspace structure has been changed."
|
100
114
|
puts " --check_uninc Checks for unnecessary includes (only done for successful project builds)."
|
101
115
|
puts " --threads <num> Set NUMBER of parallel compiled files (default is 8)."
|
@@ -121,6 +135,7 @@ module Cxxproject
|
|
121
135
|
set_project(File.basename(@main_dir)) if @project.nil?
|
122
136
|
@roots = @def_roots if @roots.length == 0
|
123
137
|
Rake::application.max_parallel_tasks = @threads
|
138
|
+
Rake::application.debug = @debug
|
124
139
|
|
125
140
|
if @linkOnly
|
126
141
|
if @rebuild
|
@@ -132,6 +147,22 @@ module Cxxproject
|
|
132
147
|
ExitHelper.exit(1)
|
133
148
|
end
|
134
149
|
end
|
150
|
+
|
151
|
+
if @lint and not @single
|
152
|
+
Printer.printError "Error: --lint must be used together with -p and optional with -f"
|
153
|
+
ExitHelper.exit(1)
|
154
|
+
end
|
155
|
+
|
156
|
+
if @lint and @clean
|
157
|
+
Printer.printError "Error: --lint and -c not allowed (yet)"
|
158
|
+
ExitHelper.exit(1)
|
159
|
+
end
|
160
|
+
|
161
|
+
if @lint_max >= 0 and @lint_min >= 0 and @lint_max < @lint_min
|
162
|
+
Printer.printError "Error: lint_max must be greater than lint_min"
|
163
|
+
ExitHelper.exit(1)
|
164
|
+
end
|
165
|
+
|
135
166
|
end
|
136
167
|
|
137
168
|
def check_valid_dir(dir)
|
@@ -214,6 +245,14 @@ module Cxxproject
|
|
214
245
|
@no_autodir = true
|
215
246
|
end
|
216
247
|
|
248
|
+
def set_lint()
|
249
|
+
@lint = true
|
250
|
+
end
|
251
|
+
|
252
|
+
def set_debug()
|
253
|
+
@debug = true
|
254
|
+
end
|
255
|
+
|
217
256
|
def set_v(num)
|
218
257
|
if num == 0
|
219
258
|
@printLess = true
|
@@ -279,10 +318,19 @@ module Cxxproject
|
|
279
318
|
ExitHelper.exit(1)
|
280
319
|
end
|
281
320
|
end
|
321
|
+
|
282
322
|
def set_socket(num)
|
283
323
|
@socket = String === num ? num.to_i : num
|
284
324
|
end
|
285
325
|
|
326
|
+
def set_lint_min(num)
|
327
|
+
@lint_min = String === num ? num.to_i : num
|
328
|
+
end
|
329
|
+
|
330
|
+
def set_lint_max(num)
|
331
|
+
@lint_max = String === num ? num.to_i : num
|
332
|
+
end
|
333
|
+
|
286
334
|
def printHash(x, level)
|
287
335
|
x.each do |k,v|
|
288
336
|
if Hash === v
|
data/lib/bake/subst.rb
CHANGED
@@ -5,6 +5,7 @@ module Cxxproject
|
|
5
5
|
def self.itute(config, projName, options)
|
6
6
|
|
7
7
|
@@configName = config.name
|
8
|
+
@@projDir = config.parent.get_project_dir
|
8
9
|
@@projName = projName
|
9
10
|
@@options = options
|
10
11
|
@@mainProjectName = File::basename(options.main_dir)
|
@@ -49,6 +50,8 @@ module Cxxproject
|
|
49
50
|
substStr << @@configName
|
50
51
|
elsif var == "ProjectName"
|
51
52
|
substStr << @@projName
|
53
|
+
elsif var == "ProjectDir"
|
54
|
+
substStr << @@projDir
|
52
55
|
elsif var == "OutputDir"
|
53
56
|
if @@projName == @@mainProjectName
|
54
57
|
substStr << @@options.build_config
|
data/lib/bake/util.rb
CHANGED
@@ -44,8 +44,14 @@ def integrateToolchain(tcs, toolchain)
|
|
44
44
|
toolchain.compiler.each do |c|
|
45
45
|
integrateCompiler(tcs, c, c.ctype)
|
46
46
|
end
|
47
|
+
integrateLintPolicy(tcs, toolchain.lintPolicy)
|
47
48
|
end
|
48
49
|
|
50
|
+
def integrateLintPolicy(tcs, policies)
|
51
|
+
policies.each do |d|
|
52
|
+
tcs[:LINT_POLICY] << d.name
|
53
|
+
end
|
54
|
+
end
|
49
55
|
|
50
56
|
def integrateLinker(tcs, linker)
|
51
57
|
return tcs unless linker
|
data/lib/bake/version.rb
CHANGED
data/lib/tocxx.rb
CHANGED
@@ -13,7 +13,7 @@ require 'bake/mergeConfig'
|
|
13
13
|
require 'cxxproject/buildingblocks/module'
|
14
14
|
require 'cxxproject/buildingblocks/makefile'
|
15
15
|
require 'cxxproject/buildingblocks/executable'
|
16
|
-
require 'cxxproject/buildingblocks/
|
16
|
+
require 'cxxproject/buildingblocks/lint'
|
17
17
|
require 'cxxproject/buildingblocks/binary_library'
|
18
18
|
require 'cxxproject/buildingblocks/custom_building_block'
|
19
19
|
require 'cxxproject/buildingblocks/command_line'
|
@@ -316,9 +316,11 @@ module Cxxproject
|
|
316
316
|
Printer.printError "Error: Main project configuration must contain DefaultToolchain"
|
317
317
|
ExitHelper.exit(1)
|
318
318
|
else
|
319
|
-
|
319
|
+
basedOn = config.defaultToolchain.basedOn
|
320
|
+
basedOn = "GCC_Lint" if @options.lint
|
321
|
+
basedOnToolchain = Cxxproject::Toolchain::Provider[basedOn]
|
320
322
|
if basedOnToolchain == nil
|
321
|
-
Printer.printError "Error: DefaultToolchain based on unknown compiler '#{
|
323
|
+
Printer.printError "Error: DefaultToolchain based on unknown compiler '#{basedOn}'"
|
322
324
|
ExitHelper.exit(1)
|
323
325
|
end
|
324
326
|
@defaultToolchain = Utils.deep_copy(basedOnToolchain)
|
@@ -334,7 +336,8 @@ module Cxxproject
|
|
334
336
|
@defaultToolchain[:COMPILER][:C][:FLAGS] == @defaultToolchainCached[:COMPILER][:C][:FLAGS] and
|
335
337
|
@defaultToolchain[:COMPILER][:C][:DEFINES].join("") == @defaultToolchainCached[:COMPILER][:C][:DEFINES].join("") and
|
336
338
|
@defaultToolchain[:COMPILER][:ASM][:FLAGS] == @defaultToolchainCached[:COMPILER][:ASM][:FLAGS] and
|
337
|
-
@defaultToolchain[:COMPILER][:ASM][:DEFINES].join("") == @defaultToolchainCached[:COMPILER][:ASM][:DEFINES].join("")
|
339
|
+
@defaultToolchain[:COMPILER][:ASM][:DEFINES].join("") == @defaultToolchainCached[:COMPILER][:ASM][:DEFINES].join("") and
|
340
|
+
@defaultToolchain[:LINT_POLICY].join("") == @defaultToolchainCached[:LINT_POLICY].join("")
|
338
341
|
@defaultToolchainTime = @mainMetaTime
|
339
342
|
end
|
340
343
|
end
|
@@ -383,10 +386,12 @@ module Cxxproject
|
|
383
386
|
|
384
387
|
@mainConfig = @project2config[@mainProjectName]
|
385
388
|
|
386
|
-
|
389
|
+
basedOn = @mainConfig.defaultToolchain.basedOn
|
390
|
+
basedOn = "GCC_Lint" if @options.lint
|
391
|
+
|
392
|
+
basedOnToolchain = Cxxproject::Toolchain::Provider[basedOn]
|
387
393
|
@defaultToolchain = Utils.deep_copy(basedOnToolchain)
|
388
394
|
integrateToolchain(@defaultToolchain, @mainConfig.defaultToolchain)
|
389
|
-
|
390
395
|
end
|
391
396
|
|
392
397
|
def convert2bb
|
@@ -408,17 +413,7 @@ module Cxxproject
|
|
408
413
|
|
409
414
|
addSteps(config.postSteps, bbModule, projDir, "POST", tcs) if not @options.linkOnly
|
410
415
|
|
411
|
-
|
412
|
-
if Metamodel::LibraryConfig === config
|
413
|
-
bbModule.main_content = SourceLibrary.new(projName)
|
414
|
-
elsif Metamodel::ExecutableConfig === config
|
415
|
-
bbModule.main_content = Executable.new(projName)
|
416
|
-
if not config.artifactName.nil?
|
417
|
-
x = @options.build_config + "/" + config.artifactName.name
|
418
|
-
bbModule.main_content.set_executable_name(x)
|
419
|
-
end
|
420
|
-
bbModule.main_content.set_linker_script(convPath(config.linkerScript, config)) unless config.linkerScript.nil?
|
421
|
-
else # CUSTOM
|
416
|
+
if Metamodel::CustomConfig === config
|
422
417
|
if config.step
|
423
418
|
if config.step.filter != ""
|
424
419
|
Printer.printError "Error: #{config.file_name}(#{config.step.line_number}): attribute filter not allowed here"
|
@@ -431,6 +426,18 @@ module Cxxproject
|
|
431
426
|
addSteps(config.step, bbModule, projDir, nil, tcs)
|
432
427
|
end
|
433
428
|
bbModule.main_content = BinaryLibrary.new(projName, false)
|
429
|
+
elsif @options.lint
|
430
|
+
bbModule.main_content = Lint.new(projName)
|
431
|
+
bbModule.main_content.set_lint_min(@options.lint_min).set_lint_max(@options.lint_max)
|
432
|
+
elsif Metamodel::LibraryConfig === config
|
433
|
+
bbModule.main_content = SourceLibrary.new(projName)
|
434
|
+
elsif Metamodel::ExecutableConfig === config
|
435
|
+
bbModule.main_content = Executable.new(projName)
|
436
|
+
if not config.artifactName.nil?
|
437
|
+
x = @options.build_config + "/" + config.artifactName.name
|
438
|
+
bbModule.main_content.set_executable_name(x)
|
439
|
+
end
|
440
|
+
bbModule.main_content.set_linker_script(convPath(config.linkerScript, config)) unless config.linkerScript.nil?
|
434
441
|
end
|
435
442
|
bbModule.last_content.dependencies << bbModule.main_content.name
|
436
443
|
bbModule.last_content = bbModule.main_content
|
@@ -536,7 +543,7 @@ module Cxxproject
|
|
536
543
|
end
|
537
544
|
|
538
545
|
# special exe stuff
|
539
|
-
if Metamodel::ExecutableConfig === config
|
546
|
+
if Metamodel::ExecutableConfig === config and not @options.lint
|
540
547
|
if not config.mapFile.nil?
|
541
548
|
if config.mapFile.name == ""
|
542
549
|
exeName = bbModule.main_content.get_executable_name
|
@@ -548,18 +555,19 @@ module Cxxproject
|
|
548
555
|
bbModule.main_content.set_mapfile(mapfileName)
|
549
556
|
end
|
550
557
|
end
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
end
|
558
|
+
|
559
|
+
bbModule.contents.each do |c|
|
560
|
+
if Cxxproject::CommandLine === c
|
561
|
+
cmdLine = convPath(c.get_command_line, config, bbModule.main_content)
|
562
|
+
c.set_command_line(cmdLine)
|
563
|
+
end
|
564
|
+
end
|
557
565
|
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
566
|
+
# DEPS
|
567
|
+
projDeps = config.dependency.map { |dd| "Project "+dd.name }
|
568
|
+
projDeps.concat(bbModule.main_content.dependencies)
|
569
|
+
bbModule.main_content.set_dependencies(projDeps)
|
570
|
+
config.dependency.each { |dd| @lib_elements[dd.line_number] = [HasLibraries::DEPENDENCY, dd.name] }
|
563
571
|
|
564
572
|
|
565
573
|
@lib_elements.sort.each do |x|
|
@@ -745,7 +753,7 @@ module Cxxproject
|
|
745
753
|
c.set_sources([@startupFilename])
|
746
754
|
c.set_source_patterns([])
|
747
755
|
c.set_exclude_sources([])
|
748
|
-
c.extend(SingleSourceModule)
|
756
|
+
c.extend(SingleSourceModule) unless @options.lint
|
749
757
|
break
|
750
758
|
else
|
751
759
|
def c.needed?
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bake-toolkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-03-
|
12
|
+
date: 2014-03-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: cxxproject
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.5.
|
21
|
+
version: 0.5.72
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - '='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.5.
|
29
|
+
version: 0.5.72
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: rtext
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -106,6 +106,7 @@ files:
|
|
106
106
|
- doc/concepts/mainproject.html
|
107
107
|
- doc/deployDoc.bat
|
108
108
|
- doc/dyk/keys.png
|
109
|
+
- doc/dyk/lint.html
|
109
110
|
- doc/dyk/tipps.html
|
110
111
|
- doc/eclipse/build/buildFile.png
|
111
112
|
- doc/eclipse/build/buildMain.png
|