bake-toolkit 2.19.2 → 2.20.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/documentation/_build/html/_images/dot.png +0 -0
  3. data/documentation/_build/html/_images/dotP.png +0 -0
  4. data/documentation/_build/html/_images/dotPC.png +0 -0
  5. data/documentation/_build/html/_sources/changelog.txt +12 -0
  6. data/documentation/_build/html/_sources/concepts/concepts.txt +2 -0
  7. data/documentation/_build/html/_sources/concepts/inject.txt +65 -0
  8. data/documentation/_build/html/_sources/concepts/prebuild.txt +56 -0
  9. data/documentation/_build/html/_sources/index.txt +1 -1
  10. data/documentation/_build/html/_sources/syntax/auto_adjustment.txt +43 -0
  11. data/documentation/_build/html/_sources/syntax/syntax.txt +1 -1
  12. data/documentation/_build/html/_sources/syntax/variable_substitutions.txt +41 -68
  13. data/documentation/_build/html/_sources/tips_and_tricks/dot.txt +34 -0
  14. data/documentation/_build/html/_sources/tips_and_tricks/tips_and_tricks.txt +1 -1
  15. data/documentation/_build/html/_static/dot.png +0 -0
  16. data/documentation/_build/html/_static/dotP.png +0 -0
  17. data/documentation/_build/html/_static/dotPC.png +0 -0
  18. data/documentation/_build/html/_static/syntax.html +20 -0
  19. data/documentation/_build/html/changelog.html +17 -3
  20. data/documentation/_build/html/commandline/commandline.html +3 -3
  21. data/documentation/_build/html/concepts/build_hierarchy.html +3 -3
  22. data/documentation/_build/html/concepts/concepts.html +13 -3
  23. data/documentation/_build/html/concepts/inject.html +217 -0
  24. data/documentation/_build/html/concepts/link_order.html +3 -3
  25. data/documentation/_build/html/concepts/prebuild.html +205 -0
  26. data/documentation/_build/html/concepts/the_main_project.html +3 -3
  27. data/documentation/_build/html/concepts/the_project_meta_file.html +3 -3
  28. data/documentation/_build/html/genindex.html +3 -3
  29. data/documentation/_build/html/ide/eclipse/eclipse.html +3 -3
  30. data/documentation/_build/html/ide/eclipse/how_to_convert_existing_cdt_workspace.html +3 -3
  31. data/documentation/_build/html/ide/eclipse/how_to_create_a_new_project_in_eclipse.html +3 -3
  32. data/documentation/_build/html/ide/eclipse/how_to_create_a_workspace_in_eclipse.html +3 -3
  33. data/documentation/_build/html/ide/eclipse/how_to_debug_in_eclipse.html +3 -3
  34. data/documentation/_build/html/ide/eclipse/how_to_install_eclipse_plugin.html +3 -3
  35. data/documentation/_build/html/ide/eclipse/how_to_use_bake_in_eclipse.html +3 -3
  36. data/documentation/_build/html/ide/ide_integrations.html +3 -3
  37. data/documentation/_build/html/ide/vs/how_to_create_vs_projects.html +3 -3
  38. data/documentation/_build/html/ide/vs/how_to_debug_in_vs.html +3 -3
  39. data/documentation/_build/html/ide/vs/how_to_used_bake_in_vs.html +3 -3
  40. data/documentation/_build/html/ide/vs/vs.html +3 -3
  41. data/documentation/_build/html/ide/vs/vs_install.html +3 -3
  42. data/documentation/_build/html/index.html +10 -7
  43. data/documentation/_build/html/install/install_bake.html +3 -3
  44. data/documentation/_build/html/internal.html +3 -3
  45. data/documentation/_build/html/known_issues.html +3 -3
  46. data/documentation/_build/html/license.html +3 -3
  47. data/documentation/_build/html/performance/performance.html +5 -5
  48. data/documentation/_build/html/quickstart/quickstart.html +3 -3
  49. data/documentation/_build/html/search.html +3 -3
  50. data/documentation/_build/html/searchindex.js +1 -1
  51. data/documentation/_build/html/syntax/adapt_configs.html +3 -3
  52. data/documentation/_build/html/syntax/auto_adjustment.html +190 -0
  53. data/documentation/_build/html/syntax/derive_configs.html +3 -3
  54. data/documentation/_build/html/syntax/project_meta_syntax.html +23 -3
  55. data/documentation/_build/html/syntax/syntax.html +11 -7
  56. data/documentation/_build/html/syntax/variable_substitutions.html +54 -67
  57. data/documentation/_build/html/tips_and_tricks/{bundle.html → dot.html} +25 -19
  58. data/documentation/_build/html/tips_and_tricks/how_to_use_bake_with_cygwin.html +3 -3
  59. data/documentation/_build/html/tips_and_tricks/static_code_analysis.html +3 -3
  60. data/documentation/_build/html/tips_and_tricks/the_bakery.html +3 -3
  61. data/documentation/_build/html/tips_and_tricks/the_clang.html +5 -5
  62. data/documentation/_build/html/tips_and_tricks/tips_and_tricks.html +4 -4
  63. data/documentation/_build/html/why_bake/why_bake.html +5 -5
  64. data/lib/adapt/config/loader.rb +37 -35
  65. data/lib/bake/config/checks.rb +19 -11
  66. data/lib/bake/config/loader.rb +67 -60
  67. data/lib/bake/model/metamodel.rb +56 -30
  68. data/lib/bake/options/options.rb +37 -3
  69. data/lib/bake/options/usage.rb +12 -3
  70. data/lib/bake/subst.rb +5 -2
  71. data/lib/blocks/block.rb +27 -6
  72. data/lib/blocks/blockBase.rb +2 -17
  73. data/lib/blocks/compile.rb +91 -91
  74. data/lib/blocks/executable.rb +41 -41
  75. data/lib/common/version.rb +1 -1
  76. data/lib/tocxx.rb +212 -55
  77. metadata +16 -4
  78. data/documentation/_build/html/_sources/tips_and_tricks/bundle.txt +0 -24
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f884a69d7227c58640b9ce9ee280e1a4df32d187
4
- data.tar.gz: 8a60282cc0cc332250ad468e39a8eca781bb926a
3
+ metadata.gz: 4d9abca5ad68f7e5e78b4043e8a3d979dc662a73
4
+ data.tar.gz: c2666bd053263bbf16e86e5609541d08191ac566
5
5
  SHA512:
6
- metadata.gz: e59eb35575c63eb6a3abc708ad22bc5ecda93e1e727ff4547bd66a970840249fc84127b5cc1451e91bfd0cb628bafc42557a012e372d01e850f9d16867e998f0
7
- data.tar.gz: 440da1962f57b425975372251ab7fb44f8d1b5e9b89f6b0762ad2e777f32545a14e6868877e6bb8e9975081c81993cbdddc0b474089a51fa9c4ac5448ee6dfa2
6
+ metadata.gz: ef84a235c5295a12547daa67a456456db09f2fcb6a7e5a39b553fd0c2b9e7df9248e1eac11d407b2ab6fb50cce8d2f4d5ceb29d5a86e72b5daa24604f99177b7
7
+ data.tar.gz: 9fc8c950e6adc304fc009346d3fff588939c5dc68c1ea89133df3522c2283cb8f28dd8a47c66e8a16a69872dfc65a64dbe65bb4d1e39d235b87f2ad003d80c02
@@ -1,6 +1,18 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ September 5, 2016 - bake-toolkit 2.20.1
5
+ * Added: inject feature for dependencies
6
+ * Added: option to generate a dot graph file
7
+ * Added: *prebuild* feature for distribution builds
8
+ * Added: commandline option *--build_* to enable the old outputdir behaviour: *build_* instead of *build/*
9
+ * Added: printing out more information when loading Project.metas in verbosity level 3
10
+ * Changed: circular dependency warning moved from verbosity level 1 to 3
11
+ * Added: ToolchainName is now a predefined variable for Project.meta
12
+ * Added: --compile-only option (which is equal to the workaround -f ".")
13
+ * Bugfix: --adapt commandline option accepts absolute paths now
14
+ * Changed: removed the *bundle* feature
15
+
4
16
  August 12, 2016 - bake-toolkit 2.19.2
5
17
  * Bugfix: fixed TI linker error parser
6
18
 
@@ -9,4 +9,6 @@ Concepts
9
9
  the_main_project
10
10
  build_hierarchy
11
11
  link_order
12
+ prebuild
13
+ inject
12
14
 
@@ -0,0 +1,65 @@
1
+ Injection and inheritance of IncludeDir and Dependency
2
+ ******************************************************
3
+
4
+ It is possible to inject and inherit "includes" and inject "dependencies".
5
+
6
+ Inherit IncludeDir
7
+ ==================
8
+
9
+ .. code-block:: console
10
+
11
+ IncludeDir include, inherit: true
12
+
13
+ This is typically used to make include directories available to upper levels, e.g.:
14
+
15
+
16
+ .. code-block:: console
17
+
18
+ # in MyLib/Project.meta
19
+ LibraryConfig Lib {
20
+ ...
21
+ IncludeDir include, inherit: true
22
+ }
23
+
24
+ # in main/Project.meta
25
+ ExecutableConfig Debug {
26
+ ...
27
+ Dependency MyLib, config: Lib
28
+ # IncludeDir "MyLib/include" - not needed because this IncludeDir is inherited
29
+ }
30
+
31
+ Inject IncludeDir
32
+ =================
33
+
34
+ .. code-block:: console
35
+
36
+ IncludeDir "mock/include", inject: front
37
+
38
+ "front" is used for mocking IncludeDirs, e.g. if a library shall include a mocked class instead of the original one in UnitTest context.
39
+
40
+ .. code-block:: console
41
+
42
+ IncludeDir include, inject: back
43
+
44
+ "back" is used if the lower levels do not know by themselves what to include. So this has to be configured from the outside, typically in the main project.
45
+
46
+ Inject Dependency
47
+ =================
48
+
49
+ .. code-block:: console
50
+
51
+ Dependency MyLib, inject: front # or back
52
+
53
+ This is used if a component cannot have this dependency hard coded, because it shall not know the concrete implementation or the dependency is only used for unittesting.
54
+
55
+ Example:
56
+
57
+ .. code-block:: console
58
+
59
+ ExecutableConfig UnitTest {
60
+ ...
61
+ Dependency config: Lib
62
+ Dependency googleTest, inject: front
63
+ }
64
+
65
+ In this example the config Lib depends on googleTest. If googleTest inherits an IncludeDir, this would be known by Lib.
@@ -0,0 +1,56 @@
1
+ Prebuild configurations for distributions
2
+ *****************************************
3
+
4
+ This is a useful feature if you want to make a part of workspace available for third party without changing the configuration.
5
+
6
+ There are two major use cases:
7
+
8
+ - Only a few projects shall be closed source (e.g. to hide some algorithms)
9
+ - Only a few projects shall be open source (e.g. if a supplier has integrate a library)
10
+
11
+ Both is possible with bake, but the current UI is optimized for the latter one.
12
+
13
+ Add in the Project.meta the following code:
14
+
15
+ .. code-block:: console
16
+
17
+ Prebuild {
18
+ Except main, config: Debug
19
+ Except newLib, config: Debug
20
+ Except setup, config: Release
21
+ }
22
+
23
+ It is possible to specify the Prebuild tags in all configurations, not only in the main configuration. Logically they will be merged.
24
+
25
+ In the example above, no configurations will be built - except those three. The prebuild output is used directly.
26
+
27
+ To reference a configuration of the same project, omit the project name, e.g.:
28
+
29
+ .. code-block:: console
30
+
31
+ Except config: Base
32
+
33
+ To reference all configuration of a project, omit the config name, e.g.:
34
+
35
+ .. code-block:: console
36
+
37
+ Except newLib
38
+
39
+
40
+ This prebuild behaviour must be explicitly turned on by using the following the command line argument:
41
+
42
+ .. code-block:: console
43
+
44
+ --prebuild
45
+
46
+
47
+ Typical workflow
48
+ ----------------
49
+
50
+ 1. Compiling the workspace completely without prebuild feature.
51
+ 2. Executing a distribution script which copies all relevant files to a distribution directory.
52
+ Make sure to add all header files of prebuild libraries if they are needed for other non-prebuild libraries.
53
+ You may use the dependency files in the output directory for that script.
54
+ 3. In the distribution folder use "--prebuild" when compiling the workspace.
55
+
56
+
@@ -1,4 +1,4 @@
1
- bake 2.19.2
1
+ bake 2.20.1
2
2
  ==========================================
3
3
  bake, building software **fast** and **easy**!
4
4
 
@@ -0,0 +1,43 @@
1
+ Auto-adjustment of paths to existing projects
2
+ =============================================
3
+
4
+ If paths to other projects are needed, e.g. to "bootloaderUpdater", don't write a hard coded relative path like this:
5
+
6
+ .. code-block:: text
7
+
8
+ CommandLine "../bootloaderUpdater/tools/PrimaryBootloader2Include.exe
9
+
10
+ If paths to other projects are needed, e.g. to "bootloaderUpdater" just reference it starting from the project folder.
11
+
12
+ Example:
13
+
14
+ .. code-block:: text
15
+
16
+ CommandLine "bootloaderUpdater/tools/PrimaryBootloader2Include.exe
17
+
18
+ or:
19
+
20
+ .. code-block:: text
21
+
22
+ IncludeDir "myProjectName/bootloaderUpdater/whatever"
23
+
24
+
25
+
26
+ bake recognizes that the first part of the path is a valid project name and calculates the relative path to the project automatically.
27
+ If you have the special case that the referenced project is contained in an other workspace root, you can use the
28
+ `-w` parameter or you define a `roots.bake`.
29
+
30
+ .. note::
31
+
32
+ The path auto adjustment is applied for the following elements:
33
+
34
+ * IncludeDir
35
+
36
+ * ExternalLibrary
37
+
38
+ * ExternalLibrarySearchPath
39
+
40
+ * UserLibrary
41
+
42
+ * CommandLine
43
+
@@ -8,4 +8,4 @@ Syntax
8
8
  variable_substitutions
9
9
  derive_configs
10
10
  adapt_configs
11
-
11
+ auto_adjustment
@@ -1,18 +1,28 @@
1
1
  Variables in Project.meta
2
2
  =========================
3
- bake allows you to use pre defined and/or user defined variables in your Project.meta file.
4
- Defined variables then can be used using the following syntax:
3
+ bake allows you to use
4
+
5
+ - user defined
6
+ - predefined
7
+ - environment
8
+
9
+ variables in your Project.meta file (in this priority). If a variable is not found, it will be evaluated to an empty string.
10
+
11
+ Using variables
12
+ ***************
13
+
14
+ Variables can be used using the following syntax:
5
15
 
6
16
  .. code-block:: console
7
17
 
8
- $(MyIncludes)
18
+ $(ABC)
9
19
 
10
- The variable MyIncludes will be substitued by its value, therefore a real life usage would look
20
+ The variable ABC will be substituted by its value, therefore a real life usage would look
11
21
  something like this:
12
22
 
13
23
  .. code-block:: console
14
24
 
15
- IncludeDir "$(MyIncludes)"
25
+ IncludeDir "$(ABC)"
16
26
 
17
27
  User defined variables
18
28
  **********************
@@ -30,10 +40,12 @@ There are two ways to create user defined variables.
30
40
  .. code-block:: console
31
41
 
32
42
  Set MyVar, value: "Hello world!"
43
+ Set MyVar, cmd: "ruby calcVar.rb"
33
44
 
45
+ In the latter one the variable is set to the output of the command.
34
46
 
35
- Pre defined bake environment variables
36
- **************************************
47
+ Predefined bake environment variables
48
+ *************************************
37
49
 
38
50
  ======================================== =============================================== ========================================
39
51
  Variable Description Example
@@ -82,6 +94,8 @@ Variable Description
82
94
  *$(LinkerPath)* Evaluates to the base path of the /usr/bin
83
95
  linker
84
96
 
97
+ *$(ToolchainName)* Names of the used DefaultToolchain GCC
98
+
85
99
  *$(/)* Evalutes to the directory path seperator of Windows: \\, Other: /
86
100
  the current platform
87
101
 
@@ -89,33 +103,10 @@ Variable Description
89
103
  of the current platform
90
104
  ======================================== =============================================== ========================================
91
105
 
92
- .. tip::
93
-
94
- It is also possible to retrieve arbitrary an *environment variable* using the following syntax:
95
-
96
- .. code-block:: console
97
-
98
- $(EnvironmentVariable)
99
-
100
- Evaluates to the Environment with the specified name, if the specified environment variable does not exists
101
- it will be substituted by an empty string.
102
-
103
- .. note::
104
-
105
- Equal variables in the main config
106
-
107
- ======================================== ========================================
108
- Variable Is equal to
109
- ======================================== ========================================
110
- $(MainConfigName) $(ConfigName)
111
-
112
- $(MainProjectName) $(ProjectName)
113
- ======================================== ========================================
114
-
115
- .. warning::
116
-
117
- Variables in Dependency definitions are not allowed!
106
+ Environment variables
107
+ *********************
118
108
 
109
+ Usually used if system dependent stuff is needed like path to a specific tool etc.
119
110
 
120
111
  Nested variables
121
112
  ****************
@@ -125,51 +116,33 @@ Example:
125
116
 
126
117
  .. code-block:: console
127
118
 
128
- $(OutputDir,$(TheProject),$(TheConfig))
129
119
  $(ABC$(DEF)GH)
130
120
 
131
121
 
132
- Auto-adjustment of paths to existing projects
133
- *********************************************
134
- .. warning::
135
-
136
- If paths to other projects are needed, e.g. to "bootloaderUpdater", don't write a hard coded relative path like this:
137
-
138
- .. code-block:: text
139
-
140
- CommandLine "../bootloaderUpdater/tools/PrimaryBootloader2Include.exe
141
-
142
- If paths to other projects are needed, e.g. to "bootloaderUpdater" just reference it starting from the project folder.
143
-
144
- Example:
145
-
146
- .. code-block:: text
122
+ Complex variables
123
+ *****************
147
124
 
148
- CommandLine "bootloaderUpdater/tools/PrimaryBootloader2Include.exe
125
+ bake supports one complex variable:
149
126
 
150
- or:
151
-
152
- .. code-block:: text
153
-
154
- IncludeDir "myProjectName/bootloaderUpdater/whatever"
155
-
156
-
157
-
158
- bake recognizes that the first part of the path is a valid project name and calculates the relative path to the project automatically.
159
- If you have the special case that the referenced project is contained in an other workspace root, you can use the
160
- `-w` parameter or you define a `roots.bake`.
127
+ .. code-block:: console
161
128
 
162
- .. note::
129
+ $(OutputDir,$(TheProject),$(TheConfig))
163
130
 
164
- The path auto adjustment is applied for the following elements:
131
+ This will evaluate to the output directory of a specific configuration.
165
132
 
166
- * IncludeDir
133
+ Notes and warnings
134
+ ******************
167
135
 
168
- * ExternalLibrary
136
+ Equal variables in the main config:
169
137
 
170
- * ExternalLibrarySearchPath
138
+ ======================================== ========================================
139
+ Variable Is equal to
140
+ ======================================== ========================================
141
+ $(MainConfigName) $(ConfigName)
171
142
 
172
- * UserLibrary
143
+ $(MainProjectName) $(ProjectName)
144
+ ======================================== ========================================
173
145
 
174
- * CommandLine
146
+ .. warning::
175
147
 
148
+ Variables in Dependency definitions are not allowed!
@@ -0,0 +1,34 @@
1
+ Generating dot graphs
2
+ *********************
3
+
4
+ In larger workspaces it's often hard to understand the dependency structure. With bake you can generate a dot file (see http://www.graphviz.org):
5
+
6
+ .. code-block:: console
7
+
8
+ bake ... --dot <dot filename>
9
+
10
+ The dot file is a text file with all dependencies included. It is easy to render an image, e.g. with
11
+
12
+ .. code-block:: console
13
+
14
+ tred <dot filename> | dot -Tpng -o <png image filename>
15
+
16
+ .. image:: ../_static/dot.png
17
+
18
+ - Projects are rectangles
19
+ - Configs are ellipses
20
+ - CustomConfigs are red
21
+ - ExecutableConfigs are green
22
+ - LibraryConfigs are cyan
23
+
24
+ It's possible to generate only a part of the whole graph with -p (same as for building only a part of the code). e.g.:
25
+
26
+ .. code-block:: console
27
+
28
+ bake ... --dot <dot filename> -p lib2
29
+ bake ... --dot <dot filename> -p lib2,testa
30
+
31
+ Which results in:
32
+
33
+ .. image:: ../_static/dotP.png
34
+ .. image:: ../_static/dotPC.png
@@ -8,7 +8,7 @@ Tips and Tricks
8
8
  static_code_analysis
9
9
  how_to_use_bake_with_cygwin
10
10
  the_clang
11
- bundle
11
+ dot
12
12
 
13
13
 
14
14
  Unnecessary includes
@@ -143,7 +143,12 @@ z-index: 100;
143
143
  &nbsp; &nbsp; &nbsp; }<br>
144
144
  &nbsp; &nbsp; &nbsp; <span class="help" onMouseover="showLintPolicy()" onMouseout="notip()">LintPolicy</span> &#60;policy&#62;<br>
145
145
  &nbsp; &nbsp; &nbsp; <span class="help" onMouseover="showDocu()" onMouseout="notip()">Docu</span> &#60;cmdLine&#62;<br>
146
+ &nbsp; &nbsp; }<br>
147
+ &nbsp; &nbsp; <span class="help" onMouseover="showPrebuild()" onMouseout="notip()">Prebuild</span> {<br>
148
+ &nbsp; &nbsp; &nbsp; &nbsp; <span class="help" onMouseover="showExcept()" onMouseout="notip()">Except</span> &#60;project&#62;,
149
+ <span class="help" onMouseover="showExceptConfig()" onMouseout="notip()">config</span>: &#60;name&#62;<br>
146
150
  &nbsp; &nbsp; }<br></span><br>
151
+
147
152
  </span>
148
153
 
149
154
  <span id="libExe_part"><span class="show" style="background-color:#EEEEEE;">
@@ -543,6 +548,21 @@ function flagExample() {
543
548
  "&nbsp;&nbsp; An inherited flag string \"-abc -g3 -xy\" will end up in \"-abc -xy\"."
544
549
  }
545
550
 
551
+ function showPrebuild() {
552
+ str = 'If defined, all configs of the workspace will be skipped per default. Must be actived by the commandline option "--prebuild"'
553
+ ddrivetip("Prebuild", "No","0..1","No project/config is skipped",str)
554
+ }
555
+
556
+ function showExcept() {
557
+ str = 'Defines a project which shall not be skipped. If project name is omitted, the current project is used.'
558
+ ddrivetip("Except", "No","0..n","Every project is skipped",str)
559
+ }
560
+
561
+ function showExceptConfig() {
562
+ str = 'Defines a config which shall not be skipped. If omitted, all configs of the apprpriate project are not skipped.'
563
+ ddrivetip("Toolchain", "No","0..1","Every config is skipped",str)
564
+ }
565
+
546
566
 
547
567
  function showToolchainProject() {
548
568
  str = 'Toolchain adaptions for a project.'