summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Rifenbark <scott.m.rifenbark@intel.com>2014-01-10 17:24:16 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-01-21 21:58:00 +0000
commita66675e2833dd1340963bd825956f67221b516d6 (patch)
tree2027974b6461a83eecd9440aa768974e91cd705b
parentc113777087cd64992a5b7d6d4607190ecc401411 (diff)
downloadpoky-a66675e2833dd1340963bd825956f67221b516d6.tar.gz
ref-manual: Added note about curly brace parsing to BitBake chapter.
(From yocto-docs rev: 91f199552f0012f1790dbac4d038eac101f2a274) Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--documentation/ref-manual/ref-bitbake.xml40
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 &lt;&lt; "EOF" &gt; ${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 &lt;&lt; "EOF" &gt; ${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'>