summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Rifenbark <srifenbark@gmail.com>2017-09-02 10:01:47 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-09-13 17:19:15 +0100
commitc5820a3961347a7a02dbbbf76400af0f0fe60435 (patch)
tree6ca673e3e9f319183bc40f013eacf22d47467d79
parent56bc7c071f46e6b9edef731707a7c66056b16c63 (diff)
downloadpoky-c5820a3961347a7a02dbbbf76400af0f0fe60435.tar.gz
bitbake: bitbake-user-manual: Clarified inherit, include, require relationships
Fixes [YOCTO #12032] I applied some re-writing to help clarify the relationships between the inherit, include, and require directives. (Bitbake rev: fded970a0709d928f70224d8b61534e9353ee6dd) Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml41
1 files changed, 34 insertions, 7 deletions
diff --git a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml
index 999d295e13..310b9d20d6 100644
--- a/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml
+++ b/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml
@@ -899,11 +899,12 @@
899 899
900 <para> 900 <para>
901 The <filename>inherit</filename> directive is a rudimentary 901 The <filename>inherit</filename> directive is a rudimentary
902 means of specifying what classes of functionality your 902 means of specifying functionality contained in class files
903 recipes require. 903 that your recipes require.
904 For example, you can easily abstract out the tasks involved in 904 For example, you can easily abstract out the tasks involved in
905 building a package that uses Autoconf and Automake and put 905 building a package that uses Autoconf and Automake and put
906 those tasks into a class file that can be used by your recipe. 906 those tasks into a class file and then have your recipe
907 inherit that class file.
907 </para> 908 </para>
908 909
909 <para> 910 <para>
@@ -925,10 +926,13 @@
925 </para> 926 </para>
926 927
927 <para> 928 <para>
928 If necessary, it is possible to inherit a class 929 An advantage with the inherit directive as compared to both
929 conditionally by using 930 the
930 a variable expression after the <filename>inherit</filename> 931 <link linkend='include-directive'>include</link> and
931 statement. 932 <link linkend='require-inclusion'>require</link> directives
933 is that you can inherit class files conditionally.
934 You can accomplish this by using a variable expression
935 after the <filename>inherit</filename> statement.
932 Here is an example: 936 Here is an example:
933 <literallayout class='monospaced'> 937 <literallayout class='monospaced'>
934 inherit ${VARNAME} 938 inherit ${VARNAME}
@@ -985,6 +989,17 @@
985 </para> 989 </para>
986 990
987 <para> 991 <para>
992 The include directive is a more generic method of including
993 functionality as compared to the
994 <link linkend='inherit-directive'>inherit</link> directive,
995 which is restricted to class (i.e. <filename>.bbclass</filename>)
996 files.
997 The include directive is applicable for any other kind of
998 shared or encapsulated functionality or configuration that
999 does not suit a <filename>.bbclass</filename> file.
1000 </para>
1001
1002 <para>
988 As an example, suppose you needed a recipe to include some 1003 As an example, suppose you needed a recipe to include some
989 self-test definitions: 1004 self-test definitions:
990 <literallayout class='monospaced'> 1005 <literallayout class='monospaced'>
@@ -1018,6 +1033,18 @@
1018 </para> 1033 </para>
1019 1034
1020 <para> 1035 <para>
1036 The require directive, like the include directive previously
1037 described, is a more generic method of including
1038 functionality as compared to the
1039 <link linkend='inherit-directive'>inherit</link> directive,
1040 which is restricted to class (i.e. <filename>.bbclass</filename>)
1041 files.
1042 The require directive is applicable for any other kind of
1043 shared or encapsulated functionality or configuration that
1044 does not suit a <filename>.bbclass</filename> file.
1045 </para>
1046
1047 <para>
1021 Similar to how BitBake handles 1048 Similar to how BitBake handles
1022 <link linkend='include-directive'><filename>include</filename></link>, 1049 <link linkend='include-directive'><filename>include</filename></link>,
1023 if the path specified 1050 if the path specified