[PATCH] build: Merge default-by-family into by-variant

Gedare Bloom gedare at rtems.org
Fri Jul 23 16:43:19 UTC 2021


ok. we need default-by-family documentation in rtems-docs/eng

On Fri, Jul 23, 2021 at 12:49 AM Sebastian Huber
<sebastian.huber at embedded-brains.de> wrote:
>
> Prefix the BSP family name with "bsps/" to make it distinct to the BSP
> variant names.
> ---
>  spec/build/bsps/optconsolebaud.yml |  5 +----
>  wscript                            | 10 ++++++----
>  2 files changed, 7 insertions(+), 8 deletions(-)
>
> diff --git a/spec/build/bsps/optconsolebaud.yml b/spec/build/bsps/optconsolebaud.yml
> index 4b0869beca..0233fdd61b 100644
> --- a/spec/build/bsps/optconsolebaud.yml
> +++ b/spec/build/bsps/optconsolebaud.yml
> @@ -6,13 +6,10 @@ build-type: option
>  copyrights:
>  - Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
>  default: 115200
> -default-by-family:
> -- value: 9600
> -  families:
> -  - powerpc/motorola_powerpc
>  default-by-variant:
>  - value: 9600
>    variants:
> +  - bsps/powerpc/motorola_powerpc
>    - m68k/m5484FireEngine
>    - powerpc/hsc_cm01
>    - powerpc/beatnik
> diff --git a/wscript b/wscript
> index fb8ce9292d..bd75de9807 100755
> --- a/wscript
> +++ b/wscript
> @@ -698,10 +698,12 @@ class OptionItem(Item):
>              if OptionItem._is_variant(default["variants"], variant):
>                  value = default["value"]
>                  break
> -        for default in self.data["default-by-family"]:
> -            if OptionItem._is_variant(default["families"], family):
> -                value = default["value"]
> -                break
> +        else:
> +            family = "bsps/" + family
> +            for default in self.data["default-by-variant"]:
> +                if OptionItem._is_variant(default["variants"], family):
> +                    value = default["value"]
> +                    break
>          if value is None:
>              return value
>          if isinstance(value, list):
> --
> 2.26.2
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel


More information about the devel mailing list