Skip to content

Commit 268a0b5

Browse files
authored
Merge pull request #4057 from masatake/kconfig--fill-choices-with-their-prompts
Kconfig: fill names of anonymous choices with the values of their prompts
2 parents e8578f4 + b94bd42 commit 268a0b5

File tree

13 files changed

+168
-33
lines changed

13 files changed

+168
-33
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
--sort=no
2+
--map-Kconfig=.kconfig
3+
--extras-Kconfig=-{configPrefixed}
4+
--fields=+e
5+
--extras=+r
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
A input.kconfig /^config A # ...$/;" c typeref:typename:bool
2+
B input.kconfig /^ prompt "B"$/;" C end:10
3+
C input.kconfig /^config C # ...$/;" c choice:B typeref:typename:bool
4+
D input.kconfig /^menu "D" # ...$/;" m end:17
5+
E input.kconfig /^config E # ...$/;" c menu:D typeref:typename:bool
6+
F input.kconfig /^menuconfig F # ...$/;" c
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
config A # ...
2+
bool
3+
4+
choice # ...
5+
prompt "B"
6+
7+
config C # ...
8+
bool
9+
10+
endchoice # ...
11+
12+
menu "D" # ...
13+
14+
config E # ...
15+
bool
16+
17+
endmenu # ...
18+
19+
menuconfig F # ...

Units/parser-kconfig.r/simple-kconfig.d/expected.tags

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,19 @@ CONFIG_JFFS2_RTIME_MODULE input-1.kconfig /^config JFFS2_RTIME$/;" c roles:def
5151
JFFS2_RUBIN input-1.kconfig /^config JFFS2_RUBIN$/;" c typeref:typename:bool roles:def
5252
CONFIG_JFFS2_RUBIN input-1.kconfig /^config JFFS2_RUBIN$/;" c roles:def
5353
CONFIG_JFFS2_RUBIN_MODULE input-1.kconfig /^config JFFS2_RUBIN$/;" c roles:def
54-
choicebf6231840104 input-1.kconfig /^choice$/;" C roles:def
55-
JFFS2_CMODE_NONE input-1.kconfig /^config JFFS2_CMODE_NONE$/;" c choice:choicebf6231840104 typeref:typename:bool roles:def
56-
CONFIG_JFFS2_CMODE_NONE input-1.kconfig /^config JFFS2_CMODE_NONE$/;" c choice:choicebf6231840104 roles:def
57-
CONFIG_JFFS2_CMODE_NONE_MODULE input-1.kconfig /^config JFFS2_CMODE_NONE$/;" c choice:choicebf6231840104 roles:def
58-
JFFS2_CMODE_PRIORITY input-1.kconfig /^config JFFS2_CMODE_PRIORITY$/;" c choice:choicebf6231840104 typeref:typename:bool roles:def
59-
CONFIG_JFFS2_CMODE_PRIORITY input-1.kconfig /^config JFFS2_CMODE_PRIORITY$/;" c choice:choicebf6231840104 roles:def
60-
CONFIG_JFFS2_CMODE_PRIORITY_MODULE input-1.kconfig /^config JFFS2_CMODE_PRIORITY$/;" c choice:choicebf6231840104 roles:def
61-
JFFS2_CMODE_SIZE input-1.kconfig /^config JFFS2_CMODE_SIZE$/;" c choice:choicebf6231840104 typeref:typename:bool roles:def
62-
CONFIG_JFFS2_CMODE_SIZE input-1.kconfig /^config JFFS2_CMODE_SIZE$/;" c choice:choicebf6231840104 roles:def
63-
CONFIG_JFFS2_CMODE_SIZE_MODULE input-1.kconfig /^config JFFS2_CMODE_SIZE$/;" c choice:choicebf6231840104 roles:def
64-
JFFS2_CMODE_FAVOURLZO input-1.kconfig /^config JFFS2_CMODE_FAVOURLZO$/;" c choice:choicebf6231840104 typeref:typename:bool roles:def
65-
CONFIG_JFFS2_CMODE_FAVOURLZO input-1.kconfig /^config JFFS2_CMODE_FAVOURLZO$/;" c choice:choicebf6231840104 roles:def
66-
CONFIG_JFFS2_CMODE_FAVOURLZO_MODULE input-1.kconfig /^config JFFS2_CMODE_FAVOURLZO$/;" c choice:choicebf6231840104 roles:def
54+
JFFS2 default compression mode input-1.kconfig /^ prompt "JFFS2 default compression mode" if JFFS2_COMPRESSION_OPTIONS$/;" C roles:def
55+
JFFS2_CMODE_NONE input-1.kconfig /^config JFFS2_CMODE_NONE$/;" c choice:JFFS2 default compression mode typeref:typename:bool roles:def
56+
CONFIG_JFFS2_CMODE_NONE input-1.kconfig /^config JFFS2_CMODE_NONE$/;" c choice:JFFS2 default compression mode roles:def
57+
CONFIG_JFFS2_CMODE_NONE_MODULE input-1.kconfig /^config JFFS2_CMODE_NONE$/;" c choice:JFFS2 default compression mode roles:def
58+
JFFS2_CMODE_PRIORITY input-1.kconfig /^config JFFS2_CMODE_PRIORITY$/;" c choice:JFFS2 default compression mode typeref:typename:bool roles:def
59+
CONFIG_JFFS2_CMODE_PRIORITY input-1.kconfig /^config JFFS2_CMODE_PRIORITY$/;" c choice:JFFS2 default compression mode roles:def
60+
CONFIG_JFFS2_CMODE_PRIORITY_MODULE input-1.kconfig /^config JFFS2_CMODE_PRIORITY$/;" c choice:JFFS2 default compression mode roles:def
61+
JFFS2_CMODE_SIZE input-1.kconfig /^config JFFS2_CMODE_SIZE$/;" c choice:JFFS2 default compression mode typeref:typename:bool roles:def
62+
CONFIG_JFFS2_CMODE_SIZE input-1.kconfig /^config JFFS2_CMODE_SIZE$/;" c choice:JFFS2 default compression mode roles:def
63+
CONFIG_JFFS2_CMODE_SIZE_MODULE input-1.kconfig /^config JFFS2_CMODE_SIZE$/;" c choice:JFFS2 default compression mode roles:def
64+
JFFS2_CMODE_FAVOURLZO input-1.kconfig /^config JFFS2_CMODE_FAVOURLZO$/;" c choice:JFFS2 default compression mode typeref:typename:bool roles:def
65+
CONFIG_JFFS2_CMODE_FAVOURLZO input-1.kconfig /^config JFFS2_CMODE_FAVOURLZO$/;" c choice:JFFS2 default compression mode roles:def
66+
CONFIG_JFFS2_CMODE_FAVOURLZO_MODULE input-1.kconfig /^config JFFS2_CMODE_FAVOURLZO$/;" c choice:JFFS2 default compression mode roles:def
6767
HAVE_ARCH_KGDB input-2.kconfig /^config HAVE_ARCH_KGDB$/;" c typeref:typename:bool roles:def
6868
CONFIG_HAVE_ARCH_KGDB input-2.kconfig /^config HAVE_ARCH_KGDB$/;" c roles:def
6969
CONFIG_HAVE_ARCH_KGDB_MODULE input-2.kconfig /^config HAVE_ARCH_KGDB$/;" c roles:def
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
--sort=no
2+
--map-Kconfig=.kconfig
3+
--extras-Kconfig=-{configPrefixed}
4+
--fields=+e
5+
--extras=+r
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
A input.kconfig /^config A$/;" c typeref:typename:bool
2+
B input.kconfig /^config B$/;" c typeref:typename:bool
3+
Y input-0.kconfig /^menu "Y"$/;" m end:11
4+
C input-0.kconfig /^config C$/;" c menu:Y typeref:typename:bool
5+
D input-0.kconfig /^config D$/;" c menu:Y typeref:typename:bool
6+
E input-1.kconfig /^config E$/;" c typeref:typename:bool
7+
F input-1.kconfig /^config F$/;" c typeref:typename:bool
8+
W input-2.kconfig /^choice W$/;" C end:8
9+
G input-2.kconfig /^ config G$/;" c choice:W typeref:typename:bool
10+
H input-3.kconfig /^config H$/;" c typeref:typename:bool
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
menu "Y"
2+
3+
config C
4+
bool
5+
help
6+
endmenu - a dummy
7+
8+
config D
9+
bool
10+
11+
endmenu
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
config E
2+
bool
3+
help
4+
choice Z0 or Z1
5+
6+
config F
7+
bool
8+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
choice W
2+
help
3+
endchoice but this is a part of help message
4+
5+
config G
6+
bool
7+
8+
endchoice
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
config H
2+
bool
3+
help
4+
source "V" is a part of a help message.

0 commit comments

Comments
 (0)