core/br2-external: export paths and descriptions
PATCH 1/1 core/br2-external: export paths and descriptions
Now that we support multiple br2-external trees, BR2_EXTERNAL is no longer exported in the environment.
This means that post-build scripts in a br2-external tree can no longer find their own files (well, they could re-invent the path by stripping their known-relative path, but that'd be ugly, especially since we can very well provide it).
Export the path for each br2-external trees as environment variables. Do so for the description as well, as a courtesy.
Also, re-order variable definitions to be more logical: first, purely internal variables, then exported variables.
--- support/scripts/br2-external | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
support/scripts/br2-external +2 -2
@@ -142,10 +142,10 @@ do_mk() { br2_ext="${BR2_EXT_PATHS["${br2_name}"]}" printf '\n' printf 'BR2_EXTERNAL_NAMES += %s\n' "${br2_name}" - printf 'BR2_EXTERNAL_%s_PATH = %s\n' "${br2_name}" "${br2_ext}" - printf 'BR2_EXTERNAL_%s_DESC = %s\n' "${br2_name}" "${br2_desc}" printf 'BR2_EXTERNAL_DIRS += %s\n' "${br2_ext}" printf 'BR2_EXTERNAL_MKS += %s/external.mk\n' "${br2_ext}" + printf 'export BR2_EXTERNAL_%s_PATH = %s\n' "${br2_name}" "${br2_ext}" + printf 'export BR2_EXTERNAL_%s_DESC = %s\n' "${br2_name}" "${br2_desc}" done }
Signature · 1 line
2.7.4
PATCH 1/1 core/br2-external: export paths and descriptions
Hello,
Quoted 11 lines · Yann E. MORIN
Now that we support multiple br2-external trees,
BR2_EXTERNALis no longer exported in the environment.This means that post-build scripts in a br2-external tree can no longer find their own files (well, they could re-invent the path by stripping their known-relative path, but that'd be ugly, especially since we can very well provide it).
Export the path for each br2-external trees as environment variables. Do so for the description as well, as a courtesy.
Quoted 6 lines
Also, re-order variable definitions to be more logical: first, purely internal variables, then exported variables.
Reported-by Beno?t Allard <[email protected]>Signed-off-by "Yann E. MORIN" <[email protected]>Cc Beno?t Allard <[email protected]>
Does this require some documentation update?
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH 1/1 core/br2-external: export paths and descriptions
Thomas, All,
On 2016-10-19 21:58 +0200, Thomas Petazzoni spake thusly:
Quoted 12 lines · Yann E. MORIN
Quoted 11 lines
Now that we support multiple br2-external trees,
BR2_EXTERNALis no longer exported in the environment.This means that post-build scripts in a br2-external tree can no longer find their own files (well, they could re-invent the path by stripping their known-relative path, but that'd be ugly, especially since we can very well provide it).
Export the path for each br2-external trees as environment variables. Do so for the description as well, as a courtesy.
Quoted 8 lines
Quoted 6 lines
Also, re-order variable definitions to be more logical: first, purely internal variables, then exported variables.
Reported-by Beno?t Allard <[email protected]>Signed-off-by "Yann E. MORIN" <[email protected]>Cc Beno?t Allard <[email protected]>Does this require some documentation update?
I would have guessed no. We already state in the manual that the variable to use is BR2_EXTERNAL_<NAME>_PATH.
However, _DESC is not documented. So I'll ad a blurb that those two variables are also available to post-build scripts.
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
Thomas Petazzoni
AppliedPATCH 1/1 core/br2-external: export paths and descriptions
In reply to Yann E. MORINHello,
Quoted 14 lines · Yann E. MORIN
Now that we support multiple br2-external trees,
BR2_EXTERNALis no longer exported in the environment.This means that post-build scripts in a br2-external tree can no longer find their own files (well, they could re-invent the path by stripping their known-relative path, but that'd be ugly, especially since we can very well provide it).
Export the path for each br2-external trees as environment variables. Do so for the description as well, as a courtesy.
Also, re-order variable definitions to be more logical: first, purely internal variables, then exported variables.
Quoted 6 lines
Reported-by Beno?t Allard <[email protected]>Signed-off-by "Yann E. MORIN" <[email protected]>Cc Beno?t Allard <[email protected]>--- support/scripts/br2-external | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com