diff options
-rw-r--r-- | documentation/ref-manual/ref-bitbake.xml | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/documentation/ref-manual/ref-bitbake.xml b/documentation/ref-manual/ref-bitbake.xml index e24ea45281..28496dec9a 100644 --- a/documentation/ref-manual/ref-bitbake.xml +++ b/documentation/ref-manual/ref-bitbake.xml | |||
@@ -114,6 +114,46 @@ | |||
114 | configuration files or class files on which the | 114 | configuration files or class files on which the |
115 | <filename>.bb</filename> file depends change. | 115 | <filename>.bb</filename> file depends change. |
116 | </para> | 116 | </para> |
117 | |||
118 | <note> | ||
119 | <para> | ||
120 | You need to be aware of how BitBake parses curly braces. | ||
121 | If a recipe uses a closing curly brace within the function and | ||
122 | the character has no leading spaces, BitBake produces a parsing | ||
123 | error. | ||
124 | If you use a pair of curly brace in a shell function, the | ||
125 | closing curly brace must not be located at the start of the line | ||
126 | without leading spaces. | ||
127 | </para> | ||
128 | |||
129 | <para> | ||
130 | Here is an example that causes BitBake to produce a parsing | ||
131 | error: | ||
132 | <literallayout class='monospaced'> | ||
133 | fakeroot create_shar() { | ||
134 | cat << "EOF" > ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh | ||
135 | usage() | ||
136 | { | ||
137 | echo "test" | ||
138 | ###### The following "}" at the start of the line causes a parsing error ###### | ||
139 | } | ||
140 | EOF | ||
141 | } | ||
142 | </literallayout> | ||
143 | Writing the recipe this way avoids the error: | ||
144 | <literallayout class='monospaced'> | ||
145 | fakeroot create_shar() { | ||
146 | cat << "EOF" > ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh | ||
147 | usage() | ||
148 | { | ||
149 | echo "test" | ||
150 | ######The following "}" with a leading space at the start of the line avoids the error ###### | ||
151 | } | ||
152 | EOF | ||
153 | } | ||
154 | </literallayout> | ||
155 | </para> | ||
156 | </note> | ||
117 | </section> | 157 | </section> |
118 | 158 | ||
119 | <section id='ref-bitbake-providers'> | 159 | <section id='ref-bitbake-providers'> |