summaryrefslogtreecommitdiffstats
path: root/spec/spec
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2023-01-17 15:10:29 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2023-01-23 07:26:05 +0100
commitb91e7f2d98dae3605019428b19f2db476430543f (patch)
tree3cea9bb5ee95256038f34526f76f7815825c831a /spec/spec
parentspec: Add reason to test program state (diff)
downloadrtems-central-b91e7f2d98dae3605019428b19f2db476430543f.tar.bz2
spec: Improve build option default values
Merge "default" and "default-by-variant" attributes. Use an enabled-by expression to select the default value.
Diffstat (limited to 'spec/spec')
-rw-r--r--spec/spec/build-default-by-variant.yml27
-rw-r--r--spec/spec/build-default-value-list.yml (renamed from spec/spec/build-default-by-variant-list.yml)6
-rw-r--r--spec/spec/build-default-value.yml26
-rw-r--r--spec/spec/build-option.yml35
4 files changed, 42 insertions, 52 deletions
diff --git a/spec/spec/build-default-by-variant.yml b/spec/spec/build-default-by-variant.yml
deleted file mode 100644
index 5a6e7fa4..00000000
--- a/spec/spec/build-default-by-variant.yml
+++ /dev/null
@@ -1,27 +0,0 @@
-SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
-copyrights:
-- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
-enabled-by: true
-links:
-- role: spec-member
- uid: root
-spec-description: null
-spec-example: null
-spec-info:
- dict:
- attributes:
- value:
- description: |
- It value shall be the default value for the matching variants.
- spec-type: build-option-value
- variants:
- description: |
- It shall be a list of Python regular expression matching with the
- desired variants.
- spec-type: list-str
- description: |
- This set of attributes specifies build option default values by variant.
- mandatory-attributes: all
-spec-name: Build Option Default by Variant
-spec-type: build-default-by-variant
-type: spec
diff --git a/spec/spec/build-default-by-variant-list.yml b/spec/spec/build-default-value-list.yml
index 5f53df4f..bfcabf6f 100644
--- a/spec/spec/build-default-by-variant-list.yml
+++ b/spec/spec/build-default-value-list.yml
@@ -10,7 +10,7 @@ spec-example: null
spec-info:
list:
description: null
- spec-type: build-default-by-variant
-spec-name: Build Option Default by Variant List
-spec-type: build-default-by-variant-list
+ spec-type: build-default-value
+spec-name: Build Option Default Value List
+spec-type: build-default-value-list
type: spec
diff --git a/spec/spec/build-default-value.yml b/spec/spec/build-default-value.yml
new file mode 100644
index 00000000..301e271f
--- /dev/null
+++ b/spec/spec/build-default-value.yml
@@ -0,0 +1,26 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+copyrights:
+- Copyright (C) 2020, 2022 embedded brains GmbH (http://www.embedded-brains.de)
+enabled-by: true
+links:
+- role: spec-member
+ uid: root
+spec-description: null
+spec-example: null
+spec-info:
+ dict:
+ attributes:
+ value:
+ description: |
+ Its value shall be the default value for the associated enabled-by
+ expression.
+ spec-type: build-option-value
+ enabled-by:
+ description: null
+ spec-type: enabled-by
+ description: |
+ This set of attributes specifies a build option default value.
+ mandatory-attributes: all
+spec-name: Build Option Default Value
+spec-type: build-default-value
+type: spec
diff --git a/spec/spec/build-option.yml b/spec/spec/build-option.yml
index cff5446d..346b9818 100644
--- a/spec/spec/build-option.yml
+++ b/spec/spec/build-option.yml
@@ -17,17 +17,17 @@ spec-example: |
- define: null
build-type: option
copyrights:
- - Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
- default: 115200
- default-by-variant:
- - value: 9600
- variants:
+ - Copyright (C) 2020, 2022 embedded brains GmbH (http://www.embedded-brains.de)
+ default:
+ - enabled-by:
- bsps/powerpc/motorola_powerpc
- m68k/m5484FireEngine
- powerpc/hsc_cm01
- - value: 19200
- variants:
- - m68k/COBRA5475
+ value: 9600
+ - enabled-by: m68k/COBRA5475
+ value: 19200
+ - enabled-by: true
+ value: 115200
description: |
Default baud for console and other serial devices.
enabled-by: true
@@ -48,19 +48,11 @@ spec-info:
spec-type: build-action-list
default:
description: |
- It shall be the default value of the option if no variant-specific
- default value is specified. Use ``null`` to specify that no default
- value exits. The variant-specific default values may be specified by
- the ``default-by-variant`` attribute.
- spec-type: build-option-value
- default-by-variant:
- description: |
- The list is checked two times and processed from top to bottom.
- Firstly, the base BSP name is used to match with a variant.
- Secondly, the BSP family name prefixed by ``bsps/`` is used to match
- with a variant. If a matching variant is found, then the processing
- stops.
- spec-type: build-default-by-variant-list
+ It shall be the list of default values of the option. When a default
+ value is needed, the first value on the list which is enabled
+ according to the enabled set is choosen. If no value is enabled,
+ then the default value is ``null``.
+ spec-type: build-default-value-list
description:
description: |
It shall be the description of the option.
@@ -79,7 +71,6 @@ spec-info:
mandatory-attributes:
- actions
- default
- - default-by-variant
- description
spec-name: Build Option Item Type
spec-type: build-option