From 790cc61a754d156c15f77c95539e17ec4d9f2c41 Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Fri, 28 Mar 2014 13:12:52 +0000 Subject: [PATCH] bitbake: user-manual-execution.xml: Added how BB processes curly braces. (Bitbake rev: f4ebc4de63d64e3b5f87e1d0f51507760c3d82d7) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- .../doc/user-manual/user-manual-execution.xml | 93 ++++++++----------- 1 file changed, 40 insertions(+), 53 deletions(-) diff --git a/bitbake/doc/user-manual/user-manual-execution.xml b/bitbake/doc/user-manual/user-manual-execution.xml index d5a288c03f..1cb7fc63ce 100644 --- a/bitbake/doc/user-manual/user-manual-execution.xml +++ b/bitbake/doc/user-manual/user-manual-execution.xml @@ -151,59 +151,6 @@ The "Variables Glossary" chapter presents a full list of variables. - @@ -235,6 +182,46 @@ shows you the many configuration files and class files used in your execution environment. + + + + You need to be aware of how BitBake parses curly braces. + If a recipe uses a closing curly brace within the function and + the character has no leading spaces, BitBake produces a parsing + error. + If you use a pair of curly brace in a shell function, the + closing curly brace must not be located at the start of the line + without leading spaces. + + + + Here is an example that causes BitBake to produce a parsing + error: + + fakeroot create_shar() { + cat << "EOF" > ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh + usage() + { + echo "test" + ###### The following "}" at the start of the line causes a parsing error ###### + } + EOF + } + + Writing the recipe this way avoids the error: + + fakeroot create_shar() { + cat << "EOF" > ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh + usage() + { + echo "test" + ######The following "}" with a leading space at the start of the line avoids the error ###### + } + EOF + } + + +