bake-toolkit 2.12.1 → 2.12.2
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 +4 -0
- data/documentation/_build/html/_sources/index.txt +1 -1
- data/documentation/_build/html/_static/syntax.html +2 -2
- data/documentation/_build/html/changelog.html +10 -3
- data/documentation/_build/html/commandline/commandline.html +3 -3
- data/documentation/_build/html/concepts/build_hierarchy.html +3 -3
- data/documentation/_build/html/concepts/concepts.html +3 -3
- data/documentation/_build/html/concepts/the_main_project.html +3 -3
- data/documentation/_build/html/concepts/the_project_meta_file.html +3 -3
- data/documentation/_build/html/genindex.html +3 -3
- data/documentation/_build/html/ide/eclipse/eclipse.html +3 -3
- data/documentation/_build/html/ide/eclipse/how_to_convert_existing_cdt_workspace.html +3 -3
- data/documentation/_build/html/ide/eclipse/how_to_create_a_new_project_in_eclipse.html +3 -3
- data/documentation/_build/html/ide/eclipse/how_to_create_a_workspace_in_eclipse.html +3 -3
- data/documentation/_build/html/ide/eclipse/how_to_install_eclipse_plugin.html +3 -3
- data/documentation/_build/html/ide/eclipse/how_to_use_bake_in_eclipse.html +3 -3
- data/documentation/_build/html/ide/ide_integrations.html +3 -3
- data/documentation/_build/html/ide/vs/how_to_create_vs_projects.html +3 -3
- data/documentation/_build/html/ide/vs/how_to_debug_in_vs.html +3 -3
- data/documentation/_build/html/ide/vs/how_to_used_bake_in_vs.html +3 -3
- data/documentation/_build/html/ide/vs/vs.html +3 -3
- data/documentation/_build/html/ide/vs/vs_install.html +3 -3
- data/documentation/_build/html/index.html +6 -6
- data/documentation/_build/html/install/install_bake.html +3 -3
- data/documentation/_build/html/internal.html +3 -3
- data/documentation/_build/html/known_issues.html +3 -3
- data/documentation/_build/html/license.html +3 -3
- data/documentation/_build/html/performance/performance.html +3 -3
- data/documentation/_build/html/quickstart/quickstart.html +3 -3
- data/documentation/_build/html/search.html +3 -3
- data/documentation/_build/html/searchindex.js +1 -1
- data/documentation/_build/html/syntax/derive_configs.html +3 -3
- data/documentation/_build/html/syntax/project_meta_syntax.html +5 -5
- data/documentation/_build/html/syntax/syntax.html +3 -3
- data/documentation/_build/html/syntax/variable_substitutions.html +3 -3
- data/documentation/_build/html/tips_and_tricks/how_to_use_bake_with_cygwin.html +3 -3
- data/documentation/_build/html/tips_and_tricks/static_code_analysis.html +3 -3
- data/documentation/_build/html/tips_and_tricks/the_bakery.html +3 -3
- data/documentation/_build/html/tips_and_tricks/the_clang.html +3 -3
- data/documentation/_build/html/tips_and_tricks/tips_and_tricks.html +3 -3
- data/documentation/_build/html/why_bake/why_bake.html +5 -5
- data/lib/bake/config/loader.rb +8 -0
- data/lib/bake/libElement.rb +6 -4
- data/lib/bake/mergeConfig.rb +51 -44
- data/lib/bake/model/metamodel.rb +1 -0
- data/lib/blocks/blockBase.rb +1 -1
- data/lib/blocks/compile.rb +56 -50
- data/lib/blocks/library.rb +7 -0
- data/lib/common/version.rb +1 -1
- metadata +2 -2
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<head>
|
|
6
6
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
7
7
|
|
|
8
|
-
<title>How to use bake with cygwin — bake 2.12.
|
|
8
|
+
<title>How to use bake with cygwin — bake 2.12.2 documentation</title>
|
|
9
9
|
|
|
10
10
|
<link rel="stylesheet" href="../_static/basic.css" type="text/css" />
|
|
11
11
|
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<script type="text/javascript">
|
|
16
16
|
var DOCUMENTATION_OPTIONS = {
|
|
17
17
|
URL_ROOT: '../',
|
|
18
|
-
VERSION: '2.12.
|
|
18
|
+
VERSION: '2.12.2',
|
|
19
19
|
COLLAPSE_INDEX: false,
|
|
20
20
|
FILE_SUFFIX: '.html',
|
|
21
21
|
HAS_SOURCE: true
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<script type="text/javascript" src="../_static/bootstrap-3.3.4/js/bootstrap.min.js"></script>
|
|
30
30
|
<script type="text/javascript" src="../_static/bootstrap-sphinx.js"></script>
|
|
31
31
|
<link rel="shortcut icon" href="../_static/logo_tiny_32.ico"/>
|
|
32
|
-
<link rel="top" title="bake 2.12.
|
|
32
|
+
<link rel="top" title="bake 2.12.2 documentation" href="../index.html" />
|
|
33
33
|
<link rel="up" title="Tips and Tricks" href="tips_and_tricks.html" />
|
|
34
34
|
<link rel="next" title="Clang Analyze" href="the_clang.html" />
|
|
35
35
|
<link rel="prev" title="Static Code Analysis" href="static_code_analysis.html" />
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<head>
|
|
6
6
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
7
7
|
|
|
8
|
-
<title>Static Code Analysis — bake 2.12.
|
|
8
|
+
<title>Static Code Analysis — bake 2.12.2 documentation</title>
|
|
9
9
|
|
|
10
10
|
<link rel="stylesheet" href="../_static/basic.css" type="text/css" />
|
|
11
11
|
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<script type="text/javascript">
|
|
16
16
|
var DOCUMENTATION_OPTIONS = {
|
|
17
17
|
URL_ROOT: '../',
|
|
18
|
-
VERSION: '2.12.
|
|
18
|
+
VERSION: '2.12.2',
|
|
19
19
|
COLLAPSE_INDEX: false,
|
|
20
20
|
FILE_SUFFIX: '.html',
|
|
21
21
|
HAS_SOURCE: true
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<script type="text/javascript" src="../_static/bootstrap-3.3.4/js/bootstrap.min.js"></script>
|
|
30
30
|
<script type="text/javascript" src="../_static/bootstrap-sphinx.js"></script>
|
|
31
31
|
<link rel="shortcut icon" href="../_static/logo_tiny_32.ico"/>
|
|
32
|
-
<link rel="top" title="bake 2.12.
|
|
32
|
+
<link rel="top" title="bake 2.12.2 documentation" href="../index.html" />
|
|
33
33
|
<link rel="up" title="Tips and Tricks" href="tips_and_tricks.html" />
|
|
34
34
|
<link rel="next" title="How to use bake with cygwin" href="how_to_use_bake_with_cygwin.html" />
|
|
35
35
|
<link rel="prev" title="The Bakery" href="the_bakery.html" />
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<head>
|
|
6
6
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
7
7
|
|
|
8
|
-
<title>The Bakery — bake 2.12.
|
|
8
|
+
<title>The Bakery — bake 2.12.2 documentation</title>
|
|
9
9
|
|
|
10
10
|
<link rel="stylesheet" href="../_static/basic.css" type="text/css" />
|
|
11
11
|
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<script type="text/javascript">
|
|
16
16
|
var DOCUMENTATION_OPTIONS = {
|
|
17
17
|
URL_ROOT: '../',
|
|
18
|
-
VERSION: '2.12.
|
|
18
|
+
VERSION: '2.12.2',
|
|
19
19
|
COLLAPSE_INDEX: false,
|
|
20
20
|
FILE_SUFFIX: '.html',
|
|
21
21
|
HAS_SOURCE: true
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<script type="text/javascript" src="../_static/bootstrap-3.3.4/js/bootstrap.min.js"></script>
|
|
30
30
|
<script type="text/javascript" src="../_static/bootstrap-sphinx.js"></script>
|
|
31
31
|
<link rel="shortcut icon" href="../_static/logo_tiny_32.ico"/>
|
|
32
|
-
<link rel="top" title="bake 2.12.
|
|
32
|
+
<link rel="top" title="bake 2.12.2 documentation" href="../index.html" />
|
|
33
33
|
<link rel="up" title="Tips and Tricks" href="tips_and_tricks.html" />
|
|
34
34
|
<link rel="next" title="Static Code Analysis" href="static_code_analysis.html" />
|
|
35
35
|
<link rel="prev" title="Tips and Tricks" href="tips_and_tricks.html" />
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<head>
|
|
6
6
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
7
7
|
|
|
8
|
-
<title>Clang Analyze — bake 2.12.
|
|
8
|
+
<title>Clang Analyze — bake 2.12.2 documentation</title>
|
|
9
9
|
|
|
10
10
|
<link rel="stylesheet" href="../_static/basic.css" type="text/css" />
|
|
11
11
|
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<script type="text/javascript">
|
|
16
16
|
var DOCUMENTATION_OPTIONS = {
|
|
17
17
|
URL_ROOT: '../',
|
|
18
|
-
VERSION: '2.12.
|
|
18
|
+
VERSION: '2.12.2',
|
|
19
19
|
COLLAPSE_INDEX: false,
|
|
20
20
|
FILE_SUFFIX: '.html',
|
|
21
21
|
HAS_SOURCE: true
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<script type="text/javascript" src="../_static/bootstrap-3.3.4/js/bootstrap.min.js"></script>
|
|
30
30
|
<script type="text/javascript" src="../_static/bootstrap-sphinx.js"></script>
|
|
31
31
|
<link rel="shortcut icon" href="../_static/logo_tiny_32.ico"/>
|
|
32
|
-
<link rel="top" title="bake 2.12.
|
|
32
|
+
<link rel="top" title="bake 2.12.2 documentation" href="../index.html" />
|
|
33
33
|
<link rel="up" title="Tips and Tricks" href="tips_and_tricks.html" />
|
|
34
34
|
<link rel="next" title="Performance" href="../performance/performance.html" />
|
|
35
35
|
<link rel="prev" title="How to use bake with cygwin" href="how_to_use_bake_with_cygwin.html" />
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<head>
|
|
6
6
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
7
7
|
|
|
8
|
-
<title>Tips and Tricks — bake 2.12.
|
|
8
|
+
<title>Tips and Tricks — bake 2.12.2 documentation</title>
|
|
9
9
|
|
|
10
10
|
<link rel="stylesheet" href="../_static/basic.css" type="text/css" />
|
|
11
11
|
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<script type="text/javascript">
|
|
16
16
|
var DOCUMENTATION_OPTIONS = {
|
|
17
17
|
URL_ROOT: '../',
|
|
18
|
-
VERSION: '2.12.
|
|
18
|
+
VERSION: '2.12.2',
|
|
19
19
|
COLLAPSE_INDEX: false,
|
|
20
20
|
FILE_SUFFIX: '.html',
|
|
21
21
|
HAS_SOURCE: true
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<script type="text/javascript" src="../_static/bootstrap-3.3.4/js/bootstrap.min.js"></script>
|
|
30
30
|
<script type="text/javascript" src="../_static/bootstrap-sphinx.js"></script>
|
|
31
31
|
<link rel="shortcut icon" href="../_static/logo_tiny_32.ico"/>
|
|
32
|
-
<link rel="top" title="bake 2.12.
|
|
32
|
+
<link rel="top" title="bake 2.12.2 documentation" href="../index.html" />
|
|
33
33
|
<link rel="next" title="The Bakery" href="the_bakery.html" />
|
|
34
34
|
<link rel="prev" title="How to Debug in Visual Studio" href="../ide/vs/how_to_debug_in_vs.html" />
|
|
35
35
|
<meta charset='utf-8'>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<head>
|
|
6
6
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
7
7
|
|
|
8
|
-
<title>Why you should use bake — bake 2.12.
|
|
8
|
+
<title>Why you should use bake — bake 2.12.2 documentation</title>
|
|
9
9
|
|
|
10
10
|
<link rel="stylesheet" href="../_static/basic.css" type="text/css" />
|
|
11
11
|
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<script type="text/javascript">
|
|
16
16
|
var DOCUMENTATION_OPTIONS = {
|
|
17
17
|
URL_ROOT: '../',
|
|
18
|
-
VERSION: '2.12.
|
|
18
|
+
VERSION: '2.12.2',
|
|
19
19
|
COLLAPSE_INDEX: false,
|
|
20
20
|
FILE_SUFFIX: '.html',
|
|
21
21
|
HAS_SOURCE: true
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
<script type="text/javascript" src="../_static/bootstrap-3.3.4/js/bootstrap.min.js"></script>
|
|
30
30
|
<script type="text/javascript" src="../_static/bootstrap-sphinx.js"></script>
|
|
31
31
|
<link rel="shortcut icon" href="../_static/logo_tiny_32.ico"/>
|
|
32
|
-
<link rel="top" title="bake 2.12.
|
|
32
|
+
<link rel="top" title="bake 2.12.2 documentation" href="../index.html" />
|
|
33
33
|
<link rel="next" title="Install bake" href="../install/install_bake.html" />
|
|
34
|
-
<link rel="prev" title="bake 2.12.
|
|
34
|
+
<link rel="prev" title="bake 2.12.2" href="../index.html" />
|
|
35
35
|
<meta charset='utf-8'>
|
|
36
36
|
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
|
|
37
37
|
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
|
|
109
109
|
|
|
110
110
|
<li>
|
|
111
|
-
<a href="../index.html" title="Previous Chapter: bake 2.12.
|
|
111
|
+
<a href="../index.html" title="Previous Chapter: bake 2.12.2"><span class="glyphicon glyphicon-chevron-left visible-sm"></span><span class="hidden-sm hidden-tablet">« bake 2.12.2</span>
|
|
112
112
|
</a>
|
|
113
113
|
</li>
|
|
114
114
|
<li>
|
data/lib/bake/config/loader.rb
CHANGED
|
@@ -90,10 +90,18 @@ module Bake
|
|
|
90
90
|
end
|
|
91
91
|
|
|
92
92
|
config.includeDir.each do |inc|
|
|
93
|
+
if not ["front", "back", ""].include?inc.inject
|
|
94
|
+
Bake.formatter.printError("inject of IncludeDir must be 'front' or 'back'", inc)
|
|
95
|
+
ExitHelper.exit(1)
|
|
96
|
+
end
|
|
93
97
|
if not ["front", "back", ""].include?inc.infix
|
|
94
98
|
Bake.formatter.printError("infix of IncludeDir must be 'front' or 'back'", inc)
|
|
95
99
|
ExitHelper.exit(1)
|
|
96
100
|
end
|
|
101
|
+
if (inc.infix != "" and inc.inject != "")
|
|
102
|
+
Bake.formatter.printError("IncludeDir must have inject OR infix (deprecated)", inc)
|
|
103
|
+
ExitHelper.exit(1)
|
|
104
|
+
end
|
|
97
105
|
end if config.respond_to?("includeDir")
|
|
98
106
|
end
|
|
99
107
|
configs
|
data/lib/bake/libElement.rb
CHANGED
|
@@ -51,10 +51,12 @@ module Bake
|
|
|
51
51
|
|
|
52
52
|
prefix = nil
|
|
53
53
|
|
|
54
|
-
if block.library
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
if block.library
|
|
55
|
+
if (not block.library.compileBlock.objects.empty?) or block.library.compileBlock.calcSources(true)
|
|
56
|
+
adaptedPath, prefix = adaptPath(block.library.archive_name, block, prefix)
|
|
57
|
+
@@linker_libs_array << adaptedPath
|
|
58
|
+
@@source_libraries << adaptedPath
|
|
59
|
+
end
|
|
58
60
|
end
|
|
59
61
|
|
|
60
62
|
block.lib_elements.each_key.sort.each do |line_num|
|
data/lib/bake/mergeConfig.rb
CHANGED
|
@@ -13,13 +13,13 @@ module Bake
|
|
|
13
13
|
ct.compiler.each do |cc|
|
|
14
14
|
if cc.ctype == pc.ctype
|
|
15
15
|
found = true
|
|
16
|
-
cc.setFlags(pc.flags + cc.flags)
|
|
17
|
-
cc.setDefine(pc.define + cc.define)
|
|
16
|
+
cc.setFlags(clone(pc.flags) + cc.flags)
|
|
17
|
+
cc.setDefine(clone(pc.define) + cc.define)
|
|
18
18
|
if cc.internalDefines.nil? and not pc.internalDefines.nil?
|
|
19
|
-
cc.setInternalDefines(pc.internalDefines)
|
|
19
|
+
cc.setInternalDefines(clone(pc.internalDefines))
|
|
20
20
|
end
|
|
21
21
|
if cc.command == "" and pc.command != ""
|
|
22
|
-
cc.setCommand(pc.command)
|
|
22
|
+
cc.setCommand(clone(pc.command))
|
|
23
23
|
end
|
|
24
24
|
end
|
|
25
25
|
end
|
|
@@ -28,105 +28,112 @@ module Bake
|
|
|
28
28
|
|
|
29
29
|
if not pt.archiver.nil?
|
|
30
30
|
if (ct.archiver.nil?)
|
|
31
|
-
ct.setArchiver(pt.archiver)
|
|
31
|
+
ct.setArchiver(clone(pt.archiver))
|
|
32
32
|
else
|
|
33
33
|
if ct.archiver.command == "" and pt.archiver.command != ""
|
|
34
|
-
ct.archiver.setCommand(pt.archiver.command)
|
|
34
|
+
ct.archiver.setCommand(clone(pt.archiver.command))
|
|
35
35
|
end
|
|
36
|
-
ct.archiver.setFlags(pt.archiver.flags + ct.archiver.flags)
|
|
36
|
+
ct.archiver.setFlags(clone(pt.archiver.flags) + ct.archiver.flags)
|
|
37
37
|
end
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
if not pt.linker.nil?
|
|
41
41
|
if (ct.linker.nil?)
|
|
42
|
-
ct.setLinker(pt.linker)
|
|
42
|
+
ct.setLinker(clone(pt.linker))
|
|
43
43
|
else
|
|
44
44
|
if ct.linker.command == "" and pt.linker.command != ""
|
|
45
|
-
ct.linker.setCommand(pt.linker.command)
|
|
45
|
+
ct.linker.setCommand(clone(pt.linker.command))
|
|
46
46
|
end
|
|
47
|
-
ct.linker.setFlags(pt.linker.flags + ct.linker.flags)
|
|
48
|
-
ct.linker.setLibprefixflags(pt.linker.libprefixflags + ct.linker.libprefixflags)
|
|
49
|
-
ct.linker.setLibpostfixflags(pt.linker.libpostfixflags + ct.linker.libpostfixflags)
|
|
47
|
+
ct.linker.setFlags(clone(pt.linker.flags) + ct.linker.flags)
|
|
48
|
+
ct.linker.setLibprefixflags(clone(pt.linker.libprefixflags) + ct.linker.libprefixflags)
|
|
49
|
+
ct.linker.setLibpostfixflags(clone(pt.linker.libpostfixflags) + ct.linker.libpostfixflags)
|
|
50
50
|
end
|
|
51
51
|
end
|
|
52
52
|
|
|
53
53
|
if ct.outputDir == "" and pt.outputDir != ""
|
|
54
|
-
ct.setOutputDir(pt.outputDir)
|
|
54
|
+
ct.setOutputDir(clone(pt.outputDir))
|
|
55
55
|
end
|
|
56
56
|
|
|
57
57
|
if ct.docu.nil? and not pt.docu.nil?
|
|
58
|
-
ct.setDocu(pt.docu)
|
|
58
|
+
ct.setDocu(clone(pt.docu))
|
|
59
59
|
end
|
|
60
60
|
|
|
61
|
-
ct.setLintPolicy(pt.lintPolicy + ct.lintPolicy)
|
|
61
|
+
ct.setLintPolicy(clone(pt.lintPolicy) + ct.lintPolicy)
|
|
62
62
|
|
|
63
63
|
if (isDefault)
|
|
64
64
|
if ct.basedOn == "" and pt.basedOn != ""
|
|
65
|
-
ct.setBasedOn(pt.basedOn)
|
|
65
|
+
ct.setBasedOn(clone(pt.basedOn))
|
|
66
66
|
end
|
|
67
67
|
if pt.eclipseOrder # is that a good idea?
|
|
68
|
-
ct.setEclipseOrder(pt.eclipseOrder)
|
|
68
|
+
ct.setEclipseOrder(clone(pt.eclipseOrder))
|
|
69
69
|
end
|
|
70
70
|
if ct.internalIncludes.nil? and not pt.internalIncludes.nil?
|
|
71
|
-
ct.setInternalIncludes(pt.internalIncludes)
|
|
71
|
+
ct.setInternalIncludes(clone(pt.internalIncludes))
|
|
72
72
|
end
|
|
73
73
|
end
|
|
74
74
|
|
|
75
75
|
end
|
|
76
76
|
|
|
77
77
|
def manipulateLineNumbers(ar)
|
|
78
|
-
ar.each { |l| l.line_number -=
|
|
78
|
+
ar.each { |l| l.line_number -= 100000 }
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
def clone(obj)
|
|
82
|
+
Marshal.load(Marshal.dump(obj))
|
|
79
83
|
end
|
|
80
84
|
|
|
81
85
|
def merge()
|
|
82
86
|
|
|
83
87
|
# Valid for all config types
|
|
84
88
|
|
|
85
|
-
deps = @parent.dependency
|
|
89
|
+
deps = clone(@parent.dependency)
|
|
86
90
|
@child.dependency.each do |cd|
|
|
87
91
|
deps << cd if deps.none? {|pd| pd.name == cd.name and pd.config == cd.config }
|
|
88
92
|
end
|
|
89
93
|
@child.setDependency(deps)
|
|
90
94
|
|
|
91
|
-
@child.setSet(@parent.set + @child.set)
|
|
95
|
+
@child.setSet(clone(@parent.set) + @child.set)
|
|
92
96
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
97
|
+
cExLib = clone(@parent.exLib)
|
|
98
|
+
cExLibSearchPath = clone(@parent.exLibSearchPath)
|
|
99
|
+
cUserLibrary = clone(@parent.userLibrary)
|
|
100
|
+
manipulateLineNumbers(cExLib)
|
|
101
|
+
manipulateLineNumbers(cExLibSearchPath)
|
|
102
|
+
manipulateLineNumbers(cUserLibrary)
|
|
96
103
|
|
|
97
|
-
@child.setExLib(
|
|
98
|
-
@child.setExLibSearchPath(
|
|
99
|
-
@child.setUserLibrary(
|
|
104
|
+
@child.setExLib(cExLib + @child.exLib)
|
|
105
|
+
@child.setExLibSearchPath(cExLibSearchPath + @child.exLibSearchPath)
|
|
106
|
+
@child.setUserLibrary(cUserLibrary + @child.userLibrary)
|
|
100
107
|
|
|
101
108
|
if not @parent.startupSteps.nil?
|
|
102
109
|
if (@child.startupSteps.nil?)
|
|
103
|
-
@child.setStartupSteps(@parent.startupSteps)
|
|
110
|
+
@child.setStartupSteps(clone(@parent.startupSteps))
|
|
104
111
|
else
|
|
105
|
-
@child.startupSteps.setStep(@parent.startupSteps.step + @child.startupSteps.step)
|
|
112
|
+
@child.startupSteps.setStep(clone(@parent.startupSteps.step) + @child.startupSteps.step)
|
|
106
113
|
end
|
|
107
114
|
end
|
|
108
115
|
|
|
109
116
|
if not @parent.preSteps.nil?
|
|
110
117
|
if (@child.preSteps.nil?)
|
|
111
|
-
@child.setPreSteps(@parent.preSteps)
|
|
118
|
+
@child.setPreSteps(clone(@parent.preSteps))
|
|
112
119
|
else
|
|
113
|
-
@child.preSteps.setStep(@parent.preSteps.step + @child.preSteps.step)
|
|
120
|
+
@child.preSteps.setStep(clone(@parent.preSteps.step) + @child.preSteps.step)
|
|
114
121
|
end
|
|
115
122
|
end
|
|
116
123
|
|
|
117
124
|
if not @parent.postSteps.nil?
|
|
118
125
|
if (@child.postSteps.nil?)
|
|
119
|
-
@child.setPostSteps(@parent.postSteps)
|
|
126
|
+
@child.setPostSteps(clone(@parent.postSteps))
|
|
120
127
|
else
|
|
121
|
-
@child.postSteps.setStep(@parent.postSteps.step + @child.postSteps.step)
|
|
128
|
+
@child.postSteps.setStep(clone(@parent.postSteps.step) + @child.postSteps.step)
|
|
122
129
|
end
|
|
123
130
|
end
|
|
124
131
|
|
|
125
132
|
if not @parent.exitSteps.nil?
|
|
126
133
|
if (@child.exitSteps.nil?)
|
|
127
|
-
@child.setExitSteps(@parent.exitSteps)
|
|
134
|
+
@child.setExitSteps(clone(@parent.exitSteps))
|
|
128
135
|
else
|
|
129
|
-
@child.exitSteps.setStep(@parent.exitSteps.step + @child.exitSteps.step)
|
|
136
|
+
@child.exitSteps.setStep(clone(@parent.exitSteps.step) + @child.exitSteps.step)
|
|
130
137
|
end
|
|
131
138
|
end
|
|
132
139
|
|
|
@@ -135,7 +142,7 @@ module Bake
|
|
|
135
142
|
|
|
136
143
|
if not pt.nil?
|
|
137
144
|
if (ct.nil?)
|
|
138
|
-
@child.setDefaultToolchain(pt)
|
|
145
|
+
@child.setDefaultToolchain(clone(pt))
|
|
139
146
|
else
|
|
140
147
|
mergeToolchain(pt,ct,true)
|
|
141
148
|
end
|
|
@@ -146,7 +153,7 @@ module Bake
|
|
|
146
153
|
|
|
147
154
|
if not pt.nil?
|
|
148
155
|
if (ct.nil?)
|
|
149
|
-
@child.setToolchain(pt)
|
|
156
|
+
@child.setToolchain(clone(pt))
|
|
150
157
|
else
|
|
151
158
|
mergeToolchain(pt,ct,false)
|
|
152
159
|
end
|
|
@@ -155,23 +162,23 @@ module Bake
|
|
|
155
162
|
# Valid for custom config
|
|
156
163
|
|
|
157
164
|
if (Metamodel::CustomConfig === @child && Metamodel::CustomConfig === @parent)
|
|
158
|
-
@child.setStep(@parent.step) if @child.step.nil? and not @parent.step.nil?
|
|
165
|
+
@child.setStep(clone(@parent.step)) if @child.step.nil? and not @parent.step.nil?
|
|
159
166
|
end
|
|
160
167
|
|
|
161
168
|
# Valid for library and exe config
|
|
162
169
|
|
|
163
170
|
if ((Metamodel::LibraryConfig === @child || Metamodel::ExecutableConfig === @child) && (Metamodel::LibraryConfig === @parent || Metamodel::ExecutableConfig === @parent))
|
|
164
|
-
@child.setFiles(@parent.files + @child.files)
|
|
165
|
-
@child.setExcludeFiles(@parent.excludeFiles + @child.excludeFiles)
|
|
166
|
-
@child.setIncludeDir(@parent.includeDir + @child.includeDir)
|
|
171
|
+
@child.setFiles(clone(@parent.files) + @child.files)
|
|
172
|
+
@child.setExcludeFiles(clone(@parent.excludeFiles) + @child.excludeFiles)
|
|
173
|
+
@child.setIncludeDir(clone(@parent.includeDir) + @child.includeDir)
|
|
167
174
|
end
|
|
168
175
|
|
|
169
176
|
# Valid for exe config
|
|
170
177
|
|
|
171
178
|
if (Metamodel::ExecutableConfig === @child && Metamodel::ExecutableConfig === @parent)
|
|
172
|
-
@child.setLinkerScript(@parent.linkerScript) if @child.linkerScript.nil? and not @parent.linkerScript.nil?
|
|
173
|
-
@child.setArtifactName(@parent.artifactName) if @child.artifactName.nil? and not @parent.artifactName.nil?
|
|
174
|
-
@child.setMapFile(@parent.mapFile) if @child.mapFile.nil? and not @parent.mapFile.nil?
|
|
179
|
+
@child.setLinkerScript(clone(@parent.linkerScript)) if @child.linkerScript.nil? and not @parent.linkerScript.nil?
|
|
180
|
+
@child.setArtifactName(clone(@parent.artifactName)) if @child.artifactName.nil? and not @parent.artifactName.nil?
|
|
181
|
+
@child.setMapFile(clone(@parent.mapFile)) if @child.mapFile.nil? and not @parent.mapFile.nil?
|
|
175
182
|
end
|
|
176
183
|
|
|
177
184
|
end
|
data/lib/bake/model/metamodel.rb
CHANGED
|
@@ -123,6 +123,7 @@ module Bake
|
|
|
123
123
|
class IncludeDir < ModelElement
|
|
124
124
|
has_attr 'name', String, :defaultValueLiteral => ""
|
|
125
125
|
has_attr 'infix', String, :defaultValueLiteral => ""
|
|
126
|
+
has_attr 'inject', String, :defaultValueLiteral => ""
|
|
126
127
|
has_attr 'inherit', Boolean, :defaultValueLiteral => "false"
|
|
127
128
|
end
|
|
128
129
|
|
data/lib/blocks/blockBase.rb
CHANGED
|
@@ -56,7 +56,7 @@ module Bake
|
|
|
56
56
|
cmdTime = File.mtime(cmdLineFile)
|
|
57
57
|
return "because config file has been changed" if cmdTime < File.mtime(@config.file_name)
|
|
58
58
|
return "because DefaultToolchain has been changed" if cmdTime < defaultToolchainTime
|
|
59
|
-
return "because command line has been changed (IncludeDir inherit/
|
|
59
|
+
return "because command line has been changed (IncludeDir inherit/inject, environment variables, ...)"
|
|
60
60
|
end
|
|
61
61
|
|
|
62
62
|
def self.isCmdLineEqual?(cmd, cmdLineFile)
|
data/lib/blocks/compile.rb
CHANGED
|
@@ -345,62 +345,64 @@ module Bake
|
|
|
345
345
|
end
|
|
346
346
|
|
|
347
347
|
def calcSources(cleaning = false)
|
|
348
|
-
@
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
source_files = Set.new
|
|
356
|
-
@config.files.each do |sources|
|
|
357
|
-
p = sources.name
|
|
358
|
-
res = Dir.glob(p).sort
|
|
359
|
-
if res.length == 0 and cleaning == false
|
|
360
|
-
if not p.include?"*" and not p.include?"?"
|
|
361
|
-
Bake.formatter.printError("Source file '#{p}' not found", sources)
|
|
362
|
-
raise SystemCommandFailed.new
|
|
363
|
-
elsif Bake.options.verbose >= 1
|
|
364
|
-
Bake.formatter.printInfo("Source file pattern '#{p}' does not match to any file", sources)
|
|
365
|
-
end
|
|
366
|
-
end
|
|
367
|
-
res.each do |f|
|
|
368
|
-
next if exclude_files.include?(f)
|
|
369
|
-
source_files << f
|
|
370
|
-
end
|
|
371
|
-
end
|
|
372
|
-
|
|
373
|
-
if Bake.options.filename
|
|
374
|
-
source_files.keep_if do |source|
|
|
375
|
-
source.include?Bake.options.filename
|
|
348
|
+
Dir.chdir(@projectDir) do
|
|
349
|
+
@source_files = []
|
|
350
|
+
|
|
351
|
+
exclude_files = Set.new
|
|
352
|
+
@config.excludeFiles.each do |p|
|
|
353
|
+
Dir.glob(p.name).each {|f| exclude_files << f}
|
|
376
354
|
end
|
|
377
|
-
|
|
378
|
-
|
|
355
|
+
|
|
356
|
+
source_files = Set.new
|
|
357
|
+
@config.files.each do |sources|
|
|
358
|
+
p = sources.name
|
|
359
|
+
res = Dir.glob(p).sort
|
|
360
|
+
if res.length == 0 and cleaning == false
|
|
361
|
+
if not p.include?"*" and not p.include?"?"
|
|
362
|
+
Bake.formatter.printError("Source file '#{p}' not found", sources)
|
|
363
|
+
raise SystemCommandFailed.new
|
|
364
|
+
elsif Bake.options.verbose >= 1
|
|
365
|
+
Bake.formatter.printInfo("Source file pattern '#{p}' does not match to any file", sources)
|
|
366
|
+
end
|
|
367
|
+
end
|
|
368
|
+
res.each do |f|
|
|
369
|
+
next if exclude_files.include?(f)
|
|
370
|
+
source_files << f
|
|
371
|
+
end
|
|
379
372
|
end
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
@source_files.reverse.each do |o|
|
|
388
|
-
d = File.dirname(o)
|
|
389
|
-
if filemap.include?(d)
|
|
390
|
-
filemap[d] << o
|
|
391
|
-
else
|
|
392
|
-
filemap[d] = [o]
|
|
393
|
-
dirs << d
|
|
373
|
+
|
|
374
|
+
if Bake.options.filename
|
|
375
|
+
source_files.keep_if do |source|
|
|
376
|
+
source.include?Bake.options.filename
|
|
377
|
+
end
|
|
378
|
+
if source_files.length == 0 and cleaning == false
|
|
379
|
+
Bake.formatter.printInfo("#{Bake.options.filename} does not match to any source", @config)
|
|
394
380
|
end
|
|
395
381
|
end
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
382
|
+
|
|
383
|
+
@source_files = source_files.sort.to_a
|
|
384
|
+
|
|
385
|
+
if Bake.options.eclipseOrder # directories reverse order, files in directories in alphabetical order
|
|
386
|
+
dirs = []
|
|
387
|
+
filemap = {}
|
|
388
|
+
@source_files.reverse.each do |o|
|
|
389
|
+
d = File.dirname(o)
|
|
390
|
+
if filemap.include?(d)
|
|
391
|
+
filemap[d] << o
|
|
392
|
+
else
|
|
393
|
+
filemap[d] = [o]
|
|
394
|
+
dirs << d
|
|
395
|
+
end
|
|
396
|
+
end
|
|
397
|
+
@source_files = []
|
|
398
|
+
dirs.each do |d|
|
|
399
|
+
filemap[d].reverse.each do |f|
|
|
400
|
+
@source_files << f
|
|
401
|
+
end
|
|
400
402
|
end
|
|
401
403
|
end
|
|
402
404
|
end
|
|
403
|
-
|
|
405
|
+
return (not @source_files.empty?)
|
|
404
406
|
end
|
|
405
407
|
|
|
406
408
|
def getSubBlocks(b, method)
|
|
@@ -452,7 +454,11 @@ module Bake
|
|
|
452
454
|
if b.config.respond_to?("includeDir")
|
|
453
455
|
include_list_front = []
|
|
454
456
|
b.config.includeDir.each do |inc|
|
|
455
|
-
if inc.
|
|
457
|
+
if inc.inject == "front"
|
|
458
|
+
include_list_front << mapInclude(inc, b)
|
|
459
|
+
elsif inc.inject == "back"
|
|
460
|
+
@include_list << mapInclude(inc, b)
|
|
461
|
+
elsif inc.infix == "front"
|
|
456
462
|
include_list_front << mapInclude(inc, b)
|
|
457
463
|
elsif inc.infix == "back"
|
|
458
464
|
@include_list << mapInclude(inc, b)
|