summaryrefslogtreecommitdiffstats
path: root/documentation/dev-manual/dev-manual-common-tasks.xml
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/dev-manual/dev-manual-common-tasks.xml')
-rw-r--r--documentation/dev-manual/dev-manual-common-tasks.xml36
1 files changed, 36 insertions, 0 deletions
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml
index 9f8fb333dc..7d8b84986c 100644
--- a/documentation/dev-manual/dev-manual-common-tasks.xml
+++ b/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -726,6 +726,42 @@
726 types of packages. 726 types of packages.
727 </para> 727 </para>
728 728
729 <note>
730 <para>When writing shell functions, you need to be aware of BitBake's
731 curly brace parsing.
732 If a recipe uses a closing curly brace within the function and
733 the character has no leading spaces, BitBake produces a parsing
734 error.
735 If you use a pair of curly brace in a shell function, the
736 closing curly brace must not be located at the start of the line
737 without leading spaces.</para>
738 <para>Here is an example that causes BitBake to produce a parsing
739 error:
740 <literallayout class='monospaced'>
741 fakeroot create_shar() {
742 cat &lt;&lt; "EOF" &gt; ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
743 usage()
744 {
745 echo "test"
746 ###### The following "}" at the start of the line causes a parsing error ######
747 }
748 EOF
749 }
750 </literallayout>
751 Writing the recipe this way avoids the error:
752 <literallayout class='monospaced'>
753 fakeroot create_shar() {
754 cat &lt;&lt; "EOF" &gt; ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
755 usage()
756 {
757 echo "test"
758 ######The following "}" with a leading space at the start of the line avoids the error ######
759 }
760 EOF
761 }
762 </literallayout></para>
763 </note>
764
729 <section id='usingpoky-extend-addpkg-singlec'> 765 <section id='usingpoky-extend-addpkg-singlec'>
730 <title>Single .c File Package (Hello World!)</title> 766 <title>Single .c File Package (Hello World!)</title>
731 767