bake-toolkit 1.8.0.1 → 2.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/bake +14 -53
- data/bin/bakery +50 -43
- data/bin/createVSProjects +3 -3
- data/doc/cmd/install.html +1 -5
- data/doc/cmd/usecmd.html +29 -5
- data/doc/dyk/lint.html +21 -4
- data/doc/dyk/tipps.html +0 -6
- data/doc/eclipse/import.html +3 -1
- data/doc/eclipse/import/Import.png +0 -0
- data/doc/eclipse/use.html +8 -5
- data/doc/further/change.html +134 -1
- data/doc/further/issues.html +1 -0
- data/doc/further/wish.html +24 -21
- data/doc/index.html +1 -1
- data/doc/syntax/subst.html +8 -1
- data/doc/syntax/syntax.html +42 -14
- data/lib/bake/cache.rb +51 -59
- data/lib/bake/config/loader.rb +289 -0
- data/lib/bake/libElement.rb +134 -0
- data/lib/bake/mergeConfig.rb +1 -1
- data/lib/bake/model/language.rb +1 -1
- data/lib/bake/model/loader.rb +88 -0
- data/lib/bake/model/metamodel.rb +24 -16
- data/lib/bake/model/metamodel_ext.rb +9 -4
- data/lib/bake/options/options.rb +222 -0
- data/lib/bake/options/showConfigNames.rb +44 -0
- data/lib/bake/options/showDoc.rb +19 -0
- data/lib/bake/options/showLicense.rb +9 -0
- data/lib/bake/options/showToolchains.rb +39 -0
- data/lib/bake/options/usage.rb +54 -0
- data/lib/bake/process_output.rb +10 -0
- data/lib/bake/subst.rb +105 -40
- data/lib/bake/toolchain/clang.rb +44 -0
- data/lib/bake/toolchain/colorizing_formatter.rb +125 -0
- data/lib/bake/toolchain/diab.rb +53 -0
- data/lib/bake/toolchain/errorparser/diab_compiler_error_parser.rb +40 -0
- data/lib/bake/toolchain/errorparser/diab_linker_error_parser.rb +41 -0
- data/lib/bake/toolchain/errorparser/error_parser.rb +71 -0
- data/lib/bake/toolchain/errorparser/gcc_compiler_error_parser.rb +35 -0
- data/lib/bake/toolchain/errorparser/gcc_linker_error_parser.rb +35 -0
- data/lib/bake/toolchain/errorparser/greenhills_compiler_error_parser.rb +32 -0
- data/lib/bake/toolchain/errorparser/greenhills_linker_error_parser.rb +44 -0
- data/lib/bake/toolchain/errorparser/keil_compiler_error_parser.rb +40 -0
- data/lib/bake/toolchain/errorparser/keil_linker_error_parser.rb +30 -0
- data/lib/bake/toolchain/errorparser/lint_error_parser.rb +34 -0
- data/lib/bake/toolchain/errorparser/process_output.rb +3 -0
- data/lib/bake/toolchain/errorparser/ti_compiler_error_parser.rb +30 -0
- data/lib/bake/toolchain/errorparser/ti_linker_error_parser.rb +30 -0
- data/lib/bake/toolchain/gcc.rb +49 -0
- data/lib/bake/toolchain/gcc_param.rb +7 -0
- data/lib/bake/toolchain/greenhills.rb +52 -0
- data/lib/bake/toolchain/keil.rb +55 -0
- data/lib/bake/toolchain/lint.rb +20 -0
- data/lib/bake/toolchain/provider.rb +136 -0
- data/lib/bake/toolchain/ti.rb +47 -0
- data/lib/bake/util.rb +27 -15
- data/lib/bakery/buildPattern.rb +1 -1
- data/lib/bakery/model/language.rb +1 -1
- data/lib/bakery/model/loader.rb +56 -0
- data/lib/bakery/model/metamodel.rb +1 -1
- data/lib/bakery/options/options.rb +87 -0
- data/lib/bakery/toBake.rb +10 -6
- data/lib/blocks/block.rb +225 -0
- data/lib/blocks/blockBase.rb +155 -0
- data/lib/blocks/commandLine.rb +25 -0
- data/lib/blocks/compile.rb +382 -0
- data/lib/blocks/docu.rb +28 -0
- data/lib/blocks/executable.rb +143 -0
- data/lib/blocks/has_execute_command.rb +31 -0
- data/lib/blocks/library.rb +78 -0
- data/lib/blocks/lint.rb +53 -0
- data/lib/blocks/makefile.rb +87 -0
- data/lib/blocks/showIncludes.rb +114 -0
- data/lib/common/abortException.rb +4 -0
- data/lib/common/cleanup.rb +9 -0
- data/lib/common/exit_helper.rb +28 -0
- data/lib/common/ext/file.rb +88 -0
- data/lib/common/ext/stdout.rb +45 -0
- data/lib/common/ide_interface.rb +194 -0
- data/lib/common/options/option.rb +13 -0
- data/lib/common/options/parser.rb +59 -0
- data/lib/common/process.rb +64 -0
- data/lib/common/utils.rb +52 -0
- data/lib/{bake → common}/version.rb +3 -10
- data/lib/multithread/job.rb +44 -0
- data/lib/tocxx.rb +201 -932
- data/lib/vs/options.rb +3 -2
- data/license.txt +47 -22
- metadata +90 -30
- data/bin/bake-doc +0 -12
- data/lib/alias/loader.rb +0 -56
- data/lib/alias/model/language.rb +0 -22
- data/lib/alias/model/metamodel.rb +0 -29
- data/lib/bake/loader.rb +0 -92
- data/lib/bake/options.rb +0 -421
- data/lib/bakery/loader.rb +0 -57
- data/lib/bakery/options.rb +0 -105
- data/lib/option/parser.rb +0 -73
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b793e0fe7bd1968ec00296fba84aa608ff3c1ad9
|
4
|
+
data.tar.gz: 8bd30d6498a53cdb10d81be6fc8a96836731f98d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82495dc61ad9c98b2dcf4c941e562ff6b0d0abf4f953d14a5e3fa7401d7aace13980bb9299433cf113b8c71e192316b23804af718720e940e530c37dad614ecf
|
7
|
+
data.tar.gz: fa22d24b19a3008809f3f9d2c2c956008278e3a01fdfbc15d7f344fb18d2f81273adcb7cd28eea2a71ef6a29cd7b6733b4c20ec387c6b30e9eef02d378f7c5d6
|
data/bin/bake
CHANGED
@@ -3,47 +3,32 @@
|
|
3
3
|
$timeStart = Time.now
|
4
4
|
|
5
5
|
$:.unshift(File.dirname(__FILE__)+"/../lib")
|
6
|
-
require '
|
7
|
-
|
8
|
-
$:.unshift(File.dirname(__FILE__)+"/../../cxxproject/lib")
|
9
|
-
|
10
|
-
require "cxxproject/version"
|
6
|
+
require 'common/version'
|
11
7
|
|
12
8
|
STDOUT.sync = true
|
13
9
|
STDERR.sync = true
|
14
10
|
|
15
|
-
puts "-- bake #{
|
11
|
+
puts "-- bake #{Bake::Version.number}, ruby #{RUBY_VERSION}p#{RUBY_PATCHLEVEL}, platform #{RUBY_PLATFORM} --"
|
16
12
|
|
17
13
|
require 'tocxx'
|
18
|
-
require '
|
14
|
+
require 'common/options/option'
|
19
15
|
require 'socket'
|
20
16
|
|
21
|
-
module
|
22
|
-
|
23
|
-
def self.isNewer(oldVersion, newVersion)
|
24
|
-
oldSplitted = oldVersion.split(".")
|
25
|
-
newSplitted = newVersion.split(".")
|
26
|
-
if oldSplitted.length >= 3 and newSplitted.length >= 3
|
27
|
-
3.times do |i|
|
28
|
-
return true if newSplitted[i].to_i > oldSplitted[i].to_i
|
29
|
-
return false if newSplitted[i].to_i < oldSplitted[i].to_i
|
30
|
-
end
|
31
|
-
end
|
32
|
-
return false;
|
33
|
-
end
|
17
|
+
module Bake
|
34
18
|
|
35
19
|
earlyExit = nil
|
36
20
|
begin
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
21
|
+
if RUBY_VERSION[0..2] == "1.8"
|
22
|
+
Bake.formatter.printError("Error: Ruby 1.8 not supported anymore. Use Ruby 1.9 or greater.")
|
23
|
+
ExitHelper.exit(1)
|
24
|
+
end
|
25
|
+
|
26
|
+
Bake.options = Options.new(ARGV)
|
27
|
+
Bake.options.parse_options
|
41
28
|
|
29
|
+
tocxx = Bake::ToCxx.new
|
42
30
|
tocxx.connect()
|
43
|
-
|
44
|
-
if tocxx.doit()
|
45
|
-
tocxx.start()
|
46
|
-
end
|
31
|
+
tocxx.doit()
|
47
32
|
tocxx.disconnect()
|
48
33
|
|
49
34
|
rescue SystemExit => e
|
@@ -53,34 +38,10 @@ module Cxxproject
|
|
53
38
|
rescue Exception => e2
|
54
39
|
end
|
55
40
|
end
|
56
|
-
|
57
41
|
|
58
42
|
timeEnd = Time.now
|
59
43
|
timeDiff = timeEnd - $timeStart
|
60
|
-
|
61
|
-
|
62
|
-
# update check
|
63
|
-
#begin
|
64
|
-
# versionWarningString = ""
|
65
|
-
# require 'net/http'
|
66
|
-
# vtext = Net::HTTP.get('10.40.38.84', '/bake/versions.txt')
|
67
|
-
# vtextSplitted = vtext.split(" ")
|
68
|
-
# if vtextSplitted.length > 0
|
69
|
-
# if isNewer(Cxxproject::Version.bake, vtextSplitted[0])
|
70
|
-
# versionWarningString = versionWarningString + "\nNewer version of bake gem available: #{vtextSplitted[0]} - please update!"
|
71
|
-
# end
|
72
|
-
# end
|
73
|
-
# if vtextSplitted.length > 1
|
74
|
-
# if isNewer(options.eclipse_version, vtextSplitted[1])
|
75
|
-
# versionWarningString = versionWarningString + "\nNewer version of bake Eclipse plugin available: #{vtextSplitted[1]} - please update!"
|
76
|
-
# end
|
77
|
-
# end
|
78
|
-
# if versionWarningString != ""
|
79
|
-
# Printer.printWarning versionWarningString
|
80
|
-
# end
|
81
|
-
#rescue Exception => e
|
82
|
-
#end
|
83
|
-
|
44
|
+
Bake.formatter.printInfo("\nTime: %02d:%02d minutes" % [timeDiff/60, timeDiff%60])
|
84
45
|
|
85
46
|
raise earlyExit if earlyExit
|
86
47
|
end
|
data/bin/bakery
CHANGED
@@ -3,44 +3,44 @@
|
|
3
3
|
$timeStart = Time.now
|
4
4
|
|
5
5
|
$:.unshift(File.dirname(__FILE__)+"/../lib")
|
6
|
-
require '
|
6
|
+
require 'common/version'
|
7
7
|
|
8
|
-
|
8
|
+
require 'common/utils'
|
9
9
|
|
10
|
-
|
11
|
-
require 'cxxproject/utils/utils'
|
12
|
-
|
13
|
-
puts "-- bakery #{Cxxproject::Version.bake}, ruby #{RUBY_VERSION}p#{RUBY_PATCHLEVEL}, platform #{RUBY_PLATFORM} --"
|
10
|
+
puts "-- bakery #{Bake::Version.number}, ruby #{RUBY_VERSION}p#{RUBY_PATCHLEVEL}, platform #{RUBY_PLATFORM} --"
|
14
11
|
|
15
12
|
STDOUT.sync = true
|
16
13
|
STDERR.sync = true
|
17
14
|
|
18
|
-
require '
|
15
|
+
require 'bake/toolchain/colorizing_formatter'
|
19
16
|
require 'tocxx'
|
20
|
-
require "bakery/loader"
|
21
|
-
require "bakery/options"
|
17
|
+
require "bakery/model/loader"
|
18
|
+
require "bakery/options/options"
|
22
19
|
require "bakery/toBake"
|
23
20
|
require "bakery/buildPattern"
|
24
|
-
require '
|
25
|
-
require '
|
26
|
-
|
27
|
-
module Cxxproject
|
21
|
+
require 'common/ext/stdout'
|
22
|
+
require 'common/cleanup'
|
28
23
|
|
24
|
+
module Bake
|
29
25
|
|
30
26
|
@options = BakeryOptions.new(ARGV)
|
31
27
|
@options.parse_options
|
32
28
|
|
33
29
|
env = nil
|
34
30
|
begin
|
35
|
-
loader = BakeryLoader.new
|
31
|
+
loader = BakeryLoader.new
|
36
32
|
env = loader.load(@options.collection_dir+"/Collection.meta")
|
33
|
+
rescue SystemExit => e
|
34
|
+
raise e
|
37
35
|
rescue Exception => e
|
36
|
+
puts e
|
37
|
+
puts e.backtrace
|
38
38
|
ExitHelper.exit(1)
|
39
39
|
end
|
40
40
|
|
41
41
|
|
42
42
|
if @options.collection_name.empty?
|
43
|
-
puts "Please specify a collection name
|
43
|
+
puts "Please specify a collection name. Possible values are:"
|
44
44
|
env.find(:class => BakeryModel::Collection).each { |e|
|
45
45
|
puts "* " + e.name
|
46
46
|
}
|
@@ -71,8 +71,9 @@ module Cxxproject
|
|
71
71
|
|
72
72
|
passedParams = []
|
73
73
|
excludeParam = false
|
74
|
+
wasMinus = false
|
74
75
|
ARGV.each do |x|
|
75
|
-
if (x=="-b" or x=="-m" or x=="
|
76
|
+
if (x=="-b" or x=="-m" or x=="--socket")
|
76
77
|
excludeParam = true
|
77
78
|
next
|
78
79
|
end
|
@@ -80,44 +81,51 @@ module Cxxproject
|
|
80
81
|
excludeParam = false
|
81
82
|
next
|
82
83
|
end
|
84
|
+
if x.length > 0
|
85
|
+
if x[0] == "-"
|
86
|
+
wasMinus = true
|
87
|
+
else
|
88
|
+
next if not wasMinus
|
89
|
+
wasMinus = false
|
90
|
+
end
|
91
|
+
end
|
83
92
|
passedParams << x
|
84
93
|
end
|
85
94
|
|
86
95
|
if @options.socket != 0
|
87
|
-
|
96
|
+
Bake::IDEInterface.instance.connect(@options.socket)
|
88
97
|
end
|
89
98
|
|
90
99
|
msg1 = "* bakery "
|
91
100
|
|
92
|
-
ExitHelper.enable_exit_test
|
93
|
-
|
94
101
|
exitValue = 0
|
95
102
|
abort = false
|
96
103
|
@toBuild.each do |bp|
|
97
104
|
currentRun += 1
|
98
105
|
p = File.dirname(bp.proj)
|
99
|
-
|
106
|
+
pRel = File.rel_from_to_project(Dir.pwd, p, false)
|
107
|
+
pRel = "." if pRel.empty?
|
108
|
+
cmd = (["-m", pRel, "-b", bp.conf] + passedParams)
|
100
109
|
cmdWithNum = "* bakery #{currentRun} of #{maxRuns}: bake " + cmd.join(" ") + " *"
|
101
|
-
|
102
|
-
|
103
|
-
|
110
|
+
puts "\n************************************************";
|
111
|
+
Bake.formatter.printInfo(cmdWithNum)
|
112
|
+
puts "************************************************";
|
113
|
+
|
104
114
|
|
105
|
-
runOk =
|
115
|
+
runOk = false
|
106
116
|
begin
|
107
|
-
|
108
|
-
|
109
|
-
tocxx = ToCxx.new
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
end
|
117
|
+
Bake.options = Options.new(cmd)
|
118
|
+
Bake.options.parse_options
|
119
|
+
tocxx = ToCxx.new
|
120
|
+
tocxx.doit()
|
121
|
+
runOk = (ExitHelper.exit_code == 0)
|
122
|
+
rescue SystemExit
|
123
|
+
runOk = (ExitHelper.exit_code == 0)
|
115
124
|
rescue Exception => e
|
116
|
-
puts e.message
|
117
|
-
runOk = false
|
125
|
+
puts e.message
|
118
126
|
end
|
119
127
|
|
120
|
-
|
128
|
+
Bake::cleanup
|
121
129
|
ExitHelper.reset_exit_code
|
122
130
|
|
123
131
|
if runOk == false
|
@@ -150,18 +158,17 @@ module Cxxproject
|
|
150
158
|
msg1.length.times { stars << "*" }
|
151
159
|
|
152
160
|
if failedRuns == 0
|
153
|
-
|
154
|
-
|
155
|
-
|
161
|
+
Bake.formatter.printSuccess(stars)
|
162
|
+
Bake.formatter.printSuccess(msg1)
|
163
|
+
Bake.formatter.printSuccess(stars)
|
156
164
|
else
|
157
|
-
|
158
|
-
|
159
|
-
|
165
|
+
Bake.formatter.printError(stars)
|
166
|
+
Bake.formatter.printError(msg1)
|
167
|
+
Bake.formatter.printError(stars)
|
160
168
|
end
|
161
169
|
|
162
|
-
|
170
|
+
Bake::IDEInterface.instance.disconnect()
|
163
171
|
|
164
|
-
ExitHelper.disable_exit_test
|
165
172
|
ExitHelper.exit(exitValue)
|
166
173
|
end
|
167
174
|
|
data/bin/createVSProjects
CHANGED
@@ -3,11 +3,11 @@ $:.unshift(File.dirname(__FILE__)+"/../lib")
|
|
3
3
|
|
4
4
|
require "securerandom"
|
5
5
|
require "vs/options"
|
6
|
-
require '
|
6
|
+
require 'common/version'
|
7
7
|
|
8
|
-
puts "-- bake #{
|
8
|
+
puts "-- bake #{Bake::Version.number}, ruby #{RUBY_VERSION}p#{RUBY_PATCHLEVEL}, platform #{RUBY_PLATFORM} --"
|
9
9
|
|
10
|
-
module
|
10
|
+
module Bake
|
11
11
|
|
12
12
|
PATH = 0
|
13
13
|
UUID = 1
|
data/doc/cmd/install.html
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
<body>
|
16
16
|
<h1>How to install bake command line tool</h1>
|
17
17
|
|
18
|
-
bake is a ruby gem. It runs with ruby 1.
|
18
|
+
bake is a ruby gem. It runs with ruby 1.9 and above.
|
19
19
|
<p>
|
20
20
|
bake and its depedencies can be found on rubygems, which is configured as ruby source per default. Type "gem sources" if you wish to check that.<br>
|
21
21
|
Installing bake is very easy:
|
@@ -29,14 +29,12 @@ This is how the installation could look like:
|
|
29
29
|
Fetching: highline-1.6.15.gem (100%)
|
30
30
|
Fetching: colored-1.2.gem (100%)
|
31
31
|
Fetching: progressbar-0.11.0.gem (100%)
|
32
|
-
Fetching: cxxproject-0.5.59.gem (100%)
|
33
32
|
Fetching: rgen-0.6.0.gem (100%)
|
34
33
|
Fetching: rtext-0.2.0.gem (100%)
|
35
34
|
Fetching: bake-toolkit-1.0.2.gem (100%)
|
36
35
|
Successfully installed highline-1.6.15
|
37
36
|
Successfully installed colored-1.2
|
38
37
|
Successfully installed progressbar-0.11.0
|
39
|
-
Successfully installed cxxproject-0.5.59
|
40
38
|
Successfully installed rgen-0.6.0
|
41
39
|
Successfully installed rtext-0.2.0
|
42
40
|
Successfully installed bake-toolkit-1.0.2
|
@@ -44,14 +42,12 @@ Successfully installed bake-toolkit-1.0.2
|
|
44
42
|
Installing ri documentation for highline-1.6.15...
|
45
43
|
Installing ri documentation for colored-1.2...
|
46
44
|
Installing ri documentation for progressbar-0.11.0...
|
47
|
-
Installing ri documentation for cxxproject-0.5.59...
|
48
45
|
Installing ri documentation for rgen-0.6.0...
|
49
46
|
Installing ri documentation for rtext-0.2.0...
|
50
47
|
Installing ri documentation for bake-toolkit-1.0.2...
|
51
48
|
Installing RDoc documentation for highline-1.6.15...
|
52
49
|
Installing RDoc documentation for colored-1.2...
|
53
50
|
Installing RDoc documentation for progressbar-0.11.0...
|
54
|
-
Installing RDoc documentation for cxxproject-0.5.59...
|
55
51
|
Installing RDoc documentation for rgen-0.6.0...
|
56
52
|
Installing RDoc documentation for rtext-0.2.0...
|
57
53
|
Installing RDoc documentation for bake-toolkit-1.0.2...</code></pre>
|
data/doc/cmd/usecmd.html
CHANGED
@@ -20,7 +20,8 @@ The most important options are:
|
|
20
20
|
<ul>
|
21
21
|
<li><b>-b</b> the build configuration name
|
22
22
|
<li><b>-m</b> the main project directory (default is current directory)
|
23
|
-
<li><b>-p</b> the project to build (if not specified, the main project will be built with all dependencies)
|
23
|
+
<li><b>-p</b> the project to build (if not specified, the main project will be built with all dependencies) - note, that ALL configs of the project will be built,
|
24
|
+
which is usually just one config, but if you have more than one config of the project in the workspace, use a comma separator.
|
24
25
|
</ul>
|
25
26
|
|
26
27
|
<h2>Examples</h2>
|
@@ -29,22 +30,45 @@ If you want to build your application, switch to the directory of the main proje
|
|
29
30
|
|
30
31
|
<pre id="rundrum"><code>bake -b Debug</code></pre>
|
31
32
|
|
33
|
+
It is possible to omit "-b":
|
34
|
+
|
35
|
+
<pre id="rundrum"><code>bake Debug</code></pre>
|
36
|
+
|
37
|
+
It Debug is the default configuration, it's just:
|
38
|
+
|
39
|
+
<pre id="rundrum"><code>bake</code></pre>
|
40
|
+
|
32
41
|
If you are not in the directory of the main project you want to build:
|
33
42
|
|
34
|
-
<pre id="rundrum"><code>bake
|
43
|
+
<pre id="rundrum"><code>bake Debug -m w:/root/mainProj</code></pre>
|
44
|
+
|
45
|
+
Building just mainProj project:
|
46
|
+
|
47
|
+
<pre id="rundrum"><code>bake Debug -m w:/root1/myProj -p myProj</code></pre>
|
48
|
+
|
49
|
+
Assuming mainProj has several configs really included in the build (which is uncommon), you can choose one of the configs like this:
|
50
|
+
|
51
|
+
<pre id="rundrum"><code>bake Debug -m w:/root1/myProj -p myProj,abc</code></pre>
|
35
52
|
|
36
53
|
Code has been checked out into two roots, the console supports ansi colors, you want to stop on first error and build only the project bspAbc:
|
37
54
|
|
38
|
-
<pre id="rundrum"><code>bake
|
55
|
+
<pre id="rundrum"><code>bake Debug -m w:/root1/myProj -w w:/root1 -w w:/root2 -r -a black -p bspAbc</code></pre>
|
56
|
+
|
57
|
+
To clean the project(s), just add "-c":
|
58
|
+
|
59
|
+
<pre id="rundrum"><code>bake Debug -m w:/root1/myProj -w w:/root1 -w w:/root2 -r -a black -p bspAbc -c</code></pre>
|
60
|
+
|
61
|
+
To build single file(s), use "-f". All files matching this pattern will be compiled (no wildcards allowed):
|
39
62
|
|
40
|
-
|
63
|
+
<pre id="rundrum"><code>bake Debug -p bspAbc -f main.cpp
|
64
|
+
bake Debug -f .asm</code></pre>
|
41
65
|
|
42
66
|
<h2>roots.bake</h2>
|
43
67
|
|
44
68
|
Workspace roots can be defined in a file called "roots.bake", which will be searched from main project directory to root folder. Example:
|
45
69
|
|
46
70
|
<pre id="rundrum"><code>../..
|
47
|
-
C:/another/root
|
71
|
+
C:/another/root # comments written like this
|
48
72
|
something/else</code></pre>
|
49
73
|
|
50
74
|
If -w and roots.bake are not specified, the default workspace root is the parent directory of the main project.
|
data/doc/dyk/lint.html
CHANGED
@@ -25,7 +25,7 @@ Example:
|
|
25
25
|
<pre id="rundrum"><code>bake Debug -p MyLibraryProject --lint</code></pre>
|
26
26
|
|
27
27
|
<h3>How does it work</h3>
|
28
|
-
You can lint LibraryConfigs, ExecutableConfigs
|
28
|
+
You can lint LibraryConfigs, ExecutableConfigs, single files and the complete workspace (in this case the projects are linted separately). The CPP Toolchain settings
|
29
29
|
of the project are used regardless of the file type and file specific options.
|
30
30
|
|
31
31
|
It is possible to specify lnt-files with LintPolicy, but you can add every other lint command line option as well.<br>
|
@@ -36,15 +36,32 @@ A possible approach is to add global Lint policies in the DefaultToolchain like
|
|
36
36
|
LintPolicy "$(ProjectDir)/lint/suppressions.lnt"
|
37
37
|
}</code></pre>
|
38
38
|
|
39
|
+
<h3>How to start for GCC</h3>
|
40
|
+
Lint will fail if compiler internal includes and defines are missing. Therefore lint comes with some helper files.
|
41
|
+
For GCC, follow the steps below.<br>
|
42
|
+
First extract the compiler includes and defines:
|
43
|
+
<pre id="rundrum"><code>make -f .../PcLint/../lnt/co-gcc.mak</code></pre>
|
44
|
+
You will get some lnt files: gcc-include-path.lnt, lint_cmac.h, lint_cppmac.h and size-options.lnt.<br>
|
45
|
+
Write a lnt file with the following content:
|
46
|
+
<pre id="rundrum"><code>-i".../PcLint/.../lnt"
|
47
|
+
-i"...pathToTheLntFilesExtractedAbove"
|
48
|
+
gcc-include-path.lnt
|
49
|
+
.../PcLint/.../lnt/co-gcc.lnt</code></pre>
|
50
|
+
Afterwards you can test lint directly without bake like this:
|
51
|
+
<pre id="rundrum"><code>lint-nt your.lnt test.cpp</code></pre>
|
52
|
+
To use in bake, add a LintPolicy in Project.meta:
|
53
|
+
<pre id="rundrum"><code>LintPolicy ".../your.lnt"</code></pre>
|
54
|
+
|
55
|
+
|
39
56
|
<h3>Notes</h3>
|
40
57
|
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
58
|
<pre id="rundrum"><code>bake Debug -p MyLibraryProject --lint --lint_max 50 (lints the first 51 files)
|
42
59
|
bake Debug -p MyLibraryProject --lint --lint_min 51 --lint_max 100 (lints the next 50 files)
|
43
60
|
bake Debug -p MyLibraryProject --lint --lint_min 101 (lints the rest of the files)</code></pre>
|
44
61
|
<p>
|
45
|
-
|
46
|
-
|
47
|
-
|
62
|
+
Currently the lint output is buffered and not shown before lint has finished a project. The reason is the implementation of the error parser. This will change in future.
|
63
|
+
<p>
|
64
|
+
If you have another lint command than lint-nt.exe, use an alias.
|
48
65
|
</body>
|
49
66
|
|
50
67
|
</html>
|
data/doc/dyk/tipps.html
CHANGED
@@ -40,12 +40,6 @@ It is possible to use symlinks (Linux) or junctions (Windows) when working with
|
|
40
40
|
<li>To sync/commit from/to svn, use the original directories created by git.
|
41
41
|
</ul>
|
42
42
|
|
43
|
-
<h3>Single file</h3>
|
44
|
-
If you want to build a single file, you have to specify it like that:
|
45
|
-
<pre id="rundrum"><code>bake -b Debug -f src/abc/MyFile.cpp</pre></code>
|
46
|
-
No need to type so much! If it's not ambiguous, it's enough to specify parts of the filename like this:
|
47
|
-
<pre id="rundrum"><code>bake -b Debug -f abc/MyFile.cpp
|
48
|
-
bake -b Debug -f MyFile.cpp</code></pre>
|
49
43
|
</body>
|
50
44
|
|
51
45
|
</html>
|