summaryrefslogtreecommitdiffstats
path: root/bitbake/doc
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/doc')
-rw-r--r--bitbake/doc/manual/usermanual.xml29
1 files changed, 24 insertions, 5 deletions
diff --git a/bitbake/doc/manual/usermanual.xml b/bitbake/doc/manual/usermanual.xml
index c314236c6f..7eb12035ad 100644
--- a/bitbake/doc/manual/usermanual.xml
+++ b/bitbake/doc/manual/usermanual.xml
@@ -17,7 +17,7 @@
17 <holder>Phil Blundell</holder> 17 <holder>Phil Blundell</holder>
18 </copyright> 18 </copyright>
19 <legalnotice> 19 <legalnotice>
20 <para>This work is licensed under the Creative Commons Attribution License. To view a copy of this license, visit <ulink url="http://creativecommons.org/licenses/by/2.0/">http://creativecommons.org/licenses/by/2.0/</ulink> or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.</para> 20 <para>This work is licensed under the Creative Commons Attribution License. To view a copy of this license, visit <ulink url="http://creativecommons.org/licenses/by/2.5/">http://creativecommons.org/licenses/by/2.5/</ulink> or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.</para>
21 </legalnotice> 21 </legalnotice>
22 </bookinfo> 22 </bookinfo>
23 <chapter> 23 <chapter>
@@ -195,7 +195,7 @@ addtask printdate before do_build</screen></para>
195 <section> 195 <section>
196 <title>Events</title> 196 <title>Events</title>
197 <para><emphasis>NOTE:</emphasis> This is only supported in .bb and .bbclass files.</para> 197 <para><emphasis>NOTE:</emphasis> This is only supported in .bb and .bbclass files.</para>
198 <para>BitBake also implements a means of registering event handlers. Events are triggered at certain points during operation, such as, the beginning of operation against a given .bb, the start of a given task, task failure, task success, et cetera. The intent was to make it easy to do things like email notifications on build failure.</para> 198 <para>BitBake allows to install event handlers. Events are triggered at certain points during operation, such as, the beginning of operation against a given .bb, the start of a given task, task failure, task success, et cetera. The intent was to make it easy to do things like email notifications on build failure.</para>
199 <para><screen>addhandler myclass_eventhandler 199 <para><screen>addhandler myclass_eventhandler
200python myclass_eventhandler() { 200python myclass_eventhandler() {
201 from bb.event import NotHandled, getName 201 from bb.event import NotHandled, getName
@@ -205,6 +205,7 @@ python myclass_eventhandler() {
205 print "The file we run for is %s" % data.getVar('FILE', e.data, True) 205 print "The file we run for is %s" % data.getVar('FILE', e.data, True)
206 206
207 return NotHandled 207 return NotHandled
208}
208</screen></para><para> 209</screen></para><para>
209This event handler gets called every time an event is triggered. A global variable <varname>e</varname> is defined. <varname>e</varname>.data contains an instance of bb.data. With the getName(<varname>e</varname>) 210This event handler gets called every time an event is triggered. A global variable <varname>e</varname> is defined. <varname>e</varname>.data contains an instance of bb.data. With the getName(<varname>e</varname>)
210method one can get the name of the triggered event.</para><para>The above event handler prints the name 211method one can get the name of the triggered event.</para><para>The above event handler prints the name
@@ -344,15 +345,19 @@ options:
344 cannot be remade, the other dependencies of these 345 cannot be remade, the other dependencies of these
345 targets can be processed all the same. 346 targets can be processed all the same.
346 -f, --force force run of specified cmd, regardless of stamp status 347 -f, --force force run of specified cmd, regardless of stamp status
347 -i, --interactive drop into the interactive mode. 348 -i, --interactive drop into the interactive mode also called the BitBake
349 shell.
348 -c CMD, --cmd=CMD Specify task to execute. Note that this only executes 350 -c CMD, --cmd=CMD Specify task to execute. Note that this only executes
349 the specified task for the providee and the packages 351 the specified task for the providee and the packages
350 it depends on, i.e. 'compile' does not implicitly call 352 it depends on, i.e. 'compile' does not implicitly call
351 stage for the dependencies (IOW: use only if you know 353 stage for the dependencies (IOW: use only if you know
352 what you are doing) 354 what you are doing). Depending on the base.bbclass a
355 listtaks tasks is defined and will show available
356 tasks
353 -r FILE, --read=FILE read the specified file before bitbake.conf 357 -r FILE, --read=FILE read the specified file before bitbake.conf
354 -v, --verbose output more chit-chat to the terminal 358 -v, --verbose output more chit-chat to the terminal
355 -D, --debug Increase the debug level 359 -D, --debug Increase the debug level. You can specify this more
360 than once.
356 -n, --dry-run don't execute, just go through the motions 361 -n, --dry-run don't execute, just go through the motions
357 -p, --parse-only quit after parsing the BB files (developers only) 362 -p, --parse-only quit after parsing the BB files (developers only)
358 -d, --disable-psyco disable using the psyco just-in-time compiler (not 363 -d, --disable-psyco disable using the psyco just-in-time compiler (not
@@ -360,6 +365,12 @@ options:
360 -s, --show-versions show current and preferred versions of all packages 365 -s, --show-versions show current and preferred versions of all packages
361 -e, --environment show the global or per-package environment (this is 366 -e, --environment show the global or per-package environment (this is
362 what used to be bbread) 367 what used to be bbread)
368 -g, --graphviz emit the dependency trees of the specified packages in
369 the dot syntax
370 -I IGNORED_DOT_DEPS, --ignore-deps=IGNORED_DOT_DEPS
371 Stop processing at the given list of dependencies when
372 generating dependency graphs. This can help to make
373 the graph more appealing
363 374
364</screen> 375</screen>
365 </para> 376 </para>
@@ -386,6 +397,14 @@ options:
386 <screen><prompt>$ </prompt>bitbake virtual/whatever</screen> 397 <screen><prompt>$ </prompt>bitbake virtual/whatever</screen>
387 <screen><prompt>$ </prompt>bitbake -c clean virtual/whatever</screen> 398 <screen><prompt>$ </prompt>bitbake -c clean virtual/whatever</screen>
388 </example> 399 </example>
400 <example>
401 <title>Generating dependency graphs</title>
402 <para>BitBake is able to generate dependency graphs using the dot syntax. These graphs can be converted
403to images using the <application>dot</application> application from <ulink url="http://www.graphviz.org">graphviz</ulink>.
404Three files will be written into the current working directory, <emphasis>depends.dot</emphasis> containing <varname>DEPENDS</varname> variables, <emphasis>rdepends.dot</emphasis> and <emphasis>alldepends.dot</emphasis> containing both <varname>DEPENDS</varname> and <varname>RDEPENDS</varname>. To stop depending on common depends one can use the <prompt>-I depend</prompt> to omit these from the graph. This can lead to more readable graphs. E.g. this way <varname>DEPENDS</varname> from inherited classes, e.g. base.bbclass, can be removed from the graph.</para>
405 <screen><prompt>$ </prompt>bitbake -g blah</screen>
406 <screen><prompt>$ </prompt>bitbake -g -I virtual/whatever -I bloom blah</screen>
407 </example>
389 </para> 408 </para>
390 </section> 409 </section>
391 <section> 410 <section>