Bug 9964 - Suggested fleshing out of the do_compile documentation
Summary: Suggested fleshing out of the do_compile documentation
Status: RESOLVED FIXED
Alias: None
Product: Reference
Classification: Documentation
Component: handbook (show other bugs)
Version: 2.3
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.2 M3
Assignee: Scott Rifenbark
QA Contact:
URL:
Whiteboard: 29 July 2016: IN PROGRESS REVIEW
Depends on:
Blocks:
 
Reported: 2016-07-18 07:25 UTC by ulfalizer
Modified: 2016-08-01 17:59 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Done (doc changes complete)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ulfalizer 2016-07-18 07:25:11 UTC
Section '8.1.3. do_compile' is very sparse at the moment. I suggest extending it as follows to cover the default behavior and making it clearer that the working directory is ${B}:

  8.1.3. do_compile

  Compiles the source code. Runs with the current working directory set
  to ${B}.

  The default behavior of this task is to run 'oe_runmake' if a makefile
  ("Makefile", "makefile", or "GNUmakefile") is found, and doing nothing
  otherwise.



To also add some documentation for oe_runmake, the final sentence of '7.4. base.bbclass' could be extended from

  The class also contains some commonly used functions such as oe_runmake.

to

  The class also contains some commonly used functions such as
  'oe_runmake', which runs 'make' with the arguments specified in
  EXTRA_OEMAKE (in addition to the arguments passed directly to
  'oe_runmake').



To make it easier to discover how a task gets its current working directory, the sentence

  The do_deploy[dirs] = "${DEPLOYDIR} ${B}" line creates ${DEPLOYDIR} and
  ${B} before the do_deploy task runs.

in '4.3.3. Shared State' could be extended to

  The do_deploy[dirs] = "${DEPLOYDIR} ${B}" line creates ${DEPLOYDIR} and
  ${B} before the do_deploy task runs, and also sets the current working
  directory of do_deploy to ${B}.
Comment 1 Scott Rifenbark 2016-07-18 18:49:20 UTC
Ulf, 

Thanks for helping to describe these more.  They are indeed very sparse.

Here is the change in the do_compile task section - http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#ref-tasks-compile

Here is the change in the base.bbclass section - http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#ref-classes-base

Here is the change in 4.3.3 "Shared State" - http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#shared-state

Let me know how they are.

thanks,
Scott
Comment 2 ulfalizer 2016-07-18 19:04:48 UTC
Looks good. Just one nit:

  The default behavior of this task is to run the oe_runmake task...

should be

  The default behavior of this task is to run the oe_runmake function..

Cheers,
Ulf
Comment 3 ulfalizer 2016-07-18 19:09:19 UTC
I'll piggyback one slightly OCD nit in the glossary entry for B if it's okay:

  S = "${WORKDIR}/${BP}/"

should be

  S = "${WORKDIR}/${BP}"

to match the actual assignment in bitbake.conf. That's also the style I prefer.

Cheers,
Ulf
Comment 4 Scott Rifenbark 2016-07-18 20:33:18 UTC
No problems...

http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#var-B

I am going to close this bug to RESOLVED and set the flag to "Done."  I am assuming we are good now. 

Thanks, 
Scott
Comment 5 ulfalizer 2016-07-23 11:02:19 UTC
Found one small typo:

  The default behavior of this task is to run the oe_runmake task...

should be

  The default behavior of this task is to run the oe_runmake function...

Cheers,
Ulf
Comment 6 ulfalizer 2016-07-23 11:02:50 UTC
Reopening for visibility.
Comment 7 Scott Rifenbark 2016-07-29 22:08:52 UTC
Ulf, 

Sorry... I don't know how I missed that one in Comment 2.  I fixed it.  See http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#ref-tasks-compile.  

Setting to IN PROGRESS REVIEW so you can verify.

Thanks, 
Scott
Comment 8 ulfalizer 2016-07-30 08:59:32 UTC
Looks good!

Thanks,
Ulf
Comment 9 Scott Rifenbark 2016-08-01 17:59:07 UTC
Setting doc flag to "done".

Scott