From a66675e2833dd1340963bd825956f67221b516d6 Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Fri, 10 Jan 2014 17:24:16 -0600 Subject: ref-manual: Added note about curly brace parsing to BitBake chapter. (From yocto-docs rev: 91f199552f0012f1790dbac4d038eac101f2a274) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- documentation/ref-manual/ref-bitbake.xml | 40 ++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'documentation/ref-manual') 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 @@ configuration files or class files on which the .bb file depends change. + + + + 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 + } + + +
-- cgit v1.2.3-54-g00ecf