br2-external: make the list of external trees public

Currently, the list of external trees is a private variable, but for
debugging or compliance, one may need to get that list.

Add a Kconfig option so that the list appears in the .config file, and
export the already existing .mk variable in the environment, so that
post-build or post-image scripts can use it.

Reported-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
This commit is contained in:
Yann E. MORIN 2023-02-11 11:52:44 +01:00
parent 271745c37a
commit 8a2b772e8c

View File

@ -126,7 +126,7 @@ do_mk() {
done
printf '\n'
printf 'BR2_EXTERNAL_NAMES = \n'
printf 'export BR2_EXTERNAL_NAMES = \n'
printf 'BR2_EXTERNAL_DIRS = \n'
printf 'BR2_EXTERNAL_MKS = \n'
@ -181,6 +181,14 @@ do_kconfig() {
printf 'menu "External options"\n\n' >>"${outputdir}/.br2-external.in.menus"
{
printf 'config BR2_EXTERNAL_NAMES\n'
printf '\tstring\n'
# Use star-expansion: we really one a single arg.
printf '\tdefault "%s"\n' "${BR2_EXT_NAMES[*]}"
printf '\n'
} >>"${outputdir}/.br2-external.in.paths"
for br2_name in "${BR2_EXT_NAMES[@]}"; do
eval br2_desc="\"\${BR2_EXT_DESCS_${br2_name}}\""
eval br2_ext="\"\${BR2_EXT_PATHS_${br2_name}}\""