-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Documentation/Makefile: add make_build_system.rst #17162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
@tinnedkarma yes, there is a Documentation explaining how to compile the Documentation locally. |
|
Thank you! NuttX has been struggling with documentation so it's good to see improvements in that area. |
7f7e1db to
d14f316
Compare
d14f316 to
fbcb4fd
Compare
|
@acassis @linguini1 |
1e5fdf4 to
029abe2
Compare
029abe2 to
258ed5f
Compare
258ed5f to
9a3f5d0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This documentation is extremely helpful. Thank you for noticing that it was lacking and for helping to improve it!
| .. WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
| .. License for the specific language governing permissions and limitations | ||
| .. under the License. | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed that we should probably include the license text in the documentation files. Thanks for doing this here!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I completely disagree with this. It makes the documentation files less readable for terminal users. If it is not required by Apache then we should not clutter the documentation with license headers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
license is added to html output with this file: https://github.com/apache/nuttx/blob/master/Documentation/_templates/layout.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest, I agree with both.
Though I do not know how the licensing work, if it is per file, as in the productive code base, or it can be per project.
But I completely agree, I also cat files rather than opening the web page, rst is fairly readable in the terminal, less boilerplate is always welcome.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, since it's added automatically, then it's redundant to add it here manually. Let's remove the boilerplate and make the docs more readable :-)
| Due to *requirements, constraints, and the complexity of the build process*, NuttX divides | ||
| this work into multiple files, each handling specific parts of the build process. | ||
|
|
||
| Stated in :doc:`/introduction/inviolables`, multiple platforms should be supported: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Stated in :doc:`/introduction/inviolables`, multiple platforms should be supported: | |
| As stated in :doc:`/introduction/inviolables`, multiple platforms should be supported: |
|
|
||
| - :ref:`flatlibs_mk`: Kernel and user-space built into a single `blob`. | ||
| - :ref:`protectedlibs_mk`: Kernel and user-space built as two separate `blobs`. | ||
| - :ref:`kernelibs_mk`: Kernel build into single `blob`. User apps must be loaded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - :ref:`kernelibs_mk`: Kernel build into single `blob`. User apps must be loaded | |
| - :ref:`kernelibs_mk`: Kernel built into single `blob`. User apps must be loaded |
| - :ref:`kernelibs_mk`: Kernel build into single `blob`. User apps must be loaded | ||
| into memory for execution. | ||
|
|
||
| NuttX targets multiple libs, or `silos`, each handling it's own compilation: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| NuttX targets multiple libs, or `silos`, each handling it's own compilation: | |
| NuttX targets multiple libs, or `silos`, each handling its own compilation: |
|
|
||
| .. note:: | ||
|
|
||
| Gregory Nutt have a nice presetation about |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Gregory Nutt have a nice presetation about | |
| Gregory Nutt has a nice presentation about |
| pageId=139629399&preview=/139629402/140774623/nuttx-3-archoverview.pdf>`_ | ||
|
|
||
| There the `silo` concept is explained. Only the `silos` there are listed below as libs. | ||
| The build modes influences the needed libs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The build modes influences the needed libs. | |
| The build mode influences the needed libs. |
| Verbosity | ||
| --------- | ||
|
|
||
| The ``V`` variable can be passed to make to control the build verbosity. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The ``V`` variable can be passed to make to control the build verbosity. | |
| The ``V`` variable can be passed to `make` to control the build verbosity. |
| Win.mk | ||
| ------ | ||
|
|
||
| Although targeting different platforms, both **Win.mk** and **Unix.mk** aims the same output. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Although targeting different platforms, both **Win.mk** and **Unix.mk** aims the same output. | |
| Although targeting different platforms, both **Win.mk** and **Unix.mk** aim to produce the same output. |
| ------ | ||
|
|
||
| Although targeting different platforms, both **Win.mk** and **Unix.mk** aims the same output. | ||
| The need for independent files is due to the differences in the platforms approaches. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The need for independent files is due to the differences in the platforms approaches. | |
| The need for independent files is due to the differences in the platforms' approaches. |
| ^^^^^^^ | ||
|
|
||
| The main reason for the use of dummies is to handle some specific scenarios, such as external | ||
| code bases, custom chips and boards or overcome tooling limitation. If any of the features below |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| code bases, custom chips and boards or overcome tooling limitation. If any of the features below | |
| code bases, custom chips and boards or to overcome tooling limitations. If any of the features below |
Hello @hartmannathan, Thanks for the review, I am still throwing words at random. How was the read, I am a bit worried about the structure of the document being all over the place. I try to summarize the important points of the build system, rather than explain how it works step by step. Does the content make sense? Would you do things differently? |
Hello @tinnedkarma, I think this document reads just fine. It gathers together in one place a pretty good high-level description of the build system (at least the Make-based part) that we were lacking for a while. The suggestions I gave in the review are just small grammatical nits to improve the English. No worries if English is not your native language! It's still pretty good :-) |
9a3f5d0 to
a25958c
Compare
Summary
It feels like I am always getting side-tracked while working on NuttX.
Makefile based build system is one of those areas. It seems to be lacking documentation. Most of the features I discovered by actually reading and understanding the Makefiles content.
This PR (I'll keep it in draft for the time being) wants to start that progress. (Do we have a way to compile the documentation locally?)
I am not sure how, or where should I store the files (this whole rst documentation is still new for me).
I'll need help for licensing also. I've copy-pasted the license text into the file, but it seems that my file is the only one that does that. I'll keep documenting as I uncover more about it.
The scope of this PR is just to define how to start, and to document the root Makefile and Unix.mk files.
Smaller chunks of text are easier to process, and I'll need reviews to confirm the content correctness.
Also, feel free to point out what you want to see documented for the make build system
Impact
Improve documentation. More to read, hopefully, also usefull.
Testing
N/A. No impact over the codebase.