bake-toolkit 2.18.0 → 2.19.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/documentation/_build/html/_sources/changelog.txt +5 -0
- data/documentation/_build/html/_sources/index.txt +1 -1
- data/documentation/_build/html/_sources/quickstart/quickstart.txt +5 -5
- data/documentation/_build/html/_sources/syntax/variable_substitutions.txt +15 -15
- data/documentation/_build/html/_sources/tips_and_tricks/how_to_use_bake_with_cygwin.txt +20 -7
- data/documentation/_build/html/_static/basic.css +598 -598
- data/documentation/_build/html/_static/bootstrap-2.3.2/css/bootstrap-responsive.css +1109 -1109
- data/documentation/_build/html/_static/bootstrap-2.3.2/css/bootstrap-responsive.min.css +9 -9
- data/documentation/_build/html/_static/bootstrap-2.3.2/css/bootstrap.css +6167 -6167
- data/documentation/_build/html/_static/bootstrap-2.3.2/css/bootstrap.min.css +9 -9
- data/documentation/_build/html/_static/bootstrap-2.3.2/js/bootstrap.js +2287 -2287
- data/documentation/_build/html/_static/bootstrap-2.3.2/js/bootstrap.min.js +5 -5
- data/documentation/_build/html/_static/bootstrap-3.3.4/css/bootstrap-theme.css +476 -476
- data/documentation/_build/html/_static/bootstrap-3.3.4/css/bootstrap-theme.min.css +4 -4
- data/documentation/_build/html/_static/bootstrap-3.3.4/css/bootstrap.css +6584 -6584
- data/documentation/_build/html/_static/bootstrap-3.3.4/css/bootstrap.min.css +4 -4
- data/documentation/_build/html/_static/bootstrap-3.3.4/fonts/glyphicons-halflings-regular.svg +287 -287
- data/documentation/_build/html/_static/bootstrap-3.3.4/js/bootstrap.js +2317 -2317
- data/documentation/_build/html/_static/bootstrap-3.3.4/js/bootstrap.min.js +6 -6
- data/documentation/_build/html/_static/bootstrap-3.3.4/js/npm.js +12 -12
- data/documentation/_build/html/_static/bootstrap-sphinx.css +186 -186
- data/documentation/_build/html/_static/bootstrap-sphinx.js +161 -161
- data/documentation/_build/html/_static/bootswatch-2.3.2/amelia/bootstrap.min.css +9 -9
- data/documentation/_build/html/_static/bootswatch-2.3.2/cerulean/bootstrap.min.css +9 -9
- data/documentation/_build/html/_static/bootswatch-2.3.2/cosmo/bootstrap.min.css +9 -9
- data/documentation/_build/html/_static/bootswatch-2.3.2/cyborg/bootstrap.min.css +9 -9
- data/documentation/_build/html/_static/bootswatch-2.3.2/flatly/bootstrap.min.css +9 -9
- data/documentation/_build/html/_static/bootswatch-2.3.2/journal/bootstrap.min.css +9 -9
- data/documentation/_build/html/_static/bootswatch-2.3.2/readable/bootstrap.min.css +9 -9
- data/documentation/_build/html/_static/bootswatch-2.3.2/simplex/bootstrap.min.css +9 -9
- data/documentation/_build/html/_static/bootswatch-2.3.2/slate/bootstrap.min.css +9 -9
- data/documentation/_build/html/_static/bootswatch-2.3.2/spacelab/bootstrap.min.css +9 -9
- data/documentation/_build/html/_static/bootswatch-2.3.2/spruce/bootstrap.min.css +9 -9
- data/documentation/_build/html/_static/bootswatch-2.3.2/superhero/bootstrap.min.css +9 -9
- data/documentation/_build/html/_static/bootswatch-2.3.2/united/bootstrap.min.css +9 -9
- data/documentation/_build/html/_static/bootswatch-3.3.4/cerulean/bootstrap.min.css +6 -6
- data/documentation/_build/html/_static/bootswatch-3.3.4/cosmo/bootstrap.min.css +6 -6
- data/documentation/_build/html/_static/bootswatch-3.3.4/custom/bootstrap.min.css +6 -6
- data/documentation/_build/html/_static/bootswatch-3.3.4/cyborg/bootstrap.min.css +6 -6
- data/documentation/_build/html/_static/bootswatch-3.3.4/darkly/bootstrap.min.css +6 -6
- data/documentation/_build/html/_static/bootswatch-3.3.4/flatly/bootstrap.min.css +6 -6
- data/documentation/_build/html/_static/bootswatch-3.3.4/fonts/glyphicons-halflings-regular.svg +287 -287
- data/documentation/_build/html/_static/bootswatch-3.3.4/journal/bootstrap.min.css +6 -6
- data/documentation/_build/html/_static/bootswatch-3.3.4/lumen/bootstrap.min.css +6 -6
- data/documentation/_build/html/_static/bootswatch-3.3.4/paper/bootstrap.min.css +6 -6
- data/documentation/_build/html/_static/bootswatch-3.3.4/readable/bootstrap.min.css +6 -6
- data/documentation/_build/html/_static/bootswatch-3.3.4/sandstone/bootstrap.min.css +6 -6
- data/documentation/_build/html/_static/bootswatch-3.3.4/simplex/bootstrap.min.css +6 -6
- data/documentation/_build/html/_static/bootswatch-3.3.4/slate/bootstrap.min.css +6 -6
- data/documentation/_build/html/_static/bootswatch-3.3.4/spacelab/bootstrap.min.css +6 -6
- data/documentation/_build/html/_static/bootswatch-3.3.4/superhero/bootstrap.min.css +6 -6
- data/documentation/_build/html/_static/bootswatch-3.3.4/united/bootstrap.min.css +6 -6
- data/documentation/_build/html/_static/bootswatch-3.3.4/yeti/bootstrap.min.css +6 -6
- data/documentation/_build/html/_static/doctools.js +263 -263
- data/documentation/_build/html/_static/jquery-1.11.1.js +10308 -10308
- data/documentation/_build/html/_static/jquery.js +4 -4
- data/documentation/_build/html/_static/js/jquery-1.11.0.min.js +4 -4
- data/documentation/_build/html/_static/js/jquery-fix.js +1 -1
- data/documentation/_build/html/_static/searchtools.js +621 -621
- data/documentation/_build/html/_static/underscore-1.3.1.js +999 -999
- data/documentation/_build/html/_static/underscore.js +31 -31
- data/documentation/_build/html/_static/websupport.js +808 -808
- data/documentation/_build/html/changelog.html +944 -937
- data/documentation/_build/html/commandline/commandline.html +284 -284
- data/documentation/_build/html/concepts/concepts.html +186 -186
- data/documentation/_build/html/concepts/link_order.html +245 -245
- data/documentation/_build/html/concepts/the_main_project.html +260 -260
- data/documentation/_build/html/concepts/the_project_meta_file.html +288 -288
- data/documentation/_build/html/genindex.html +152 -152
- data/documentation/_build/html/ide/eclipse/eclipse.html +186 -186
- data/documentation/_build/html/ide/eclipse/how_to_convert_existing_cdt_workspace.html +208 -208
- data/documentation/_build/html/ide/eclipse/how_to_create_a_new_project_in_eclipse.html +191 -191
- data/documentation/_build/html/ide/eclipse/how_to_create_a_workspace_in_eclipse.html +198 -198
- data/documentation/_build/html/ide/eclipse/how_to_debug_in_eclipse.html +198 -198
- data/documentation/_build/html/ide/eclipse/how_to_install_eclipse_plugin.html +196 -196
- data/documentation/_build/html/ide/eclipse/how_to_use_bake_in_eclipse.html +256 -256
- data/documentation/_build/html/ide/ide_integrations.html +183 -183
- data/documentation/_build/html/ide/vs/how_to_create_vs_projects.html +171 -171
- data/documentation/_build/html/ide/vs/how_to_debug_in_vs.html +185 -185
- data/documentation/_build/html/ide/vs/how_to_used_bake_in_vs.html +190 -190
- data/documentation/_build/html/ide/vs/vs.html +170 -170
- data/documentation/_build/html/ide/vs/vs_install.html +202 -202
- data/documentation/_build/html/index.html +241 -241
- data/documentation/_build/html/install/install_bake.html +279 -279
- data/documentation/_build/html/internal.html +217 -217
- data/documentation/_build/html/known_issues.html +175 -175
- data/documentation/_build/html/license.html +236 -236
- data/documentation/_build/html/performance/performance.html +373 -373
- data/documentation/_build/html/quickstart/quickstart.html +236 -236
- data/documentation/_build/html/search.html +174 -174
- data/documentation/_build/html/searchindex.js +1 -1
- data/documentation/_build/html/syntax/adapt_configs.html +286 -286
- data/documentation/_build/html/syntax/derive_configs.html +247 -247
- data/documentation/_build/html/syntax/project_meta_syntax.html +893 -893
- data/documentation/_build/html/syntax/syntax.html +189 -189
- data/documentation/_build/html/syntax/variable_substitutions.html +378 -378
- data/documentation/_build/html/tips_and_tricks/bundle.html +180 -180
- data/documentation/_build/html/tips_and_tricks/how_to_use_bake_with_cygwin.html +214 -203
- data/documentation/_build/html/tips_and_tricks/static_code_analysis.html +284 -284
- data/documentation/_build/html/tips_and_tricks/the_bakery.html +405 -405
- data/documentation/_build/html/tips_and_tricks/the_clang.html +201 -201
- data/documentation/_build/html/tips_and_tricks/tips_and_tricks.html +197 -197
- data/documentation/_build/html/why_bake/why_bake.html +241 -241
- data/lib/bake/subst.rb +40 -40
- data/lib/bake/toolchain/diab.rb +53 -53
- data/lib/bake/toolchain/gcc.rb +48 -48
- data/lib/bake/toolchain/gcc_env.rb +52 -52
- data/lib/bake/toolchain/msvc.rb +57 -57
- data/lib/blocks/block.rb +78 -63
- data/lib/blocks/blockBase.rb +33 -33
- data/lib/common/version.rb +2 -2
- metadata +4 -38
- data/documentation/_build/html/_images/logo_conformant_1024.png +0 -0
- data/documentation/_build/html/_images/logo_conformant_48.png +0 -0
- data/documentation/_build/html/_sources/concepts/build_hierarchy.txt +0 -34
- data/documentation/_build/html/_static/agogo.css +0 -509
- data/documentation/_build/html/_static/background_b01.png +0 -0
- data/documentation/_build/html/_static/bgfooter.png +0 -0
- data/documentation/_build/html/_static/bgtop.png +0 -0
- data/documentation/_build/html/_static/bizstyle.css +0 -490
- data/documentation/_build/html/_static/bizstyle.js +0 -41
- data/documentation/_build/html/_static/css/badge_only.css +0 -2
- data/documentation/_build/html/_static/css/theme.css +0 -5
- data/documentation/_build/html/_static/css3-mediaqueries.js +0 -1
- data/documentation/_build/html/_static/css3-mediaqueries_src.js +0 -1104
- data/documentation/_build/html/_static/debugEclipse/app.png +0 -0
- data/documentation/_build/html/_static/debugEclipse/debug.png +0 -0
- data/documentation/_build/html/_static/debugEclipse/flag.png +0 -0
- data/documentation/_build/html/_static/debugEclipse/map.png +0 -0
- data/documentation/_build/html/_static/debugEclipse/path.png +0 -0
- data/documentation/_build/html/_static/fonts/Inconsolata-Bold.ttf +0 -0
- data/documentation/_build/html/_static/fonts/Inconsolata.ttf +0 -0
- data/documentation/_build/html/_static/fonts/Lato-Bold.ttf +0 -0
- data/documentation/_build/html/_static/fonts/Lato-Regular.ttf +0 -0
- data/documentation/_build/html/_static/fonts/RobotoSlab-Bold.ttf +0 -0
- data/documentation/_build/html/_static/fonts/RobotoSlab-Regular.ttf +0 -0
- data/documentation/_build/html/_static/fonts/fontawesome-webfont.eot +0 -0
- data/documentation/_build/html/_static/fonts/fontawesome-webfont.svg +0 -414
- data/documentation/_build/html/_static/fonts/fontawesome-webfont.ttf +0 -0
- data/documentation/_build/html/_static/fonts/fontawesome-webfont.woff +0 -0
- data/documentation/_build/html/_static/js/modernizr.min.js +0 -4
- data/documentation/_build/html/_static/js/theme.js +0 -113
- data/documentation/_build/html/_static/logo_conformant_1024.png +0 -0
- data/documentation/_build/html/_static/logo_conformant_24.png +0 -0
- data/documentation/_build/html/_static/logo_conformant_256.png +0 -0
- data/documentation/_build/html/concepts/build_hierarchy.html +0 -205
data/lib/bake/toolchain/msvc.rb
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
require 'common/utils'
|
|
2
|
-
require 'bake/toolchain/provider'
|
|
3
|
-
require 'bake/toolchain/errorparser/error_parser'
|
|
4
|
-
require 'bake/toolchain/errorparser/msvc_compiler_error_parser'
|
|
5
|
-
require 'bake/toolchain/errorparser/msvc_linker_error_parser'
|
|
6
|
-
|
|
7
|
-
module Bake
|
|
8
|
-
module Toolchain
|
|
9
|
-
|
|
10
|
-
MSVCChain = Provider.add("MSVC")
|
|
11
|
-
|
|
12
|
-
MSVCChain[:COMPILER][:CPP].update({
|
|
13
|
-
:COMMAND => "cl",
|
|
14
|
-
:DEFINE_FLAG => "-D",
|
|
15
|
-
:OBJECT_FILE_FLAG => "-Fo",
|
|
1
|
+
require 'common/utils'
|
|
2
|
+
require 'bake/toolchain/provider'
|
|
3
|
+
require 'bake/toolchain/errorparser/error_parser'
|
|
4
|
+
require 'bake/toolchain/errorparser/msvc_compiler_error_parser'
|
|
5
|
+
require 'bake/toolchain/errorparser/msvc_linker_error_parser'
|
|
6
|
+
|
|
7
|
+
module Bake
|
|
8
|
+
module Toolchain
|
|
9
|
+
|
|
10
|
+
MSVCChain = Provider.add("MSVC")
|
|
11
|
+
|
|
12
|
+
MSVCChain[:COMPILER][:CPP].update({
|
|
13
|
+
:COMMAND => "cl",
|
|
14
|
+
:DEFINE_FLAG => "-D",
|
|
15
|
+
:OBJECT_FILE_FLAG => "-Fo",
|
|
16
16
|
:OBJ_FLAG_SPACE => false,
|
|
17
|
-
:INCLUDE_PATH_FLAG => "-I",
|
|
18
|
-
:COMPILE_FLAGS => "-c -EHsc $(MSVC_FORCE_SYNC_PDB_WRITES)",
|
|
19
|
-
:DEP_FLAGS_FILENAME => false,
|
|
20
|
-
:DEP_FLAGS => "-showIncludes",
|
|
21
|
-
:DEP_FLAGS_SPACE => true,
|
|
22
|
-
:PREPRO_FLAGS => "-P",
|
|
23
|
-
:PREPRO_FILE_FLAG => "-Fi"
|
|
24
|
-
})
|
|
25
|
-
|
|
26
|
-
MSVCChain[:COMPILER][:C] = Utils.deep_copy(MSVCChain[:COMPILER][:CPP])
|
|
27
|
-
MSVCChain[:COMPILER][:C][:SOURCE_FILE_ENDINGS] = Provider.default[:COMPILER][:C][:SOURCE_FILE_ENDINGS]
|
|
28
|
-
|
|
29
|
-
MSVCChain[:COMPILER][:ASM] = Utils.deep_copy(MSVCChain[:COMPILER][:C])
|
|
30
|
-
MSVCChain[:COMPILER][:ASM][:COMMAND] = "ml"
|
|
31
|
-
MSVCChain[:COMPILER][:ASM][:COMPILE_FLAGS] = "-c $(MSVC_FORCE_SYNC_PDB_WRITES)"
|
|
32
|
-
MSVCChain[:COMPILER][:ASM][:SOURCE_FILE_ENDINGS] = Provider.default[:COMPILER][:ASM][:SOURCE_FILE_ENDINGS]
|
|
33
|
-
|
|
34
|
-
MSVCChain[:ARCHIVER][:COMMAND] = "lib"
|
|
35
|
-
MSVCChain[:ARCHIVER][:ARCHIVE_FLAGS] = "-out:"
|
|
36
|
-
MSVCChain[:ARCHIVER][:ARCHIVE_FLAGS_SPACE] = false
|
|
37
|
-
|
|
38
|
-
MSVCChain[:LINKER][:COMMAND] = "link"
|
|
39
|
-
MSVCChain[:LINKER][:USER_LIB_FLAG] = ""
|
|
40
|
-
MSVCChain[:LINKER][:EXE_FLAG] = "-out:"
|
|
41
|
-
MSVCChain[:LINKER][:EXE_FLAG_SPACE] = false
|
|
42
|
-
MSVCChain[:LINKER][:LIB_FLAG] = ""
|
|
43
|
-
MSVCChain[:LINKER][:LIB_PATH_FLAG] = "-libpath:"
|
|
44
|
-
MSVCChain[:LINKER][:MAP_FILE_FLAG] = "-map:"
|
|
45
|
-
MSVCChain[:LINKER][:MAP_FILE_PIPE] = false
|
|
46
|
-
MSVCChain[:LINKER][:SCRIPT] = "Linkerscript option not supported for MSVC"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
msvcCompilerErrorParser = MSVCCompilerErrorParser.new
|
|
50
|
-
MSVCChain[:COMPILER][:C][:ERROR_PARSER] = msvcCompilerErrorParser
|
|
51
|
-
MSVCChain[:COMPILER][:CPP][:ERROR_PARSER] = msvcCompilerErrorParser
|
|
52
|
-
MSVCChain[:COMPILER][:ASM][:ERROR_PARSER] = msvcCompilerErrorParser
|
|
53
|
-
MSVCChain[:ARCHIVER][:ERROR_PARSER] = msvcCompilerErrorParser
|
|
54
|
-
MSVCChain[:LINKER][:ERROR_PARSER] = MSVCLinkerErrorParser.new
|
|
55
|
-
|
|
56
|
-
end
|
|
57
|
-
end
|
|
58
|
-
|
|
17
|
+
:INCLUDE_PATH_FLAG => "-I",
|
|
18
|
+
:COMPILE_FLAGS => "-c -EHsc $(MSVC_FORCE_SYNC_PDB_WRITES)",
|
|
19
|
+
:DEP_FLAGS_FILENAME => false,
|
|
20
|
+
:DEP_FLAGS => "-showIncludes",
|
|
21
|
+
:DEP_FLAGS_SPACE => true,
|
|
22
|
+
:PREPRO_FLAGS => "-P",
|
|
23
|
+
:PREPRO_FILE_FLAG => "-Fi"
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
MSVCChain[:COMPILER][:C] = Utils.deep_copy(MSVCChain[:COMPILER][:CPP])
|
|
27
|
+
MSVCChain[:COMPILER][:C][:SOURCE_FILE_ENDINGS] = Provider.default[:COMPILER][:C][:SOURCE_FILE_ENDINGS]
|
|
28
|
+
|
|
29
|
+
MSVCChain[:COMPILER][:ASM] = Utils.deep_copy(MSVCChain[:COMPILER][:C])
|
|
30
|
+
MSVCChain[:COMPILER][:ASM][:COMMAND] = "ml"
|
|
31
|
+
MSVCChain[:COMPILER][:ASM][:COMPILE_FLAGS] = "-c $(MSVC_FORCE_SYNC_PDB_WRITES)"
|
|
32
|
+
MSVCChain[:COMPILER][:ASM][:SOURCE_FILE_ENDINGS] = Provider.default[:COMPILER][:ASM][:SOURCE_FILE_ENDINGS]
|
|
33
|
+
|
|
34
|
+
MSVCChain[:ARCHIVER][:COMMAND] = "lib"
|
|
35
|
+
MSVCChain[:ARCHIVER][:ARCHIVE_FLAGS] = "-out:"
|
|
36
|
+
MSVCChain[:ARCHIVER][:ARCHIVE_FLAGS_SPACE] = false
|
|
37
|
+
|
|
38
|
+
MSVCChain[:LINKER][:COMMAND] = "link"
|
|
39
|
+
MSVCChain[:LINKER][:USER_LIB_FLAG] = ""
|
|
40
|
+
MSVCChain[:LINKER][:EXE_FLAG] = "-out:"
|
|
41
|
+
MSVCChain[:LINKER][:EXE_FLAG_SPACE] = false
|
|
42
|
+
MSVCChain[:LINKER][:LIB_FLAG] = ""
|
|
43
|
+
MSVCChain[:LINKER][:LIB_PATH_FLAG] = "-libpath:"
|
|
44
|
+
MSVCChain[:LINKER][:MAP_FILE_FLAG] = "-map:"
|
|
45
|
+
MSVCChain[:LINKER][:MAP_FILE_PIPE] = false
|
|
46
|
+
MSVCChain[:LINKER][:SCRIPT] = "Linkerscript option not supported for MSVC"
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
msvcCompilerErrorParser = MSVCCompilerErrorParser.new
|
|
50
|
+
MSVCChain[:COMPILER][:C][:ERROR_PARSER] = msvcCompilerErrorParser
|
|
51
|
+
MSVCChain[:COMPILER][:CPP][:ERROR_PARSER] = msvcCompilerErrorParser
|
|
52
|
+
MSVCChain[:COMPILER][:ASM][:ERROR_PARSER] = msvcCompilerErrorParser
|
|
53
|
+
MSVCChain[:ARCHIVER][:ERROR_PARSER] = msvcCompilerErrorParser
|
|
54
|
+
MSVCChain[:LINKER][:ERROR_PARSER] = MSVCLinkerErrorParser.new
|
|
55
|
+
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
data/lib/blocks/block.rb
CHANGED
|
@@ -6,7 +6,7 @@ module Bake
|
|
|
6
6
|
BUILD_PASSED = 0
|
|
7
7
|
BUILD_FAILED = 1
|
|
8
8
|
BUILD_ABORTED = 2
|
|
9
|
-
|
|
9
|
+
|
|
10
10
|
module Blocks
|
|
11
11
|
|
|
12
12
|
CC2J = []
|
|
@@ -21,15 +21,15 @@ module Bake
|
|
|
21
21
|
def startupSteps
|
|
22
22
|
@startupSteps ||= []
|
|
23
23
|
end
|
|
24
|
-
|
|
24
|
+
|
|
25
25
|
def preSteps
|
|
26
26
|
@preSteps ||= []
|
|
27
27
|
end
|
|
28
|
-
|
|
28
|
+
|
|
29
29
|
def mainSteps
|
|
30
30
|
@mainSteps ||= []
|
|
31
|
-
end
|
|
32
|
-
|
|
31
|
+
end
|
|
32
|
+
|
|
33
33
|
def postSteps
|
|
34
34
|
@postSteps ||= []
|
|
35
35
|
end
|
|
@@ -37,7 +37,7 @@ module Bake
|
|
|
37
37
|
def exitSteps
|
|
38
38
|
@exitSteps ||= []
|
|
39
39
|
end
|
|
40
|
-
|
|
40
|
+
|
|
41
41
|
def dependencies
|
|
42
42
|
@dependencies ||= []
|
|
43
43
|
end
|
|
@@ -45,15 +45,15 @@ module Bake
|
|
|
45
45
|
def childs
|
|
46
46
|
@childs ||= []
|
|
47
47
|
end
|
|
48
|
-
|
|
48
|
+
|
|
49
49
|
def parents
|
|
50
50
|
@parents ||= []
|
|
51
51
|
end
|
|
52
|
-
|
|
52
|
+
|
|
53
53
|
def set_library(library)
|
|
54
54
|
@library = library
|
|
55
55
|
end
|
|
56
|
-
|
|
56
|
+
|
|
57
57
|
def initialize(config, referencedConfigs)
|
|
58
58
|
@inDeps = false
|
|
59
59
|
@visited = false
|
|
@@ -65,14 +65,14 @@ module Bake
|
|
|
65
65
|
@projectDir = config.get_project_dir
|
|
66
66
|
@@block_counter = 0
|
|
67
67
|
@result = true
|
|
68
|
-
|
|
68
|
+
|
|
69
69
|
@lib_elements = Bake::LibElements.calcLibElements(self)
|
|
70
70
|
end
|
|
71
|
-
|
|
71
|
+
|
|
72
72
|
def getCompileBlocks()
|
|
73
73
|
mainSteps.select { |m| Compile === m }
|
|
74
74
|
end
|
|
75
|
-
|
|
75
|
+
|
|
76
76
|
def convPath(dir, elem=nil, warnIfLocal=false)
|
|
77
77
|
if dir.respond_to?("name")
|
|
78
78
|
d = dir.name
|
|
@@ -80,16 +80,16 @@ module Bake
|
|
|
80
80
|
else
|
|
81
81
|
d = dir
|
|
82
82
|
end
|
|
83
|
-
|
|
83
|
+
|
|
84
84
|
@warnConvValid = false
|
|
85
|
-
|
|
85
|
+
|
|
86
86
|
return d if Bake.options.no_autodir
|
|
87
|
-
|
|
87
|
+
|
|
88
88
|
inc = d.split("/")
|
|
89
89
|
res = nil
|
|
90
90
|
if (inc[0] == @projectName)
|
|
91
91
|
res = inc[1..-1].join("/") # within self
|
|
92
|
-
res = "." if res == ""
|
|
92
|
+
res = "." if res == ""
|
|
93
93
|
elsif @referencedConfigs.include?(inc[0])
|
|
94
94
|
dirOther = @referencedConfigs[inc[0]].first.parent.get_project_dir
|
|
95
95
|
res = File.rel_from_to_project(@projectDir, dirOther, false)
|
|
@@ -110,19 +110,19 @@ module Bake
|
|
|
110
110
|
Bake.formatter.printInfo("\"..\" in path name found", elem)
|
|
111
111
|
end
|
|
112
112
|
end
|
|
113
|
-
|
|
113
|
+
|
|
114
114
|
if res.nil? # relative from self as last resort
|
|
115
115
|
warnIfLocal = false # no path magic -> no warning
|
|
116
|
-
res = d
|
|
116
|
+
res = d
|
|
117
117
|
end
|
|
118
118
|
end
|
|
119
|
-
|
|
119
|
+
|
|
120
120
|
@warnConvValid = File.exists?(@projectDir + "/" + d) if warnIfLocal # only warn if path magic hides local path
|
|
121
|
-
|
|
121
|
+
|
|
122
122
|
res
|
|
123
|
-
end
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
|
|
126
126
|
def self.block_counter
|
|
127
127
|
@@block_counter += 1
|
|
128
128
|
end
|
|
@@ -130,7 +130,7 @@ module Bake
|
|
|
130
130
|
def self.reset_block_counter
|
|
131
131
|
@@block_counter = 0
|
|
132
132
|
end
|
|
133
|
-
|
|
133
|
+
|
|
134
134
|
def self.set_num_projects(num)
|
|
135
135
|
@@num_projects = num
|
|
136
136
|
end
|
|
@@ -150,12 +150,27 @@ module Bake
|
|
|
150
150
|
Bake.formatter.printError("Error: #{ex1.message}")
|
|
151
151
|
puts ex1.backtrace if Bake.options.debug
|
|
152
152
|
end
|
|
153
|
-
end
|
|
154
|
-
|
|
153
|
+
end
|
|
154
|
+
|
|
155
155
|
if Bake::IDEInterface.instance.get_abort
|
|
156
156
|
raise AbortException.new
|
|
157
157
|
end
|
|
158
158
|
|
|
159
|
+
# needed for ctrl-c in Cygwin console
|
|
160
|
+
#####################################
|
|
161
|
+
# additionally, the user has to enable raw mode of Cygwin console: "stty raw".
|
|
162
|
+
# raw mode changes the signals into raw characters.
|
|
163
|
+
# original problem: Cygwin is compiled with broken control handler config,
|
|
164
|
+
# which might not be changed due to backward compatibility.
|
|
165
|
+
# the control handler works only with programs compiled under Cygwin, which is
|
|
166
|
+
# not true for Windows RubyInstaller packages.
|
|
167
|
+
while IO.select([$stdin],nil,nil,0) do
|
|
168
|
+
nextChar = $stdin.sysread(1)
|
|
169
|
+
if nextChar == "\x03"
|
|
170
|
+
raise AbortException.new
|
|
171
|
+
end
|
|
172
|
+
end
|
|
173
|
+
|
|
159
174
|
return @result
|
|
160
175
|
end
|
|
161
176
|
|
|
@@ -167,27 +182,27 @@ module Bake
|
|
|
167
182
|
end
|
|
168
183
|
return depResult
|
|
169
184
|
end
|
|
170
|
-
|
|
185
|
+
|
|
171
186
|
def callSteps(method)
|
|
172
|
-
|
|
187
|
+
|
|
173
188
|
preSteps.each do |step|
|
|
174
189
|
@result = executeStep(step, method) if @result
|
|
175
190
|
return false if not @result and Bake.options.stopOnFirstError
|
|
176
191
|
end
|
|
177
|
-
|
|
192
|
+
|
|
178
193
|
mainSteps.each do |step|
|
|
179
194
|
@result = executeStep(step, method) if @result
|
|
180
195
|
return false if not @result and Bake.options.stopOnFirstError
|
|
181
196
|
end
|
|
182
|
-
|
|
197
|
+
|
|
183
198
|
postSteps.each do |step|
|
|
184
199
|
@result = executeStep(step, method) if @result
|
|
185
200
|
return false if not @result and Bake.options.stopOnFirstError
|
|
186
201
|
end
|
|
187
|
-
|
|
188
|
-
return @result
|
|
202
|
+
|
|
203
|
+
return @result
|
|
189
204
|
end
|
|
190
|
-
|
|
205
|
+
|
|
191
206
|
def execute
|
|
192
207
|
if (@inDeps)
|
|
193
208
|
if Bake.options.verbose >= 1
|
|
@@ -198,16 +213,16 @@ module Bake
|
|
|
198
213
|
|
|
199
214
|
return true if (@visited)
|
|
200
215
|
@visited = true
|
|
201
|
-
|
|
216
|
+
|
|
202
217
|
@inDeps = true
|
|
203
218
|
depResult = callDeps(:execute)
|
|
204
219
|
@inDeps = false
|
|
205
220
|
return false if not depResult and Bake.options.stopOnFirstError
|
|
206
|
-
|
|
221
|
+
|
|
207
222
|
Bake::IDEInterface.instance.set_build_info(@projectName, @configName)
|
|
208
|
-
|
|
223
|
+
|
|
209
224
|
if Bake.options.verbose >= 1
|
|
210
|
-
Bake.formatter.printAdditionalInfo "**** Building #{Block.block_counter} of #{@@num_projects}: #{@projectName} (#{@configName}) ****"
|
|
225
|
+
Bake.formatter.printAdditionalInfo "**** Building #{Block.block_counter} of #{@@num_projects}: #{@projectName} (#{@configName}) ****"
|
|
211
226
|
end
|
|
212
227
|
|
|
213
228
|
@result = callSteps(:execute)
|
|
@@ -220,65 +235,65 @@ module Bake
|
|
|
220
235
|
|
|
221
236
|
depResult = callDeps(:clean)
|
|
222
237
|
return false if not depResult and Bake.options.stopOnFirstError
|
|
223
|
-
|
|
238
|
+
|
|
224
239
|
if Bake.options.verbose >= 2
|
|
225
|
-
Bake.formatter.printAdditionalInfo "**** Cleaning #{Block.block_counter} of #{@@num_projects}: #{@projectName} (#{@configName}) ****"
|
|
240
|
+
Bake.formatter.printAdditionalInfo "**** Cleaning #{Block.block_counter} of #{@@num_projects}: #{@projectName} (#{@configName}) ****"
|
|
226
241
|
end
|
|
227
|
-
|
|
242
|
+
|
|
228
243
|
@result = callSteps(:clean)
|
|
229
|
-
|
|
244
|
+
|
|
230
245
|
if Bake.options.clobber
|
|
231
246
|
Dir.chdir(@projectDir) do
|
|
232
|
-
if File.exist?".bake"
|
|
247
|
+
if File.exist?".bake"
|
|
233
248
|
puts "Deleting folder .bake" if Bake.options.verbose >= 2
|
|
234
249
|
FileUtils.rm_rf(".bake")
|
|
235
250
|
end
|
|
236
|
-
end
|
|
251
|
+
end
|
|
237
252
|
end
|
|
238
|
-
|
|
253
|
+
|
|
239
254
|
return (depResult && @result)
|
|
240
255
|
end
|
|
241
|
-
|
|
256
|
+
|
|
242
257
|
def startup
|
|
243
258
|
return true if (@visited)
|
|
244
259
|
@visited = true
|
|
245
260
|
|
|
246
261
|
depResult = callDeps(:startup)
|
|
247
|
-
|
|
248
|
-
if Bake.options.verbose >= 1 and not startupSteps.empty?
|
|
249
|
-
Bake.formatter.printAdditionalInfo "**** Starting up #{@projectName} (#{@configName}) ****"
|
|
262
|
+
|
|
263
|
+
if Bake.options.verbose >= 1 and not startupSteps.empty?
|
|
264
|
+
Bake.formatter.printAdditionalInfo "**** Starting up #{@projectName} (#{@configName}) ****"
|
|
250
265
|
end
|
|
251
|
-
|
|
266
|
+
|
|
252
267
|
startupSteps.each do |step|
|
|
253
268
|
@result = executeStep(step, :startupStep) && @result
|
|
254
269
|
end
|
|
255
|
-
|
|
270
|
+
|
|
256
271
|
return (depResult && @result)
|
|
257
|
-
end
|
|
272
|
+
end
|
|
258
273
|
|
|
259
274
|
def exits
|
|
260
275
|
return true if (@visited)
|
|
261
276
|
@visited = true
|
|
262
|
-
|
|
277
|
+
|
|
263
278
|
depResult = callDeps(:exits)
|
|
264
|
-
|
|
279
|
+
|
|
265
280
|
if Bake.options.verbose >= 1 and not exitSteps.empty?
|
|
266
|
-
Bake.formatter.printAdditionalInfo "**** Exiting #{@projectName} (#{@configName}) ****"
|
|
281
|
+
Bake.formatter.printAdditionalInfo "**** Exiting #{@projectName} (#{@configName}) ****"
|
|
267
282
|
end
|
|
268
|
-
|
|
283
|
+
|
|
269
284
|
exitSteps.each do |step|
|
|
270
285
|
@result = executeStep(step, :exitStep) && @result
|
|
271
286
|
end
|
|
272
|
-
|
|
287
|
+
|
|
273
288
|
return (depResult && @result)
|
|
274
|
-
end
|
|
289
|
+
end
|
|
290
|
+
|
|
275
291
|
|
|
276
|
-
|
|
277
292
|
end
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
|
|
281
296
|
end
|
|
282
|
-
|
|
283
|
-
|
|
297
|
+
|
|
298
|
+
|
|
284
299
|
end
|
data/lib/blocks/blockBase.rb
CHANGED
|
@@ -2,12 +2,12 @@ require 'bake/bundle'
|
|
|
2
2
|
|
|
3
3
|
module Bake
|
|
4
4
|
module Blocks
|
|
5
|
-
|
|
5
|
+
|
|
6
6
|
class BlockBase
|
|
7
7
|
|
|
8
8
|
attr_reader :tcs
|
|
9
9
|
attr_reader :projectDir
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
def initialize(block, config, referencedConfigs, tcs)
|
|
12
12
|
@block = block
|
|
13
13
|
@config = config
|
|
@@ -16,10 +16,10 @@ module Bake
|
|
|
16
16
|
@projectDir = config.get_project_dir
|
|
17
17
|
@tcs = tcs
|
|
18
18
|
@config_date = Time.now
|
|
19
|
-
|
|
19
|
+
|
|
20
20
|
@printedCmdAlternate = false
|
|
21
21
|
@lastCommand = nil
|
|
22
|
-
|
|
22
|
+
|
|
23
23
|
calcOutputDir
|
|
24
24
|
end
|
|
25
25
|
|
|
@@ -29,17 +29,17 @@ module Bake
|
|
|
29
29
|
FileUtils.touch(@config.file_name)
|
|
30
30
|
rescue Exception=>e
|
|
31
31
|
if Bake.options.verbose >= 2
|
|
32
|
-
Bake.formatter.printWarning("Could not touch #{@config.file_name}: #{e.message}", @config.file_name)
|
|
32
|
+
Bake.formatter.printWarning("Could not touch #{@config.file_name}: #{e.message}", @config.file_name)
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
end
|
|
36
36
|
end
|
|
37
|
-
|
|
37
|
+
|
|
38
38
|
def self.prepareOutput(filename)
|
|
39
39
|
begin
|
|
40
40
|
if File.exists?(filename)
|
|
41
41
|
FileUtils.rm(filename)
|
|
42
|
-
else
|
|
42
|
+
else
|
|
43
43
|
FileUtils.mkdir_p(File.dirname(filename))
|
|
44
44
|
end
|
|
45
45
|
rescue Exception => e
|
|
@@ -47,13 +47,13 @@ module Bake
|
|
|
47
47
|
puts e.message
|
|
48
48
|
puts e.backtrace
|
|
49
49
|
end
|
|
50
|
-
end
|
|
50
|
+
end
|
|
51
51
|
end
|
|
52
|
-
|
|
52
|
+
|
|
53
53
|
def defaultToolchainTime
|
|
54
54
|
@defaultToolchainTime ||= File.mtime(Bake.options.main_dir+"/Project.meta")
|
|
55
55
|
end
|
|
56
|
-
|
|
56
|
+
|
|
57
57
|
def config_changed?(cmdLineFile)
|
|
58
58
|
return "because command line file does not exist" if not File.exist?(cmdLineFile)
|
|
59
59
|
cmdTime = File.mtime(cmdLineFile)
|
|
@@ -61,8 +61,8 @@ module Bake
|
|
|
61
61
|
return "because DefaultToolchain has been changed" if cmdTime < defaultToolchainTime
|
|
62
62
|
return "because command line has been changed"
|
|
63
63
|
end
|
|
64
|
-
|
|
65
|
-
def self.isCmdLineEqual?(cmd, cmdLineFile)
|
|
64
|
+
|
|
65
|
+
def self.isCmdLineEqual?(cmd, cmdLineFile)
|
|
66
66
|
begin
|
|
67
67
|
if File.exist?cmdLineFile
|
|
68
68
|
lastCmdLineArray = File.readlines(cmdLineFile)[0];
|
|
@@ -79,8 +79,8 @@ module Bake
|
|
|
79
79
|
end
|
|
80
80
|
return false
|
|
81
81
|
end
|
|
82
|
-
|
|
83
|
-
def self.writeCmdLineFile(cmd, cmdLineFile)
|
|
82
|
+
|
|
83
|
+
def self.writeCmdLineFile(cmd, cmdLineFile)
|
|
84
84
|
begin
|
|
85
85
|
File.open(cmdLineFile, 'w') { |f| f.write(cmd.join(" ")) }
|
|
86
86
|
rescue Exception => e
|
|
@@ -90,31 +90,31 @@ module Bake
|
|
|
90
90
|
end
|
|
91
91
|
end
|
|
92
92
|
end
|
|
93
|
-
|
|
93
|
+
|
|
94
94
|
def isMainProject?
|
|
95
|
-
@projectName == Bake.options.main_project_name and @config.name == Bake.options.build_config
|
|
95
|
+
@projectName == Bake.options.main_project_name and @config.name == Bake.options.build_config
|
|
96
96
|
end
|
|
97
|
-
|
|
97
|
+
|
|
98
98
|
def calcOutputDir
|
|
99
99
|
if @tcs[:OUTPUT_DIR] != nil
|
|
100
100
|
p = @block.convPath(@tcs[:OUTPUT_DIR])
|
|
101
101
|
@output_dir = p
|
|
102
102
|
elsif isMainProject?
|
|
103
|
-
@output_dir = "
|
|
103
|
+
@output_dir = "build/" + Bake.options.build_config
|
|
104
104
|
else
|
|
105
|
-
@output_dir = "
|
|
105
|
+
@output_dir = "build/" + @config.name + "_" + Bake.options.main_project_name + "_" + Bake.options.build_config
|
|
106
106
|
end
|
|
107
107
|
end
|
|
108
|
-
|
|
108
|
+
|
|
109
109
|
def printCmd(cmd, alternate, reason, forceVerbose)
|
|
110
110
|
if (cmd == @lastCommand)
|
|
111
111
|
if (Bake.options.verbose >= 2 or (@printedCmdAlternate and not forceVerbose))
|
|
112
112
|
return
|
|
113
113
|
end
|
|
114
114
|
end
|
|
115
|
-
|
|
115
|
+
|
|
116
116
|
@lastCommand = cmd
|
|
117
|
-
|
|
117
|
+
|
|
118
118
|
return if Bake.options.verbose == 0 and not forceVerbose
|
|
119
119
|
|
|
120
120
|
if forceVerbose or Bake.options.verbose >= 2 or not alternate
|
|
@@ -127,7 +127,7 @@ module Bake
|
|
|
127
127
|
exedIn = ""
|
|
128
128
|
because = ""
|
|
129
129
|
end
|
|
130
|
-
|
|
130
|
+
|
|
131
131
|
if cmd.is_a?(Array)
|
|
132
132
|
puts cmd.join(' ') + exedIn + because
|
|
133
133
|
else
|
|
@@ -139,7 +139,7 @@ module Bake
|
|
|
139
139
|
end
|
|
140
140
|
|
|
141
141
|
end
|
|
142
|
-
|
|
142
|
+
|
|
143
143
|
def process_console_output(console_output, error_parser)
|
|
144
144
|
ret = false
|
|
145
145
|
incList = nil
|
|
@@ -148,7 +148,7 @@ module Bake
|
|
|
148
148
|
begin
|
|
149
149
|
x = [console_output]
|
|
150
150
|
error_descs, console_output_full, incList = error_parser.scan_lines(x, @projectDir)
|
|
151
|
-
|
|
151
|
+
|
|
152
152
|
console_output = x[0]
|
|
153
153
|
console_output = console_output_full if Bake.options.consoleOutput_fullnames
|
|
154
154
|
|
|
@@ -162,16 +162,16 @@ module Bake
|
|
|
162
162
|
end
|
|
163
163
|
console_output = console_output_VS
|
|
164
164
|
end
|
|
165
|
-
|
|
165
|
+
|
|
166
166
|
if Bake.options.lint
|
|
167
167
|
# ignore error output
|
|
168
168
|
else
|
|
169
169
|
ret = error_descs.any? { |e| e.severity == ErrorParser::SEVERITY_ERROR }
|
|
170
170
|
end
|
|
171
|
-
|
|
171
|
+
|
|
172
172
|
console_output.gsub!(/[\r]/, "")
|
|
173
173
|
Bake.formatter.format(console_output, error_descs, error_parser) unless console_output.empty?
|
|
174
|
-
|
|
174
|
+
|
|
175
175
|
Bake::IDEInterface.instance.set_errors(error_descs)
|
|
176
176
|
rescue Exception => e
|
|
177
177
|
Bake.formatter.printWarning("Parsing output failed (maybe language not set to English?): " + e.message)
|
|
@@ -185,7 +185,7 @@ module Bake
|
|
|
185
185
|
#end
|
|
186
186
|
[ret, incList]
|
|
187
187
|
end
|
|
188
|
-
|
|
188
|
+
|
|
189
189
|
def process_result(cmd, console_output, error_parser, alternate, reason, success)
|
|
190
190
|
hasError = (success == false)
|
|
191
191
|
printCmd(cmd, alternate, reason, (hasError and not Bake.options.lint))
|
|
@@ -197,7 +197,7 @@ module Bake
|
|
|
197
197
|
raise SystemCommandFailed.new
|
|
198
198
|
end
|
|
199
199
|
incList
|
|
200
|
-
end
|
|
200
|
+
end
|
|
201
201
|
|
|
202
202
|
def getSubBlocks(b, method)
|
|
203
203
|
b.send(method).each do |child_b|
|
|
@@ -207,13 +207,13 @@ module Bake
|
|
|
207
207
|
end
|
|
208
208
|
end
|
|
209
209
|
end
|
|
210
|
-
|
|
210
|
+
|
|
211
211
|
def getBlocks(method)
|
|
212
212
|
@otherBlocks = []
|
|
213
213
|
getSubBlocks(@block, method)
|
|
214
214
|
return @otherBlocks
|
|
215
|
-
end
|
|
216
|
-
|
|
215
|
+
end
|
|
216
|
+
|
|
217
217
|
end
|
|
218
218
|
end
|
|
219
219
|
end
|