docs/manual: Clarify location of local.mk
PATCH 1/1 docs/manual: Clarify location of local.mk
In particular, the manual was incorrect when the user had selected an out-of-tree build.
--- docs/manual/using-buildroot-development.txt | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)
docs/manual/using-buildroot-development.txt +12 -3
@@ -29,9 +29,18 @@ Therefore, Buildroot provides a specific mechanism for this use case: the +<pkg>_OVERRIDE_SRCDIR+ mechanism. Buildroot reads an _override_ file, which allows the user to tell Buildroot the location of the source for certain packages. By default this _override_ file is named -+local.mk+ and located in the top directory of the Buildroot source -tree, but a different location can be specified through the -+BR2_PACKAGE_OVERRIDE_FILE+ configuration option. ++local.mk+ and is located where your Buildroot configuration file is. +By default this location is in the top-level directory of the +buildroot source tree. + +However, if the user has selected an out-of-tree build (using the ++O=path/to/my_output_dir+ make option) then you should place +local.mk+ in ++path/to/my_output_dir+, since that is where this out-of-tree build's ++.config+ file is located. + +If a different location than these defaults is required, it can be +specified through the +BR2_PACKAGE_OVERRIDE_FILE+ configuration +option. In this _override_ file, Buildroot expects to find lines of the form:
Signature · 1 line
2.17.1
PATCH 1/1 docs/manual: Clarify location of local.mk
Hello Charlie,
Quoted 21 lines · On Mon, 13 May 2019 10:44:40 +0100 Charlie Turner <[email protected]> wrote:
In particular, the manual was incorrect when the user had selected an out-of-tree build.
Signed-off-by Charlie Turner <[email protected]>--- docs/manual/using-buildroot-development.txt | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)docs/manual/using-buildroot-development.txt +2
-3@@ -29,9 +29,18 @@ Therefore, Buildroot provides a specific mechanism for this use case: the +<pkg>_OVERRIDE_SRCDIR+ mechanism. Buildroot reads an _override_ file, which allows the user to tell Buildroot the location of the source for certain packages. By default this _override_ file is named -+local.mk+ and located in the top directory of the Buildroot source -tree, but a different location can be specified through the -+BR2_PACKAGE_OVERRIDE_FILE+ configuration option. ++local.mk+ and is located where your Buildroot configuration file is. +By default this location is in the top-level directory of the
docs/manual/using-buildroot-development.txt Therefore, Buildroot provides a specific mechanism for this use case: · line 43
Quoted 10 lines
docs/manual/using-buildroot-development.txt +10
-0+buildroot source tree. + +However, if the user has selected an out-of-tree build (using the ++O=path/to/my_output_dir+ make option) then you should place +local.mk+ in ++path/to/my_output_dir+, since that is where this out-of-tree build's ++.config+ file is located. + +If a different location than these defaults is required, it can be +specified through the +BR2_PACKAGE_OVERRIDE_FILE+ configuration +option.
Thanks for following up our conversation on IRC with an actual patch. I would actually prefer a wording along the lines of:
"""
The default location of the override file is +$(CONFIG_DIR)/local.mk+, as defined by the +BR2_PACKAGE_OVERRIDE_FILE+ configuration option. +$(CONFIG_DIR)+ is the location of the Buildroot +.config+ file, so +local.mk+ by default lives side-by-side with the +.config+ file, which means:
* In the top-level Buildroot source directory for in-tree builds (i.E when +O=+ is not used)
* In the out of tree directory for out-of-tree builds (i.e when +O=+ is used)
If a different location than these defaults is required, it can be specified through the +BR2_PACKAGE_OVERRIDE_FILE+ configuration option.
"""
What do you think ?
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com