bake-toolkit 2.20.4 → 2.21.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/Rakefile.rb +3 -3
- data/bin/bake +46 -46
- data/bin/bake-doc +11 -11
- data/bin/bakery +179 -179
- data/bin/createVSProjects +213 -213
- data/documentation/_build/html/_sources/changelog.txt +456 -451
- data/documentation/_build/html/_sources/commandline/commandline.txt +107 -107
- data/documentation/_build/html/_sources/concepts/build_hierarchy.txt +34 -34
- data/documentation/_build/html/_sources/concepts/concepts.txt +14 -14
- data/documentation/_build/html/_sources/concepts/inject.txt +65 -65
- data/documentation/_build/html/_sources/concepts/link_order.txt +91 -91
- data/documentation/_build/html/_sources/concepts/prebuild.txt +56 -56
- data/documentation/_build/html/_sources/concepts/the_main_project.txt +45 -45
- data/documentation/_build/html/_sources/concepts/the_project_meta_file.txt +72 -72
- data/documentation/_build/html/_sources/ide/eclipse/eclipse.txt +25 -25
- data/documentation/_build/html/_sources/ide/eclipse/how_to_convert_existing_cdt_workspace.txt +31 -31
- data/documentation/_build/html/_sources/ide/eclipse/how_to_create_a_new_project_in_eclipse.txt +18 -18
- data/documentation/_build/html/_sources/ide/eclipse/how_to_create_a_workspace_in_eclipse.txt +27 -27
- data/documentation/_build/html/_sources/ide/eclipse/how_to_debug_in_eclipse.txt +38 -38
- data/documentation/_build/html/_sources/ide/eclipse/how_to_install_eclipse_plugin.txt +44 -44
- data/documentation/_build/html/_sources/ide/eclipse/how_to_use_bake_in_eclipse.txt +86 -86
- data/documentation/_build/html/_sources/ide/ide_integrations.txt +8 -8
- data/documentation/_build/html/_sources/ide/vs/how_to_create_vs_projects.txt +15 -15
- data/documentation/_build/html/_sources/ide/vs/how_to_debug_in_vs.txt +35 -35
- data/documentation/_build/html/_sources/ide/vs/how_to_used_bake_in_vs.txt +35 -35
- data/documentation/_build/html/_sources/ide/vs/vs.txt +10 -10
- data/documentation/_build/html/_sources/ide/vs/vs_install.txt +43 -43
- data/documentation/_build/html/_sources/index.txt +33 -33
- data/documentation/_build/html/_sources/install/install_bake.txt +112 -112
- data/documentation/_build/html/_sources/internal.txt +50 -50
- data/documentation/_build/html/_sources/known_issues.txt +9 -9
- data/documentation/_build/html/_sources/license.txt +4 -4
- data/documentation/_build/html/_sources/performance/performance.txt +104 -104
- data/documentation/_build/html/_sources/quickstart/quickstart.txt +70 -70
- data/documentation/_build/html/_sources/syntax/adapt_configs.txt +143 -143
- data/documentation/_build/html/_sources/syntax/auto_adjustment.txt +43 -43
- data/documentation/_build/html/_sources/syntax/derive_configs.txt +93 -94
- data/documentation/_build/html/_sources/syntax/project_meta_syntax.txt +19 -19
- data/documentation/_build/html/_sources/syntax/syntax.txt +11 -11
- data/documentation/_build/html/_sources/syntax/variable_substitutions.txt +147 -147
- data/documentation/_build/html/_sources/tips_and_tricks/dot.txt +34 -34
- data/documentation/_build/html/_sources/tips_and_tricks/how_to_use_bake_with_cygwin.txt +62 -62
- data/documentation/_build/html/_sources/tips_and_tricks/static_code_analysis.txt +122 -122
- data/documentation/_build/html/_sources/tips_and_tricks/the_bakery.txt +72 -72
- data/documentation/_build/html/_sources/tips_and_tricks/the_clang.txt +43 -43
- data/documentation/_build/html/_sources/tips_and_tricks/tips_and_tricks.txt +34 -34
- data/documentation/_build/html/_sources/why_bake/why_bake.txt +40 -40
- data/documentation/_build/html/changelog.html +7 -0
- data/documentation/_build/html/commandline/commandline.html +2 -2
- data/documentation/_build/html/concepts/link_order.html +2 -2
- data/documentation/_build/html/concepts/prebuild.html +2 -2
- data/documentation/_build/html/index.html +4 -4
- data/documentation/_build/html/performance/performance.html +2 -2
- data/documentation/_build/html/searchindex.js +1 -1
- data/documentation/_build/html/syntax/adapt_configs.html +2 -2
- data/documentation/_build/html/syntax/syntax.html +2 -2
- data/documentation/_build/html/tips_and_tricks/the_clang.html +2 -2
- data/documentation/_build/html/why_bake/why_bake.html +2 -2
- data/lib/adapt/config/loader.rb +112 -112
- data/lib/bake/bundle.rb +158 -158
- data/lib/bake/cache.rb +179 -180
- data/lib/bake/config/checks.rb +68 -68
- data/lib/bake/config/loader.rb +363 -363
- data/lib/bake/libElement.rb +176 -176
- data/lib/bake/mergeConfig.rb +208 -208
- data/lib/bake/model/language.rb +45 -45
- data/lib/bake/model/loader.rb +99 -99
- data/lib/bake/model/metamodel.rb +307 -307
- data/lib/bake/model/metamodel_ext.rb +27 -27
- data/lib/bake/options/create.rb +95 -95
- data/lib/bake/options/options.rb +315 -310
- data/lib/bake/options/showDoc.rb +20 -20
- data/lib/bake/options/showLicense.rb +9 -9
- data/lib/bake/options/showToolchains.rb +38 -38
- data/lib/bake/options/usage.rb +79 -68
- data/lib/bake/subst.rb +313 -313
- data/lib/bake/toolchain/clang.rb +44 -44
- data/lib/bake/toolchain/clang_analyze.rb +31 -31
- data/lib/bake/toolchain/colorizing_formatter.rb +125 -125
- data/lib/bake/toolchain/diab.rb +53 -53
- data/lib/bake/toolchain/errorparser/diab_compiler_error_parser.rb +40 -40
- data/lib/bake/toolchain/errorparser/diab_linker_error_parser.rb +41 -41
- data/lib/bake/toolchain/errorparser/error_parser.rb +71 -71
- data/lib/bake/toolchain/errorparser/gcc_compiler_error_parser.rb +35 -35
- data/lib/bake/toolchain/errorparser/gcc_linker_error_parser.rb +35 -35
- data/lib/bake/toolchain/errorparser/greenhills_compiler_error_parser.rb +32 -32
- data/lib/bake/toolchain/errorparser/greenhills_linker_error_parser.rb +44 -44
- data/lib/bake/toolchain/errorparser/keil_compiler_error_parser.rb +40 -40
- data/lib/bake/toolchain/errorparser/keil_linker_error_parser.rb +30 -30
- data/lib/bake/toolchain/errorparser/lint_error_parser.rb +34 -34
- data/lib/bake/toolchain/errorparser/msvc_compiler_error_parser.rb +63 -63
- data/lib/bake/toolchain/errorparser/msvc_linker_error_parser.rb +42 -42
- data/lib/bake/toolchain/errorparser/process_output.rb +2 -2
- data/lib/bake/toolchain/errorparser/ti_compiler_error_parser.rb +30 -30
- data/lib/bake/toolchain/errorparser/ti_linker_error_parser.rb +30 -30
- data/lib/bake/toolchain/gcc.rb +49 -49
- data/lib/bake/toolchain/gcc_env.rb +55 -55
- data/lib/bake/toolchain/greenhills.rb +52 -52
- data/lib/bake/toolchain/keil.rb +53 -53
- data/lib/bake/toolchain/lint.rb +20 -20
- data/lib/bake/toolchain/msvc.rb +58 -58
- data/lib/bake/toolchain/provider.rb +146 -146
- data/lib/bake/toolchain/ti.rb +47 -47
- data/lib/bake/util.rb +149 -149
- data/lib/bakery/buildPattern.rb +24 -24
- data/lib/bakery/model/language.rb +22 -22
- data/lib/bakery/model/loader.rb +55 -55
- data/lib/bakery/model/metamodel.rb +48 -48
- data/lib/bakery/options/options.rb +87 -87
- data/lib/bakery/toBake.rb +81 -81
- data/lib/blocks/block.rb +324 -324
- data/lib/blocks/blockBase.rb +204 -204
- data/lib/blocks/commandLine.rb +38 -38
- data/lib/blocks/compile.rb +529 -528
- data/lib/blocks/convert.rb +41 -41
- data/lib/blocks/docu.rb +30 -30
- data/lib/blocks/executable.rb +174 -174
- data/lib/blocks/has_execute_command.rb +31 -31
- data/lib/blocks/library.rb +114 -114
- data/lib/blocks/lint.rb +56 -56
- data/lib/blocks/makefile.rb +100 -100
- data/lib/blocks/showIncludes.rb +140 -125
- data/lib/common/abortException.rb +4 -4
- data/lib/common/cleanup.rb +10 -10
- data/lib/common/exit_helper.rb +38 -38
- data/lib/common/ext/file.rb +88 -88
- data/lib/common/ext/rtext.rb +11 -11
- data/lib/common/ext/stdout.rb +45 -45
- data/lib/common/ide_interface.rb +194 -194
- data/lib/common/options/parser.rb +95 -85
- data/lib/common/process.rb +64 -64
- data/lib/common/utils.rb +52 -52
- data/lib/common/version.rb +31 -23
- data/lib/multithread/job.rb +44 -44
- data/lib/tocxx.rb +558 -555
- data/lib/vs/options.rb +69 -69
- data/license.txt +90 -90
- metadata +2 -2
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
The Syntax of the Project.meta file
|
|
2
|
-
===================================
|
|
3
|
-
|
|
4
|
-
Instructions for the Interactive Syntax Viewer
|
|
5
|
-
**********************************************
|
|
6
|
-
|
|
7
|
-
* Move the mouse cursor over the blue elements to display more information.
|
|
8
|
-
|
|
9
|
-
* Three config types exist: ExecutableConfig, LibraryConfig and CustomConfig. Move the mouse cursor over these elements to display the supported content.
|
|
10
|
-
|
|
11
|
-
.. raw:: html
|
|
12
|
-
:file: ../_static/syntax.html
|
|
13
|
-
|
|
14
|
-
.. note::
|
|
15
|
-
Specify the paths always relative to the current project root, but keep the variable substitution in Project.meta in mind.
|
|
16
|
-
|
|
17
|
-
* Use double quotes (") if the strings have spaces or slashes.
|
|
18
|
-
|
|
19
|
-
* Use hash marks (#) for comments.
|
|
1
|
+
The Syntax of the Project.meta file
|
|
2
|
+
===================================
|
|
3
|
+
|
|
4
|
+
Instructions for the Interactive Syntax Viewer
|
|
5
|
+
**********************************************
|
|
6
|
+
|
|
7
|
+
* Move the mouse cursor over the blue elements to display more information.
|
|
8
|
+
|
|
9
|
+
* Three config types exist: ExecutableConfig, LibraryConfig and CustomConfig. Move the mouse cursor over these elements to display the supported content.
|
|
10
|
+
|
|
11
|
+
.. raw:: html
|
|
12
|
+
:file: ../_static/syntax.html
|
|
13
|
+
|
|
14
|
+
.. note::
|
|
15
|
+
Specify the paths always relative to the current project root, but keep the variable substitution in Project.meta in mind.
|
|
16
|
+
|
|
17
|
+
* Use double quotes (") if the strings have spaces or slashes.
|
|
18
|
+
|
|
19
|
+
* Use hash marks (#) for comments.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
Syntax
|
|
2
|
-
==========
|
|
3
|
-
|
|
4
|
-
.. toctree::
|
|
5
|
-
:maxdepth: 2
|
|
6
|
-
|
|
7
|
-
project_meta_syntax
|
|
8
|
-
variable_substitutions
|
|
9
|
-
derive_configs
|
|
10
|
-
adapt_configs
|
|
11
|
-
auto_adjustment
|
|
1
|
+
Syntax
|
|
2
|
+
==========
|
|
3
|
+
|
|
4
|
+
.. toctree::
|
|
5
|
+
:maxdepth: 2
|
|
6
|
+
|
|
7
|
+
project_meta_syntax
|
|
8
|
+
variable_substitutions
|
|
9
|
+
derive_configs
|
|
10
|
+
adapt_configs
|
|
11
|
+
auto_adjustment
|
|
@@ -1,148 +1,148 @@
|
|
|
1
|
-
Variables in Project.meta
|
|
2
|
-
=========================
|
|
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:
|
|
15
|
-
|
|
16
|
-
.. code-block:: console
|
|
17
|
-
|
|
18
|
-
$(ABC)
|
|
19
|
-
|
|
20
|
-
The variable ABC will be substituted by its value, therefore a real life usage would look
|
|
21
|
-
something like this:
|
|
22
|
-
|
|
23
|
-
.. code-block:: console
|
|
24
|
-
|
|
25
|
-
IncludeDir "$(ABC)"
|
|
26
|
-
|
|
27
|
-
User defined variables
|
|
28
|
-
**********************
|
|
29
|
-
|
|
30
|
-
There are two ways to create user defined variables.
|
|
31
|
-
|
|
32
|
-
#. The variable is defined with the `--set` command line option:
|
|
33
|
-
|
|
34
|
-
.. code-block:: console
|
|
35
|
-
|
|
36
|
-
User@Host:~$ bake ... --set MyVar="Hello world!"
|
|
37
|
-
|
|
38
|
-
#. THe variable is defined directly in the Project.meta file.
|
|
39
|
-
|
|
40
|
-
.. code-block:: console
|
|
41
|
-
|
|
42
|
-
Set MyVar, value: "Hello world!"
|
|
43
|
-
Set MyVar, cmd: "ruby calcVar.rb"
|
|
44
|
-
|
|
45
|
-
In the latter one the variable is set to the output of the command.
|
|
46
|
-
|
|
47
|
-
Predefined bake environment variables
|
|
48
|
-
*************************************
|
|
49
|
-
|
|
50
|
-
======================================== =============================================== ========================================
|
|
51
|
-
Variable Description Example
|
|
52
|
-
======================================== =============================================== ========================================
|
|
53
|
-
*$(MainConfigName)* Evaluates to the main config name Debug
|
|
54
|
-
|
|
55
|
-
*$(MainProjectName)* Evaluates to the main project name bootloader
|
|
56
|
-
|
|
57
|
-
*$(ConfigName)* Evaluates to the config name lib
|
|
58
|
-
|
|
59
|
-
*$(ProjectName)* Evaluates to the project name canDriver
|
|
60
|
-
|
|
61
|
-
*$(ProjectDir)* Evaluates to the full path of the project C:/Root/MyProject
|
|
62
|
-
directory
|
|
63
|
-
|
|
64
|
-
*$(MainProjectDir)* Evaluates to the full path of the root projec C:/Root/Main
|
|
65
|
-
directory
|
|
66
|
-
|
|
67
|
-
*$(OutputDir)* Evaluates to the full path of the output build/lib_bootloader_Debug
|
|
68
|
-
directory of the current config
|
|
69
|
-
|
|
70
|
-
*$(OutputDir,projName,confName)* Evaluates to the output dir of a specific build/lib_some_Debug
|
|
71
|
-
config
|
|
72
|
-
|
|
73
|
-
*$(ArtifactName)* Evaluates to the artifact. bootloader_1.0.elf
|
|
74
|
-
|
|
75
|
-
*$(ArtifactNameBase)* Evaluates to the base artifact name bootloader_1.0
|
|
76
|
-
(Without file exension)
|
|
77
|
-
|
|
78
|
-
*$(Time)* Evaluates to the current time 2012-12-24 20:00:00 +0200
|
|
79
|
-
|
|
80
|
-
*$(Hostname)* Evaluates to the hostname MY_COMPUTER
|
|
81
|
-
|
|
82
|
-
*$(CPPPath)* Evaluates to the base path of the /usr/bin
|
|
83
|
-
c++ compiler
|
|
84
|
-
|
|
85
|
-
*$(CPath)* Evaluates to the base path of the /usr/bin
|
|
86
|
-
c compiler
|
|
87
|
-
|
|
88
|
-
*$(ASMPath)* Evaluates to the base path of the /usr/bin
|
|
89
|
-
assembler
|
|
90
|
-
|
|
91
|
-
*$(ArchiverPath)* Evaluates to the base path of the /usr/bin
|
|
92
|
-
archiver
|
|
93
|
-
|
|
94
|
-
*$(LinkerPath)* Evaluates to the base path of the /usr/bin
|
|
95
|
-
linker
|
|
96
|
-
|
|
97
|
-
*$(ToolchainName)* Names of the used DefaultToolchain GCC
|
|
98
|
-
|
|
99
|
-
*$(/)* Evalutes to the directory path seperator of Windows: \\, Other: /
|
|
100
|
-
the current platform
|
|
101
|
-
|
|
102
|
-
*$(:)* Evaluates to the path variable seperator Windows: ;, Other: :
|
|
103
|
-
of the current platform
|
|
104
|
-
======================================== =============================================== ========================================
|
|
105
|
-
|
|
106
|
-
Environment variables
|
|
107
|
-
*********************
|
|
108
|
-
|
|
109
|
-
Usually used if system dependent stuff is needed like path to a specific tool etc.
|
|
110
|
-
|
|
111
|
-
Nested variables
|
|
112
|
-
****************
|
|
113
|
-
It is also possible to nest variables.
|
|
114
|
-
|
|
115
|
-
Example:
|
|
116
|
-
|
|
117
|
-
.. code-block:: console
|
|
118
|
-
|
|
119
|
-
$(ABC$(DEF)GH)
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
Complex variables
|
|
123
|
-
*****************
|
|
124
|
-
|
|
125
|
-
bake supports one complex variable:
|
|
126
|
-
|
|
127
|
-
.. code-block:: console
|
|
128
|
-
|
|
129
|
-
$(OutputDir,$(TheProject),$(TheConfig))
|
|
130
|
-
|
|
131
|
-
This will evaluate to the output directory of a specific configuration.
|
|
132
|
-
|
|
133
|
-
Notes and warnings
|
|
134
|
-
******************
|
|
135
|
-
|
|
136
|
-
Equal variables in the main config:
|
|
137
|
-
|
|
138
|
-
======================================== ========================================
|
|
139
|
-
Variable Is equal to
|
|
140
|
-
======================================== ========================================
|
|
141
|
-
$(MainConfigName) $(ConfigName)
|
|
142
|
-
|
|
143
|
-
$(MainProjectName) $(ProjectName)
|
|
144
|
-
======================================== ========================================
|
|
145
|
-
|
|
146
|
-
.. warning::
|
|
147
|
-
|
|
1
|
+
Variables in Project.meta
|
|
2
|
+
=========================
|
|
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:
|
|
15
|
+
|
|
16
|
+
.. code-block:: console
|
|
17
|
+
|
|
18
|
+
$(ABC)
|
|
19
|
+
|
|
20
|
+
The variable ABC will be substituted by its value, therefore a real life usage would look
|
|
21
|
+
something like this:
|
|
22
|
+
|
|
23
|
+
.. code-block:: console
|
|
24
|
+
|
|
25
|
+
IncludeDir "$(ABC)"
|
|
26
|
+
|
|
27
|
+
User defined variables
|
|
28
|
+
**********************
|
|
29
|
+
|
|
30
|
+
There are two ways to create user defined variables.
|
|
31
|
+
|
|
32
|
+
#. The variable is defined with the `--set` command line option:
|
|
33
|
+
|
|
34
|
+
.. code-block:: console
|
|
35
|
+
|
|
36
|
+
User@Host:~$ bake ... --set MyVar="Hello world!"
|
|
37
|
+
|
|
38
|
+
#. THe variable is defined directly in the Project.meta file.
|
|
39
|
+
|
|
40
|
+
.. code-block:: console
|
|
41
|
+
|
|
42
|
+
Set MyVar, value: "Hello world!"
|
|
43
|
+
Set MyVar, cmd: "ruby calcVar.rb"
|
|
44
|
+
|
|
45
|
+
In the latter one the variable is set to the output of the command.
|
|
46
|
+
|
|
47
|
+
Predefined bake environment variables
|
|
48
|
+
*************************************
|
|
49
|
+
|
|
50
|
+
======================================== =============================================== ========================================
|
|
51
|
+
Variable Description Example
|
|
52
|
+
======================================== =============================================== ========================================
|
|
53
|
+
*$(MainConfigName)* Evaluates to the main config name Debug
|
|
54
|
+
|
|
55
|
+
*$(MainProjectName)* Evaluates to the main project name bootloader
|
|
56
|
+
|
|
57
|
+
*$(ConfigName)* Evaluates to the config name lib
|
|
58
|
+
|
|
59
|
+
*$(ProjectName)* Evaluates to the project name canDriver
|
|
60
|
+
|
|
61
|
+
*$(ProjectDir)* Evaluates to the full path of the project C:/Root/MyProject
|
|
62
|
+
directory
|
|
63
|
+
|
|
64
|
+
*$(MainProjectDir)* Evaluates to the full path of the root projec C:/Root/Main
|
|
65
|
+
directory
|
|
66
|
+
|
|
67
|
+
*$(OutputDir)* Evaluates to the full path of the output build/lib_bootloader_Debug
|
|
68
|
+
directory of the current config
|
|
69
|
+
|
|
70
|
+
*$(OutputDir,projName,confName)* Evaluates to the output dir of a specific build/lib_some_Debug
|
|
71
|
+
config
|
|
72
|
+
|
|
73
|
+
*$(ArtifactName)* Evaluates to the artifact. bootloader_1.0.elf
|
|
74
|
+
|
|
75
|
+
*$(ArtifactNameBase)* Evaluates to the base artifact name bootloader_1.0
|
|
76
|
+
(Without file exension)
|
|
77
|
+
|
|
78
|
+
*$(Time)* Evaluates to the current time 2012-12-24 20:00:00 +0200
|
|
79
|
+
|
|
80
|
+
*$(Hostname)* Evaluates to the hostname MY_COMPUTER
|
|
81
|
+
|
|
82
|
+
*$(CPPPath)* Evaluates to the base path of the /usr/bin
|
|
83
|
+
c++ compiler
|
|
84
|
+
|
|
85
|
+
*$(CPath)* Evaluates to the base path of the /usr/bin
|
|
86
|
+
c compiler
|
|
87
|
+
|
|
88
|
+
*$(ASMPath)* Evaluates to the base path of the /usr/bin
|
|
89
|
+
assembler
|
|
90
|
+
|
|
91
|
+
*$(ArchiverPath)* Evaluates to the base path of the /usr/bin
|
|
92
|
+
archiver
|
|
93
|
+
|
|
94
|
+
*$(LinkerPath)* Evaluates to the base path of the /usr/bin
|
|
95
|
+
linker
|
|
96
|
+
|
|
97
|
+
*$(ToolchainName)* Names of the used DefaultToolchain GCC
|
|
98
|
+
|
|
99
|
+
*$(/)* Evalutes to the directory path seperator of Windows: \\, Other: /
|
|
100
|
+
the current platform
|
|
101
|
+
|
|
102
|
+
*$(:)* Evaluates to the path variable seperator Windows: ;, Other: :
|
|
103
|
+
of the current platform
|
|
104
|
+
======================================== =============================================== ========================================
|
|
105
|
+
|
|
106
|
+
Environment variables
|
|
107
|
+
*********************
|
|
108
|
+
|
|
109
|
+
Usually used if system dependent stuff is needed like path to a specific tool etc.
|
|
110
|
+
|
|
111
|
+
Nested variables
|
|
112
|
+
****************
|
|
113
|
+
It is also possible to nest variables.
|
|
114
|
+
|
|
115
|
+
Example:
|
|
116
|
+
|
|
117
|
+
.. code-block:: console
|
|
118
|
+
|
|
119
|
+
$(ABC$(DEF)GH)
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
Complex variables
|
|
123
|
+
*****************
|
|
124
|
+
|
|
125
|
+
bake supports one complex variable:
|
|
126
|
+
|
|
127
|
+
.. code-block:: console
|
|
128
|
+
|
|
129
|
+
$(OutputDir,$(TheProject),$(TheConfig))
|
|
130
|
+
|
|
131
|
+
This will evaluate to the output directory of a specific configuration.
|
|
132
|
+
|
|
133
|
+
Notes and warnings
|
|
134
|
+
******************
|
|
135
|
+
|
|
136
|
+
Equal variables in the main config:
|
|
137
|
+
|
|
138
|
+
======================================== ========================================
|
|
139
|
+
Variable Is equal to
|
|
140
|
+
======================================== ========================================
|
|
141
|
+
$(MainConfigName) $(ConfigName)
|
|
142
|
+
|
|
143
|
+
$(MainProjectName) $(ProjectName)
|
|
144
|
+
======================================== ========================================
|
|
145
|
+
|
|
146
|
+
.. warning::
|
|
147
|
+
|
|
148
148
|
Variables in Dependency definitions are not allowed!
|
|
@@ -1,34 +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
|
|
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
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
How to use bake with cygwin
|
|
2
|
-
===========================
|
|
3
|
-
Why using Cygwin on Windows instead of the built-in command shell?
|
|
4
|
-
There is one major reason: Cygwin supports **colored output** via ansi escape sequences.
|
|
5
|
-
Note, that these steps differ depending on the Cygwin version, installed packages and configuration.
|
|
6
|
-
|
|
7
|
-
#. Get rid of the cygdrive prefix
|
|
8
|
-
|
|
9
|
-
.. image:: ../_static/cygwin_mount.png
|
|
10
|
-
:width: 100 %
|
|
11
|
-
:scale: 50 %
|
|
12
|
-
|
|
13
|
-
As you see, "c:" is now "/c" and not "/cygdrive/c" anymore.
|
|
14
|
-
|
|
15
|
-
.. note::
|
|
16
|
-
|
|
17
|
-
In newer Cygwin versions, this is not permanent. To make it permanent,
|
|
18
|
-
add the following line to /etc/fstab (can be found in your Cygwin installation directory):
|
|
19
|
-
|
|
20
|
-
.. code-block:: console
|
|
21
|
-
|
|
22
|
-
none / cygdrive binary,posix=0,user 0 0
|
|
23
|
-
|
|
24
|
-
#. Get rid of the Cygwin ruby
|
|
25
|
-
|
|
26
|
-
.. image:: ../_static/cygwin_ruby.png
|
|
27
|
-
:width: 100 %
|
|
28
|
-
:scale: 50 %
|
|
29
|
-
|
|
30
|
-
Easiest way is to rename the Cygwin ruby, which makes the original ruby visible.
|
|
31
|
-
This is only necessary if you have ruby installed in our Cygwin environment.
|
|
32
|
-
|
|
33
|
-
#. Add tty to CYGWIN option
|
|
34
|
-
|
|
35
|
-
.. image:: ../_static/cygwin_tty.png
|
|
36
|
-
:width: 100 %
|
|
37
|
-
:scale: 70 %
|
|
38
|
-
|
|
39
|
-
"tty" must be added to the CYGWIN system variable.
|
|
40
|
-
|
|
41
|
-
#. Switch to raw mode
|
|
42
|
-
|
|
43
|
-
The ctrl-c handler in Cygwin only works for programs compiled with the correct Cygwin libs. This does not apply to
|
|
44
|
-
most ruby installations. Hitting ctrl-c may interrupt the compiler, but bake does not get this signal.
|
|
45
|
-
|
|
46
|
-
You can set the Cygwin console to raw mode:
|
|
47
|
-
|
|
48
|
-
.. code-block:: console
|
|
49
|
-
|
|
50
|
-
stty raw
|
|
51
|
-
|
|
52
|
-
Now bake can read ctrl-c as raw character on stdin. Bake will abort after all subprocesses - like the running compilation steps - have returned.
|
|
53
|
-
|
|
54
|
-
#. Start the build
|
|
55
|
-
|
|
56
|
-
Use the parameter "-a black" or "-a white" depending on the background color of your shell.
|
|
57
|
-
Depending on your Cygwin installation, you have to call "bake.bat" instead of "bake". To avoid this, create an alias, e.g:
|
|
58
|
-
|
|
59
|
-
.. code-block:: console
|
|
60
|
-
|
|
61
|
-
alias bake=/c/Programme/_dev/Ruby192/bin/bake.bat
|
|
62
|
-
|
|
1
|
+
How to use bake with cygwin
|
|
2
|
+
===========================
|
|
3
|
+
Why using Cygwin on Windows instead of the built-in command shell?
|
|
4
|
+
There is one major reason: Cygwin supports **colored output** via ansi escape sequences.
|
|
5
|
+
Note, that these steps differ depending on the Cygwin version, installed packages and configuration.
|
|
6
|
+
|
|
7
|
+
#. Get rid of the cygdrive prefix
|
|
8
|
+
|
|
9
|
+
.. image:: ../_static/cygwin_mount.png
|
|
10
|
+
:width: 100 %
|
|
11
|
+
:scale: 50 %
|
|
12
|
+
|
|
13
|
+
As you see, "c:" is now "/c" and not "/cygdrive/c" anymore.
|
|
14
|
+
|
|
15
|
+
.. note::
|
|
16
|
+
|
|
17
|
+
In newer Cygwin versions, this is not permanent. To make it permanent,
|
|
18
|
+
add the following line to /etc/fstab (can be found in your Cygwin installation directory):
|
|
19
|
+
|
|
20
|
+
.. code-block:: console
|
|
21
|
+
|
|
22
|
+
none / cygdrive binary,posix=0,user 0 0
|
|
23
|
+
|
|
24
|
+
#. Get rid of the Cygwin ruby
|
|
25
|
+
|
|
26
|
+
.. image:: ../_static/cygwin_ruby.png
|
|
27
|
+
:width: 100 %
|
|
28
|
+
:scale: 50 %
|
|
29
|
+
|
|
30
|
+
Easiest way is to rename the Cygwin ruby, which makes the original ruby visible.
|
|
31
|
+
This is only necessary if you have ruby installed in our Cygwin environment.
|
|
32
|
+
|
|
33
|
+
#. Add tty to CYGWIN option
|
|
34
|
+
|
|
35
|
+
.. image:: ../_static/cygwin_tty.png
|
|
36
|
+
:width: 100 %
|
|
37
|
+
:scale: 70 %
|
|
38
|
+
|
|
39
|
+
"tty" must be added to the CYGWIN system variable.
|
|
40
|
+
|
|
41
|
+
#. Switch to raw mode
|
|
42
|
+
|
|
43
|
+
The ctrl-c handler in Cygwin only works for programs compiled with the correct Cygwin libs. This does not apply to
|
|
44
|
+
most ruby installations. Hitting ctrl-c may interrupt the compiler, but bake does not get this signal.
|
|
45
|
+
|
|
46
|
+
You can set the Cygwin console to raw mode:
|
|
47
|
+
|
|
48
|
+
.. code-block:: console
|
|
49
|
+
|
|
50
|
+
stty raw
|
|
51
|
+
|
|
52
|
+
Now bake can read ctrl-c as raw character on stdin. Bake will abort after all subprocesses - like the running compilation steps - have returned.
|
|
53
|
+
|
|
54
|
+
#. Start the build
|
|
55
|
+
|
|
56
|
+
Use the parameter "-a black" or "-a white" depending on the background color of your shell.
|
|
57
|
+
Depending on your Cygwin installation, you have to call "bake.bat" instead of "bake". To avoid this, create an alias, e.g:
|
|
58
|
+
|
|
59
|
+
.. code-block:: console
|
|
60
|
+
|
|
61
|
+
alias bake=/c/Programme/_dev/Ruby192/bin/bake.bat
|
|
62
|
+
|