diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-09-12 10:35:21 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2023-01-17 08:31:48 +0100 |
commit | f20078acea88f7c38f14cbc206053e50c313c357 (patch) | |
tree | b00ad4ff46b7da85f4b5206561961d0317b86375 /spec/build/bsps/sh/shsim | |
parent | build: Replace variant patterns with a list (diff) | |
download | rtems-f20078acea88f7c38f14cbc206053e50c313c357.tar.bz2 |
build: Use enabled by for defaults
Merge the "default" and "default-by-variant" attributes. Use an
"enabled-by" expression to select the default value based on the enabled
set. This makes it possible to select default values depending on other
options. For example you could choose memory settings based on whether
RTEMS_SMP is enabled or disabled.
The change was tested by comparing the output of
./waf bspdefaults
before and after the change.
Diffstat (limited to '')
-rw-r--r-- | spec/build/bsps/sh/shsim/abi.yml | 22 | ||||
-rw-r--r-- | spec/build/bsps/sh/shsim/optcpuclk.yml | 5 | ||||
-rw-r--r-- | spec/build/bsps/sh/shsim/optlowinit.yml | 5 | ||||
-rw-r--r-- | spec/build/bsps/sh/shsim/tstsimsh1.yml | 3 | ||||
-rw-r--r-- | spec/build/bsps/sh/shsim/tstsimsh2.yml | 3 | ||||
-rw-r--r-- | spec/build/bsps/sh/shsim/tstsimsh2e.yml | 3 | ||||
-rw-r--r-- | spec/build/bsps/sh/shsim/tstsimsh4.yml | 3 |
7 files changed, 20 insertions, 24 deletions
diff --git a/spec/build/bsps/sh/shsim/abi.yml b/spec/build/bsps/sh/shsim/abi.yml index f5dcf145dc..2b735aea89 100644 --- a/spec/build/bsps/sh/shsim/abi.yml +++ b/spec/build/bsps/sh/shsim/abi.yml @@ -7,22 +7,20 @@ build-type: option copyrights: - Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) default: -- -m4 -- -ml -default-by-variant: -- value: +- enabled-by: sh/simsh2e + value: - -m2e - -ml - variants: - - sh/simsh2e -- value: +- enabled-by: sh/simsh2 + value: - -m2 - variants: - - sh/simsh2 -- value: +- enabled-by: sh/simsh1 + value: - -m1 - variants: - - sh/simsh1 +- enabled-by: true + value: + - -m4 + - -ml description: | ABI flags enabled-by: true diff --git a/spec/build/bsps/sh/shsim/optcpuclk.yml b/spec/build/bsps/sh/shsim/optcpuclk.yml index 086145a786..4ccce45d6c 100644 --- a/spec/build/bsps/sh/shsim/optcpuclk.yml +++ b/spec/build/bsps/sh/shsim/optcpuclk.yml @@ -5,8 +5,9 @@ actions: build-type: option copyrights: - Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) -default: 20000000 -default-by-variant: [] +default: +- enabled-by: true + value: 20000000 description: | cpu clock rate in HZ enabled-by: true diff --git a/spec/build/bsps/sh/shsim/optlowinit.yml b/spec/build/bsps/sh/shsim/optlowinit.yml index 60f16b388b..121673589c 100644 --- a/spec/build/bsps/sh/shsim/optlowinit.yml +++ b/spec/build/bsps/sh/shsim/optlowinit.yml @@ -5,8 +5,9 @@ actions: build-type: option copyrights: - Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) -default: false -default-by-variant: [] +default: +- enabled-by: true + value: false description: | If defined, selects whether 'early_hw_init()' is called from 'start.S'; 'bsp_hw_init()' is always called from 'bspstart.c' enabled-by: true diff --git a/spec/build/bsps/sh/shsim/tstsimsh1.yml b/spec/build/bsps/sh/shsim/tstsimsh1.yml index 97a13626e4..ee781e6278 100644 --- a/spec/build/bsps/sh/shsim/tstsimsh1.yml +++ b/spec/build/bsps/sh/shsim/tstsimsh1.yml @@ -15,8 +15,7 @@ actions: build-type: option copyrights: - Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) -default: null -default-by-variant: [] +default: [] description: '' enabled-by: true links: diff --git a/spec/build/bsps/sh/shsim/tstsimsh2.yml b/spec/build/bsps/sh/shsim/tstsimsh2.yml index 97a13626e4..ee781e6278 100644 --- a/spec/build/bsps/sh/shsim/tstsimsh2.yml +++ b/spec/build/bsps/sh/shsim/tstsimsh2.yml @@ -15,8 +15,7 @@ actions: build-type: option copyrights: - Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) -default: null -default-by-variant: [] +default: [] description: '' enabled-by: true links: diff --git a/spec/build/bsps/sh/shsim/tstsimsh2e.yml b/spec/build/bsps/sh/shsim/tstsimsh2e.yml index 97a13626e4..ee781e6278 100644 --- a/spec/build/bsps/sh/shsim/tstsimsh2e.yml +++ b/spec/build/bsps/sh/shsim/tstsimsh2e.yml @@ -15,8 +15,7 @@ actions: build-type: option copyrights: - Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) -default: null -default-by-variant: [] +default: [] description: '' enabled-by: true links: diff --git a/spec/build/bsps/sh/shsim/tstsimsh4.yml b/spec/build/bsps/sh/shsim/tstsimsh4.yml index 97a13626e4..ee781e6278 100644 --- a/spec/build/bsps/sh/shsim/tstsimsh4.yml +++ b/spec/build/bsps/sh/shsim/tstsimsh4.yml @@ -15,8 +15,7 @@ actions: build-type: option copyrights: - Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) -default: null -default-by-variant: [] +default: [] description: '' enabled-by: true links: |